Advertisement
Guest User

Untitled

a guest
Apr 26th, 2019
111
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.43 KB | None | 0 0
  1. from pandana.loaders import osm
  2.  
  3. # request them from the OpenStreetMap API (Overpass)
  4. pois = osm.node_query(lat_min, lng_min, lat_max, lng_max)
  5.  
  6. network = osm.pdna_network_from_bbox(lat_min, lng_min, lat_max, lng_max)
  7.  
  8. # define your selected amenities and bounding box
  9. amenities = ['hospital', 'school']
  10. amenity = 'school'
  11.  
  12. pois = pois[pois['amenity'].isin(amenities)]
  13.  
  14. #List how many we downloaded
  15. pois[['amenity', 'name', 'lat', 'lon']].head()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement