I have a polygon feature class. My objective is to convert the polygons into a raster. I want to write the index of the polygon (happens to be the key or OBJECTID) of the records in the attribute table.
I am getting incorrect values written. I tried adding a new field (short integer then text) and calculating the values for all members, but it didn't work. By "didn't work" I mean that instead of writing the index of the polygon, the tool wrote the index of the polygon +1 or +2, which makes no sense.
I'm attaching the attribute table of the raster for reference. Notice how after OBJECTID = 1969, Values no longer match.
do you have any multipart features?
Hi Dan,
I actually was not aware of such a thing. Not that I googled it, I do not have any of those.
Hi Marcel,
I wouldn't rely on OBJECTID to be strictly sequential and increasing. If you created your integer index field just by recalculating the object ID into it, the effect can be the same as using the object id directly. Use the code snippet to assign unique sequential ids that is in field calculator help. If you already did that, then I am not sure where the problem is.
Filip.
As far as i can see, PolygonToRaster is doing exactly what it says on the box.
Your ID is the Value column.
There are many reasons (like multiparts) why the Value column will not be the same as the OID in the attribute table