Nearest feature to a point?

628
5
06-15-2010 01:12 AM
sunilm
by
New Contributor
Hi All,

I want nearest feature to the point(on map click) in all layers?

Thanks in Advance
Sunil
0 Kudos
5 Replies
sunilm
by
New Contributor
Hi Adam,

Thanks for the reply,
Here it takes two points as input means do we need to check this for every feature in the layer(point layer).

What about incase of Line or Polygon feature class(layer). How can we find it out?
0 Kudos
nicogis
MVP Frequent Contributor
You can create (with 10 version) a rest soe
http://proceedings.esri.com/library/userconf/devsummit10/papers/tech/extending_ags_services_using_.n...

and on server work with spatial index (every square have list of ids contained) then you try nearest from ids in square.
0 Kudos
BillDaigle
Occasional Contributor III
You could publish a geoprocessing toolbox using the "Generate Near Table" tool.  This worked for us but required an upgrade to ArcGIS Server Advanced Edition.
0 Kudos
GaneshSolai_Sambandam
New Contributor III
You could publish a geoprocessing toolbox using the "Generate Near Table" tool.  This worked for us but required an upgrade to ArcGIS Server Advanced Edition.


Hi william
Can you post some code snippets for this, please? this would help lot of other people who wanted to use your code.

Regards

Ganesh
0 Kudos