How do I create a measureLine between two objects in ArgGISEngine 10 - VB.Net 2008?

898
3
04-19-2011 12:24 PM
DougMarquardt
New Contributor
In MapObjects there was a built-in method to create a measureline between two objects (in this case, between a polygon and a polyline/point) in code without user interaction.  However, I can't seem to figure out how to do this with ArcGISEngine 10.1.

Can someone point me in the right direction here.

Thanks.

Doug.
0 Kudos
3 Replies
DougMarquardt
New Contributor
I found this in the help file and it looks like it might work...

Dim nr As New ESRI.ArcGIS.AnalysisTools.Near(inFeatures, nearFeatures)

But there is no example on how to use this???
0 Kudos
JohnHauck
Occasional Contributor II
Near is one of the geoprocessing tools and you have options for its usage:

Using geoprocessing

Geoprocessor managed assembly


It sounds like you will be working with a couple of specific geometries. The geoprocessing tools in .NET do not support the input of a geometry directly. It must be contained in a feature class or feature set for example. However, most of the geoprocessing tools will honor selection sets on input layers and this is typically how you would work with a single, or reduced set, of features from a given feature class when using the geoprocsssing tools in .NET. In Python serveral convience methods are provided to assit you with direct input of geometires.



Another option would be to use IProximityOperator. This will allow you to work with geometry objects directly.
0 Kudos
DougMarquardt
New Contributor
I have a polyline from one layer and I want to check some polygons from a search query in another layer and figure out the nearest point in the polygon.

I thought Near was what I needed but I will check out IProximityOperator as well.  Guess I'll get reading up on both and see if I can't figure out how to get them working.

Thanks.



Near is one of the geoprocessing tools and you have options for its usage:

Using geoprocessing

Geoprocessor managed assembly


It sounds like you will be working with a couple of specific geometries. The geoprocessing tools in .NET do not support the input of a geometry directly. It must be contained in a feature class or feature set for example. However, most of the geoprocessing tools will honor selection sets on input layers and this is typically how you would work with a single, or reduced set, of features from a given feature class when using the geoprocsssing tools in .NET. In Python serveral convience methods are provided to assit you with direct input of geometires.



Another option would be to use IProximityOperator. This will allow you to work with geometry objects directly.
0 Kudos