Skip to content

Instantly share code, notes, and snippets.

@ThomasG77
Created March 1, 2022 21:01
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ThomasG77/3bbbdc728be508814a349c7069060eee to your computer and use it in GitHub Desktop.
Save ThomasG77/3bbbdc728be508814a349c7069060eee to your computer and use it in GitHub Desktop.
Bookstores and libraries in Ukraine, Extract from OpenStreetMap
Display the source blob
Display the rendered blob
Raw
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
# 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
Display the source blob
Display the rendered blob
Raw
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment