Select to view content in your preferred language

calculate overlapping rasters

5427
5
02-21-2016 11:57 PM
JensBerglund
New Contributor II

Hi,

I am trying to identify overlapping raster pixels and having trouble using the right tool.

I am working with two raster datasets;

1. Farmland out of production, 2 classes

- crops
- pasture

2. Valuable nature - 5 classes

  - pasture

  - meadow

  - not defined

  - inactive

  - restorable

I would like to analyse which and how much crops / pasture are out of production in areas of valuable nature.

I have tried raster calculator, clip and combine. None have worked.

When trying the combine tool I am given a table with 73 combinations in the new raster dataset. In the "farmland"-column there are values from 1 to 5 and in the "valuable nature" - column there are values from 1 to 24.

Any toughts on what I am doing wrong?

0 Kudos
5 Replies
AjitkumarBabar
Occasional Contributor II

Go through this link;

Overlay analysis

This might help you

0 Kudos
JensBerglund
New Contributor II

In the help section you suggested, they suggests overlay tools that will not help me in this case. Except for "combine".

I would like to combine my two raster datasets so I get;

1 (crops) 2 (pasture) 1-5 (second dataset)

1     -     1-5

2     -     1-5

But I am given 73 combinations instead.

Anyone who knows why?

0 Kudos
NeilAyres
MVP Alum

On the face of it. you should have 10 possible combinations.

Are the 2 raster exactly the same pixel size? Are they aligned (does the edge of each pixel overlay)?

If not you will have to resample one to fit the other.

And BTW, are you using projected coordinates?

JayantaPoddar
MVP Esteemed Contributor

Let me put it in a Raster Calculator, as an example. (Apology for the lengthy expression)

Raster 1: "farmland"

               Values: Crops = 1

                            Pastures = 2

Raster 2: "Valuable_Nature"

               Values: pasture = 1

                              meadow = 2

                              not defined = 3

                              inactive = 4

                               restorable = 5

Con(("farmland" == 1) & ("valuable_Nature" == 1), 11, (Con(("farmland" == 1) & ("valuable_Nature" == 2), 12, (Con(("farmland" == 1) & ("valuable_Nature" == 3), 13,(Con(("farmland" == 1) & ("valuable_Nature" == 4), 14,(Con(("farmland" == 1) & ("valuable_Nature" == 5), 15,(Con(("farmland" == 2) & ("valuable_Nature" == 1), 21,(Con(("farmland" == 2) & ("valuable_Nature" == 2), 22,(Con(("farmland" == 2) & ("valuable_Nature" == 3), 23,(Con(("farmland" == 2) & ("valuable_Nature" == 4), 24,(Con(("farmland" == 2) & ("valuable_Nature" == 5), 25, 0))))))))))



Think Location
0 Kudos
JensBerglund
New Contributor II

For some reason it suddenly worked !!!!!

Reclassified all NoData to "0" and ReRun, then it worked with 18 combinations (since it Counts NoData"!

Thanks for all the help!