+ Reply to Thread
Results 1 to 5 of 5

Thread: Count polygons and polygon area that intersect with raster values

  1. #1
    Jonatan Larsson
    Join Date
    Apr 2012
    Posts
    3
    Points
    0
    Answers Provided
    0


    0

    Default Count polygons and polygon area that intersect with raster values

    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

  2. #2
    Marcin Gasior

    Join Date
    Oct 2010
    Posts
    450
    Points
    559
    Answers Provided
    91


    0

    Default Re: Count polygons and polygon area that intersect with raster values

    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.

  3. #3
    Jonatan Larsson
    Join Date
    Apr 2012
    Posts
    3
    Points
    0
    Answers Provided
    0


    0

    Default Re: Count polygons and polygon area that intersect with raster values

    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?

  4. #4
    Jonatan Larsson
    Join Date
    Apr 2012
    Posts
    3
    Points
    0
    Answers Provided
    0


    0

    Default Re: Count polygons and polygon area that intersect with raster values

    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)

  5. #5
    Marcin Gasior

    Join Date
    Oct 2010
    Posts
    450
    Points
    559
    Answers Provided
    91


    0

    Default Re: Count polygons and polygon area that intersect with raster values

    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:
    Click image for larger version

Name:	ScreenShot001.png
Views:	33
Size:	9.0 KB
ID:	13795

    Alternatively you can run Spatial Analyst Tools -> Reclass -> Reclassify directly from ArcCatalog:
    Click image for larger version

Name:	ScreenShot002.png
Views:	33
Size:	13.2 KB
ID:	13796

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

    Then use Select by Location (sorry for wrong name in previous post).
    Marcin Gąsior : GIS Analyst | Polish Academy of Sciences || GIS freelancer/consultant: e-mail

+ Reply to Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts