Want to Contribute to us or want to have 15k+ Audience read your Article ? Or Just want to make a strong Backlink?

How to get streets data using overpass Api

I’ll present you a easy and fastly solution to get the streets geometry and one other data from OSM(open streeet maps), to do that, we are going to use Overpass turbo.

In accordance the wiki of open street maps, Overpass turbo is is an internet based mostly information mining software for OpenStreetMap that run runs any sort of Overpass API question and reveals the outcomes on an interactive map.

  1. Go to https://overpass-turbo.eu/.
  2. Choose in Wizard
  3. Write freeway=* and kind:manner
  4. Click on on construct and run question

Overpass turbo will create mechanically the next question

[out:json][timeout:25];
(
    manner["highway"]({{bbox}});
);
out physique;
>;
out skel qt;
Enter fullscreen mode

Exit fullscreen mode

And now you may run it and see all of the streets geometries drawn on the map.

Now, you may click on on Export and click on on GeoJSON obtain button.

Additionally, you should utilize the Question Wizard to seek out one other kind of locations, the next question have been generated writing solely the phrase “store”, and it returns the retailers locations.

[out:json][timeout:25];
(
    node["shop"]({{bbox}});
    manner["shop"]({{bbox}});
    relation["shop"]({{bbox}});
);
out physique;
>;
out skel qt;
Enter fullscreen mode

Exit fullscreen mode

As well as, should you do not wish to get solely the streets chosen on the net IU, you may change {{bbox}} to your manually chosen coordinates.

[out:json][timeout:25];
(
    manner["highway"](
        18.806908708848084,
        -98.95872831344604,
        18.825777549841018,
        -98.94263505935669
    );
);
out physique;
>;
out skel qt;
Enter fullscreen mode

Exit fullscreen mode

In case you must acquire many extra geometries, I like to recommend you to make use of a software like osm2po.

For know extra about this matter, please examine the documentation:

I can be writing quickly, how you can import this information into postgres.

Add a Comment

Your email address will not be published. Required fields are marked *

Want to Contribute to us or want to have 15k+ Audience read your Article ? Or Just want to make a strong Backlink?