1

IF there are one or two urban cells in the Moore neighbourhood AND there is a road running through this cell.

How do I add this rule in my raster calculater?

2
  • Sorry, I forgot :IF there are one or two urban cells in the Moore neighbourhood And there is a road running through this cell THEN the cell is developed
    – maydk
    Oct 14, 2014 at 21:26
  • 1
    you could use a tool like Zonal Statistics - assuming you're using ArcGIS... are you using ArcGIS? - then do a selection on your output to determine which cells have more than 1 road running through, then select the neighborhoods that intersect those cells as being 'developed'... ? Oct 14, 2014 at 21:30

1 Answer 1

1

The general workflow would be:

  1. Create a raster with urban area cell values = 1
  2. Run Focal Statistics, using the default neighborhood (3x3) and statistics type = SUM ("urbansum"). Resulting values of 1 and 2 are of interest to you.
  3. Convert road lines to raster ("roadraster")
  4. In raster calculator, use a statement like:

    Con((urbansum == 1 or urbansum == 2) & roadraster, 1)

3
  • Thank you for answer. I have my "focal_statistic" raster for urban Development, and my roadraster "vej_raster". In raster calculator i wrote the statement: con(("focal_statistic"==1 or "Focal_statistic"==2) & "vej_raster",1) but got error 000539. Anyone who can help with that? And how do I write "to" in the calculator?
    – maydk
    Oct 15, 2014 at 17:34
  • Raster Calculator is case sensitive, so you need 'Con' and 'focal_statistic'.
    – phloem
    Oct 16, 2014 at 3:08
  • Okay. I have to ad the rule to another rule. First I got Con("Focal_statistic">=3,1,0). That Works ok. Then I shall add rule nr.2 and I have: Con("Focal_statistic">=3,1,0) AND Con(("Focal_statistic"==1 OR "Focal_statistic"==2) & "vej_raster",1) Then I get "invalid error" in raster calculator?
    – maydk
    Oct 16, 2014 at 4:33

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.