Divide raster values based on municipality boundaries

811
5
Jump to solution
03-01-2022 04:58 AM
Labels (2)
Deepa
by
New Contributor III

Hi,

I have a raster file of a county with value 1 (Best sites to build rails) and NoData (unsuitable areas for rails). I also have a shape file of all the municipalities within this county. I would like to combine these files such that the final attribute table of the raster will have the cell counts with value 1 for each municipality. I can export each municipality and then combine with the raster to solve this. But is there a better and easy way to solve this?

Thank you!

Tags (2)
0 Kudos
3 Solutions

Accepted Solutions
JeffHouser
Occasional Contributor

I have not tried this, but have you looked into "Spatial Analyst Tools - Zonal - Zonal Statistics as Table". 
https://gis.stackexchange.com/questions/251796/extract-raster-information-based-on-polygon-features

 Last step, is to do a tabular join back to the Raster data.  Again, I have not done this, but it seemed appropriate to what you're trying to do?  This functionality, if it works, may prevent the need to vectorize the raster date set.

View solution in original post

Deepa
by
New Contributor III

Thanks David and Jeff 🙂 

It worked with Zonal statistics as table using my polygon file of municipalities and raster file with values.

 

 

View solution in original post

0 Kudos
5 Replies
DavidPike
MVP Frequent Contributor

Can you better describe your intended final output and possibly provide screenshots.

0 Kudos
Deepa
by
New Contributor III

Right now, i have raster file with values 1 for a county. There are some NoData within the county which i am not interested in further analysis. Attribute table looks like this :

OBJECTIDVALUECOUNT
1120

 

Within the county there are 3 municipalities and i have a shape file of this. Attribute table looks like this:

OBJECTIDShapeMunicipality_names
1PolygonABC
2PolygonDEF
3PolygonGHI

 

I would like to combine them spatially such ´that i  get a final attribute table like this:

OBJECTIDMunicipality_namesValueCount
1ABC110
2DEF15
3GHI15

 

 

0 Kudos
DavidPike
MVP Frequent Contributor
JeffHouser
Occasional Contributor

I have not tried this, but have you looked into "Spatial Analyst Tools - Zonal - Zonal Statistics as Table". 
https://gis.stackexchange.com/questions/251796/extract-raster-information-based-on-polygon-features

 Last step, is to do a tabular join back to the Raster data.  Again, I have not done this, but it seemed appropriate to what you're trying to do?  This functionality, if it works, may prevent the need to vectorize the raster date set.

Deepa
by
New Contributor III

Thanks David and Jeff 🙂 

It worked with Zonal statistics as table using my polygon file of municipalities and raster file with values.

 

 

0 Kudos