Hi, I'm mapping areas for fire-stations and we use a "tactical grid" over our map. I want to get all street names from the fire-service area and then create a list saying eg:
where A5 is a square in our tactical grid and so on. I've a routine, converting GPS Lat and Long to our grid system. The problem is that when I export OSM file (using eg this: https://www.openstreetmap.org/export#map=14/51.4898/-0.0882&layers=N )I get a file where the "real node" have their GPS values, but streets has only the "nd" reference of their node, without the GPS values. Of course, I can ask OSM server for Lat and Long for each "nd", one bye one using : http://api.openstreetmap.org/api/0.6/node/2639002010 but it will take time: I need the GPS values for each point, in case of a street overlapping more than one square of our grid; How can I get, in one call, GPS values of all "nd"? Is-it possible to get an OSM file, directly with them, or is there a way to send a "pack" of "nd" references to the server and get pack in one call, all Lat and Long fo each of them? Thanks a lot asked 29 Dec '14, 18:06 ANSB |
The export you mention already contains the lat/lon for all nodes. If a way says
then there will be a
later in the file. You might however be approaching this in a way that causes you more headache and the OSM server more load than necessary. You could simply download all the data for your region of interest, import it into PostGIS with osm2pgsql (use the -l flag) and then with relative ease query the database for all roads that are inside a certain rectangle - with a query like
Another alternative is using the Overpass API to return all highway-type ways in a given bounding box. answered 29 Dec '14, 18:51 Frederik Ramm ♦ Thanks Frederik! I've tried this but made a mistake for my "search" so I believed these were other nodes! Thanks again!
(29 Dec '14, 19:41)
ANSB
|