Solved! Go to Solution.
I am doing a lot of geoprocessing for a project where all my input layers need to be perfectly overlapping rasters. Some of my input data starts out as polygons, and I have been converting them to rasters. One of my "base" polygons has 2 fields I need, so I have been running the conversion twice, once on each field. I have been using maximum combined area but just discovered that this creates errors in the output. What I noticed was that, for example, I have field a and field b, and both contain value x. If a row in field a has value x, then the same row in field b also has value x. But when I run the conversion this is not true a very small percentage of the time. I realize that this is probably cause by doing the maximum combined area. But what would really be nice is if I could just convert the raster using both fields? Is there a way to do this if I went into python? Or is my only option to create a new attribute field that combines the previous 2, and convert based on that?
Thanks!
Maritza
Max combined area will give different output because the values may be different. See How Polygon To Raster works in the help.
Why don't you use the CELL_CENTER method
and use the polygon FC's object-id field and then join the polygon's attribute table to the rasters table and persist it to a new raster.
I'm not sure exactly what you are suggesting here. Are you suggesting doing the rasterization based on the object ID field rather than on the attribute field of interest?
I am doing a lot of geoprocessing for a project where all my input layers need to be perfectly overlapping rasters. Some of my input data starts out as polygons, and I have been converting them to rasters. One of my "base" polygons has 2 fields I need, so I have been running the conversion twice, once on each field. I have been using maximum combined area but just discovered that this creates errors in the output. What I noticed was that, for example, I have field a and field b, and both contain value x. If a row in field a has value x, then the same row in field b also has value x. But when I run the conversion this is not true a very small percentage of the time. I realize that this is probably cause by doing the maximum combined area. But what would really be nice is if I could just convert the raster using both fields? Is there a way to do this if I went into python? Or is my only option to create a new attribute field that combines the previous 2, and convert based on that?
Thanks!
Maritza