Skip to content

Instantly share code, notes, and snippets.

@simonpoole
Created October 3, 2017 21:34
Show Gist options
  • Save simonpoole/9a507bd4d7cfb7151fe82c57e961d1a4 to your computer and use it in GitHub Desktop.
Save simonpoole/9a507bd4d7cfb7151fe82c57e961d1a4 to your computer and use it in GitHub Desktop.
extracting schools
gis=> \o schools_points.txt
schools_points.txt: Permission denied
gis=> \o /tmp/schools_points.txt
gis=> select St_asGeoJson(st_transform(way,4326)),hstore_to_json(tags) from planet_osm_point where amenity='school';
gis=> \o /tmp/schools_polygons.txt
gis=> select St_asGeoJson(st_transform(St_centroid(way),4326)),hstore_to_json(tags) from planet_osm_polygon where amenity='school';
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment