2

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

gisnside
7,9082 gold badges33 silver badges75 bronze badges
asked Sep 27, 2016 at 13:36
1
  • Please always include code as text rather than pictures so that it is available to future searches and to copy/paste for testing. Commented Oct 3, 2016 at 6:44

1 Answer 1

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.

answered Sep 27, 2016 at 13:44

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.