I imported OSM data using osm2pgsql osm (slim) to gis posetgres Now I want to get all roads close to a point. I use this query:
Its give me results but from a point much southeast then the point I asked (center of Paris) I think that something with the SRID but can't find the problem. Any ideas? Thanks asked 29 May '18, 11:56 altopalo |
You want to
Your query would only work if you had used -l (ell) during import. Caveat: Your query does not necessarily give you the results in the order "nearest to farthest" because you are using a projected coordinate system; you can experiment by having PostGIS give you the ST_Distance of (edit: removed a suggestion to use ST_DWITHIN, as I see that the KNN operator is already index-aware.) answered 29 May '18, 13:03 Frederik Ramm ♦ Tn'x, great help. For what I need, I don't really need the nearest order , just some roads around a point. I think I'll use the ST_DWITHIN as you suggest to get all roars in some distance from point instead.
(30 May '18, 11:14)
altopalo
|