0

What I want to do :

input: raster file, polygon feature layer

process:

  1. Convert raster to polygon using IConversionOp.RasterDataToPolygonFeatureData Method
  2. Intersect resultant polygon feature class and input feature layer using Intersect tool from my c# code.

I am doing these two steps perfectly. But I need some specific field from intersected layer for next steps. So it would be helpful if I can specify field names in intersected layer. But I could not find any way to specify field names.

It would be helpful if anyone can give me some idea how to specify some field names. If there is any process to take fields from one feature class and not from another feature class in intersect tool, that will also solve my problem. Or when I am converting a raster to a feature class, can I specify the value field name? Or is there any rule for value field name in the newly created feature class from the raster layer. By default the field of this value field in feature class is "GRIDCODE".

  • You can specify a field name if you use the Geoprocessing tool RasterToPolygon – kenbuja May 15 '13 at 12:53
  • @kenbuja: I go through [Raster to Polygon (Conversion) ][1]. I only find a field that take raster field name. But it only take "Value"/"Count" to the polygon in the output. It does not take any name that I prefer [1]: help.arcgis.com/en/arcgisdesktop/10.0/help/index.html#//… – Emi May 16 '13 at 3:03
1

I am answering this question from my observation. I can be wrong.

  • Raster to polygon conversion takes a raster field name which value directly goes under "grid_code" field in the polygon feature class. The "grid_code" field creates when some one use arc-toolbox. But If someone use IConversionOp.RasterDataToPolygonFeatureData Method, the field name will be "GRIDCODE" in the polygon feature class. So the value field name is always constant.

  • After raster to polygon conversion, five fixed field will be created every time. So, all these are constant. So, if I need the grid code value, I can hard coded "GRIDCODE" in my add-in.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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