ArcGIS Server - snap point to line
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 .
source to share
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 [])
source to share