I am using OSM point data and am trying to pull out schools, hospitals and place of worship. I have created my feature layer and am using a "for loop" to make from each amenity its own shapefile.
What I currently have will create the 3 shapefiles all with hospitals populating every shapefile. Do I have to create a new query for each amenity and then make a new feature layer from that?
amenities = ['school','hospital','place_of_worship']
enter image description here
-
Please always include code as text rather than pictures so that it is available to future searches and to copy/paste for testing.PolyGeo– PolyGeo ♦2016年10月03日 06:44:04 +00:00Commented Oct 3, 2016 at 6:44
1 Answer 1
Depending on exactly how your data looks, you could make this change to your code and have it dynamically change the query:
pointquery = '"amenity" = "{0}"'.format(amenity)
This will populate the query from your amenities list.