This is a static archive of our old OpenStreetMap Help Site. Please post any new questions and answers at community.osm.org.

Get streets distance in osm?

0

Hey, I'm kinda new at this so bare with me. I downloaded my country osm data and put it in postgres. I would like to make a research on the data so I can for example have all the streets in a radius of 5 miles from a location (ultimately I would like to work directly with the data and not go through external api's. I looked at the data in the roads table and ,in there, there is that column "way" (900913). Can I use the data in that column to reach my goal ? What does the data in that column really represent ? I know it's something related to projection but it's vague.

asked 12 Apr '15, 03:21

activee's gravatar image

activee
1112
accept rate: 0%

edited 12 Apr '15, 13:31

aseerel4c26's gravatar image

aseerel4c26 ♦
32.6k18248554


One Answer:

2

The way column contains the geometry of the street (for those objects where the highway column is not null). Your problem can likely be solved using the PostGIS function st_dwithin; for further information, check the PostGIS manual or generic PostGIS resources - this is not an OSM specific question.

answered 12 Apr '15, 09:46

Frederik%20Ramm's gravatar image

Frederik Ramm ♦
82.5k927201273
accept rate: 23%

Source code available on GitHub .