tips:overpass

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
Next revisionBoth sides next revision
tips:overpass [2020/11/16 18:40] – created scipiotips:overpass [2020/11/17 15:36] scipio
Line 5: Line 5:
 select box and export all streets select box and export all streets
 <code> <code>
-[out:json][timeout:25];+[out:xml][timeout:25];
 ( (
   way["highway"]({{bbox}});   way["highway"]({{bbox}});
Line 13: Line 13:
 >; >;
 out skel qt; out skel qt;
 +</code>
 +
 +export data in OSM
 +
 +create db
 +<code>
 +spatialite_osm_net -o fes.osm -d fes.sqlite -T roads
 +echo 'SELECT CreateSpatialIndex('roads', 'geometry');' | spatialite  fes.sqlite
 +</code>
 +
 +
 +<code/
 +SELECT a.pos,b.name FROM knn AS a JOIN roads AS b ON (b.id = a.fid) 
 + WHERE f_table_name = 'roads' AND ref_geometry = MakePoint(-5.01057, 34.020940) and max_items=2;
 +</code>
 +
 +
 +<code>
 +sqlite3 /tmp/test.db
 +SELECT load_extension('mod_spatialite');
 +//SELECT load_extension('/lab/gianoobserver/lib38/lib/mod_spatialite');
 +
 +
 +SELECT ImportGeoJSON('./fes.geojson', 'test');
 +
 </code> </code>
  • tips/overpass.txt
  • Last modified: 2020/11/17 16:36
  • by scipio