Update raster VAT with overlayed polygon shapefile?

530
4
10-27-2022 04:05 PM
jbkosu
by
New Contributor

I have a raster and a polygon shapefile that line up perfectly, where each grid cell in the raster corresponds to a rectangle in the shapefile (diagram below). Each rectangle in the shapefile has a floating point value. Is there an easy way to assign those to corresponding cells in the raster?

raster_and_shapefile_diagram.png

Thanks.

0 Kudos
4 Replies
Luke_Pinner
MVP Regular Contributor

No. But you can just convert your polygon to a new raster with those values. Don't forget to set cell size, extent and snap raster environments appropriately.

0 Kudos
jbkosu
by
New Contributor

Thanks Luke. I tried that already and it ran for more than 24 hours w/o finishing so I killed it, and am looking for a work-around (which is why I asked the question).

The polygon shapefile has 3000x1000=3M rectangles, and is about 400MB in file size. The polygon shapefile was created by running "create fishnet" from the raster, and it took about 45 minutes on my machine, so I thought going the other way would take about the same amount of time, but it's taking much longer.

0 Kudos
Luke_Pinner
MVP Regular Contributor

If you're generating the polygon values using some formula, you can apply that formula to the raster directly (if you have a spatial analyst license).

Alternatively, convert the raster to points not polygons or tick the label points when creating your fishnet, populate the points with your values instead of the polys then convert the points to raster, it'll be quicker. 

Since you already have the polys, another option is convert your polys to point and then convert those to raster. 

0 Kudos
jbkosu
by
New Contributor

Brilliant! I'll try poly to points.

(The raster was in geographic coords and I needed to calculate area, so I created fishnet polys from the raster, projected to Albers, which calculated poly areas, then re-projected the fishnet polys back to geographic, and was trying to save the area values as raster.)

Thanks a mil

0 Kudos