Created
March 1, 2022 21:01
-
-
Save ThomasG77/3bbbdc728be508814a349c7069060eee to your computer and use it in GitHub Desktop.
Bookstores and libraries in Ukraine, Extract from OpenStreetMap
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# echo '[out:json][timeout:25];(relation(60199););out;>;out skel qt;' | query-overpass >| /tmp/ukraine.geojson | |
# ogr2ogr -f GeoJSON -where "OGR_GEOMETRY='Polygon'" /tmp/ukraine_poly.geojson /tmp/ukraine.geojson | |
echo '[out:json][timeout:250];(node["shop"="books"](area:3600060199);way["shop"="books"](area:3600060199);relation["shop"="books"](area:3600060199););out;>;out skel qt;' | query-overpass >| /tmp/bookshops_ukraine.geojson | |
ogr2ogr -f GeoJSON -dialect SQLite -sql "SELECT type, id, tags, relations, meta, ST_PointOnSurface(geometry) AS geometry FROM bookshops_ukraine" /tmp/ukraine_bookshops_points.geojson /tmp/bookshops_ukraine.geojson | |
echo '[out:json][timeout:250];(node["amenity"="library"](area:3600060199);way["amenity"="library"](area:3600060199);relation["amenity"="library"](area:3600060199););out;>;out skel qt;' | query-overpass >| /tmp/libraries_ukraine.geojson | |
ogr2ogr -f GeoJSON -dialect SQLite -sql "SELECT type, id, tags, relations, meta, ST_PointOnSurface(geometry) AS geometry FROM libraries_ukraine" /tmp/ukraine_libraries_points.geojson /tmp/libraries_ukraine.geojson |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment