ArcGIS Server - snap point to line

If I have a point and a road network, how do I find the closest point on the road? those. it's like anchoring a point to a line / road.

I am using ArcGis 9.3 server with Java 5 and Oracle 10g. I am using ST and NetworkAnalyst functions via java api.

Thank.

+1


source to share


2 answers


Parts of the net must be created from lines or curves. Therefore, each of its functions must inherit the interface ICurve

that implements the method queryPointAndDistance()

. Using this method and your point, you should get the nearest points on each function you want.



If you want to know the closest function, you need to go through a set of functions (like you traced earlier) and compare the parameters distanceFromCurve

for each function. See JavaDoc: http://resources.esri.com/help/9.3/arcgisengine/java/api/arcobjects/com/esri/arcgis/geometry/ICurve.html .

0


source


Use INALocator.queryLocationBypoint () . You can create a NALocator from your NAContext. Go to "Locator" and it will "tie" the point to the road network.



URL button doesn't work. JavaDoc link http://resources.esri.com/help/9.3/ArcGISengine/java/api/arcobjects/com/esri/arcgis/networkanalyst/INALocator.html#queryLocationByPoint(com.esri.arcgis.geometry.IPoint , com .esri.arcgis.networkanalyst.INALocation [], com.esri.arcgis.geometry.IPoint [], double [])

0


source







All Articles