Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

Using C# and ArcObjects, what is the recommended way to convert a raster file into a polygon. I need this for calling the Near tool so that I can move a station which may be inland to the nearest water feature. I have googled and really not found anything useful yet. There is a lot for taking a polygon to a Raster but not the other way around.

share|improve this question
add comment

2 Answers 2

up vote 1 down vote accepted

If you want to avoid geoprocessing (which is typically slow), have a look at IConversionOp interface:

http://help.arcgis.com/en/sdk/10.0/arcobjects_net/componenthelp/index.html#//002400000016000000

Haven't used it myself but it seems to offer what you're looking for.

share|improve this answer
add comment

Your best option is calling the Raster to Polygon (Conversion) geoprocessing tool. Note that your raster must be of the integer type.

If you want to convert your entire raster to a polygon you can use the Int (Spatial Analyst) geoprocessing tool.

You can use the Con (Spatial Analyst) geoprocessing tool to select parts of your input raster and produce an integer raster at the same time. This is useful, for example, if you want to create a polygon representing areas within the raster that have values greater than an input value (e.g. all elevations above 500m).

share|improve this answer
    
Radar! That looks great and I think I actually looked at that. I have one problem, though, how do I create a blank FeatureSet. That was one of my sticking points! –  SASS_Shooter Dec 19 '13 at 17:05
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.