Replies: 2 comments
-
I think the issue may be my coordinate input. If I switch my map coordinate readout to EPSG:3857, I get coordinates in the format (-10879095.23298, 3536445.71090). I'm unsure how to convert '-97.7285,30.25583' to '-10879095.23298, 3536445.71090' |
Beta Was this translation helpful? Give feedback.
0 replies
-
This was in fact due to using the wrong coordinate format. When switching to meters (epsg 3857) my queries worked |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
My problem is that I need to find the edge that is closest to a point, and ideally also how far away and how far from one end of the edge. The point is an arbitrary location selected by a user via clicking on a map. My goal is to route the user to the closest edge (basically draw a line from the point to the closest edge), then route them to the edge closest to another point on the map, which was found by a nearest neighbor lookup. I have imported a network into PostGIS, 'noded' the edge data, created topology, and I can route to any two vertexes with no issues. When I run this SQL:
I get no results. I have confirmed via QGIS that there IS an edge close to the point
(ST_MakePoint(-97.7285,30.25583)
. I have set the tolerance to 100m to make it abnormally large, the point in the example is just a few meters from the nearest edge.Am I misunderstanding how I can use
pgr_findCloseEdges
to find the edge closest to a point?Beta Was this translation helpful? Give feedback.
All reactions