Count polygons and polygon area that intersect with raster values

1453
4
04-24-2012 01:11 AM
JonatanLarsson
New Contributor
Hi,

Something tells me this is an easy task, but I can't figure out how to do this. Searching gave me no answers, perhaps I'm using to wrong search words.

Anyway, I have a polygon layer where I want to count the number of uniques polygons that intersect with a raster... or perhaps overlap is a better word. Also, I want to only include the higher values of the raster and have in the symbology removed the lower values, but I'm not shure if this only is a visualisation option or if it will work also in the needed calculations?

Second, I want to know the total area of the overlap between all the polygons and the rasters higher values.

Is my question understandable?

TIA.

/ Jonatan
0 Kudos
4 Replies
MarcinGasior
Occasional Contributor III
First you have to extract "the higher values of the raster". You would need Spatial Analyst extension.
To extract values from raster you can use:
Spatial Analyst Tools -> Extraction -> Extract by Attributes. In Where Clause build en expression which values you want.

Then you need to convert output raster to polygon:
Conversion Tools -> From Raster -> Raster to Polygon. Uncheck 'Simplify polygons' if you want exact raster shape.

Then you have two vector layers which you can Search by Location.
0 Kudos
JonatanLarsson
New Contributor
Thanks for this response.

I used the "extraction by attribut"-tool with the clause expression "Value >= 0,05", which partly works. The NoValue-value doesn't follow to the new raster, which means that the new raster has the extracted values that I wanted and the value -3,4e+038 everywhere else. The new NoValue-value is for some reason set to 3.

Also tried the raster to polygon conversion, but that didn't worked. Quick googleing tells me that the raster must be an integer? Should be a quick fix after the extraction is sorted out.

Not shure about the later "search by location", but perhaps I figure it out when I have come that far. If you have time, can ju elaborate please?
0 Kudos
JonatanLarsson
New Contributor
Ok, I found an alternative way.

1) Raster to points, every pixel becomes a point with a values.
2) Selection by attribut, "Value >= 0.05"
3) Selection by location, select from current selection, source polygon-layer.

As every point represent a 1x1 meter square, the number of selected points becomes a approximation of the area I was looking for. The error I think is negligible for my intended use.

For the polygon count I just reverse the third step, using the point-layer with selected points as source and the polygon-layer as target.

I still very new to GIS, so please correct me if I'm have made any error in thinking, or if I'm just using the wrong terms/phrases 🙂

Now, going to perform this to a number of rasters. Not so many that it is impossible, but I'm thinking of doing some kind of script too reduce the number of clicks. Never done any scripts. Is it hard? Would it be possible for the particular case?

Cheers 🙂

(Happy because I found a way;))
0 Kudos
MarcinGasior
Occasional Contributor III
To extract from floating point raster you can use CON command in Raster Calculator:
in ArcMap add your raster to the Table of Contents, run Spatial Analyst Tools -> Map Algebra -> Raster Calculator.
Then type: con("FloatingPointRaster" >= 0.05, 1) , where '1' is value of output integer raster.
Look at example:
[ATTACH=CONFIG]13795[/ATTACH]

Alternatively you can run Spatial Analyst Tools -> Reclass -> Reclassify  directly from ArcCatalog:
[ATTACH=CONFIG]13796[/ATTACH]

Then you schouldn't have any problem to convert raster to polygon.

Then use Select by Location (sorry for wrong name in previous post).
0 Kudos