Jump to content

 
Photo

Adding two rasters together

- - - - -

  • Please log in to reply
5 replies to this topic

#1
snowgage

snowgage

    Key Contributor

  • Validated Member
  • PipPipPip
  • 56 posts
  • Gender:Male
  • Location:Bozeman, MT
  • United States

Good afternoon. I know this is simple but am missing something obvious.

I have two raster datasets that have cost-surface values (0-20). They both have the same extent (i.e. county boundary). The difference between the two is that one raster is a grid of land use and is continuous across the whole county. The other raster only represents public lands. Although it has the same extent as the whole county, there are some areas where the raster has no cells (i.e. private lands).

I am creating a cost surface and want to add the two together. When I do this using raster calculator, the resulting grid only occurs where both datasets overlap. Am I taking the wrong approach to adding the two grids together? Any suggestions?


thanks in advance,

Josh

#2
snowgage

snowgage

    Key Contributor

  • Validated Member
  • PipPipPip
  • 56 posts
  • Gender:Male
  • Location:Bozeman, MT
  • United States

Good afternoon. I know this is simple but am missing something obvious.

I have two raster datasets that have cost-surface values (0-20). They both have the same extent (i.e. county boundary). The difference between the two is that one raster is a grid of land use and is continuous across the whole county. The other raster only represents public lands. Although it has the same extent as the whole county, there are some areas where the raster has no cells (i.e. private lands).

I am creating a cost surface and want to add the two together. When I do this using raster calculator, the resulting grid only occurs where both datasets overlap. Am I taking the wrong approach to adding the two grids together? Any suggestions?


thanks in advance,

Josh


Figured it out..

Areas of private lands were valued as no-data. I reclassified these to equal 0. This way when I added the two together the no-data cells were effectively ignored.

Any other work arounds people would suggest?

cheers,

josh

#3
Adam Wilbert

Adam Wilbert

    Legendary Contributor

  • Validated Member
  • PipPipPipPipPip
  • 273 posts
  • Gender:Male
  • Location:Bellingham, WA, USA
  • United States

are you using a conditional statement? I'm thinking it needs to be something like "con (public_lands=nodata, land_use, public_lands+land_use)" so if the Public Lands raster is null, then it only returns the value of the Land Use raster, but if Public Lands has a value, then it adds the two together.

Adam Wilbert
CartoGaia.com & AdamWilbert.com
Lynda.com author of "Up and Running with ArcGIS"


#4
Laura Miles

Laura Miles

    Master Contributor

  • Validated Member
  • PipPipPipPip
  • 116 posts
  • Canada

Do you have spatial analyst? Maybe you could use "Con" to replace your NoData cells with something and then add the two rasters. I don't have access to SA right now so can't test it out...
Laura

#5
SaultDon

SaultDon

    Master Contributor

  • Validated Member
  • PipPipPipPip
  • 153 posts
  • Gender:Male
  • Location:BC
  • Interests:Environmental/Wildlife GIS, Aboriginal Land Use and Occupancy
  • Canada

Any other work arounds people would suggest?


New in ArcGIS 10 is the ability to Ignore_NoData in your analysis.

For instance, in your case, you wanted to Sum the rasters.

Use the Cell Statistics (Spatial Analyst) tool.

There will be a parameter in there called 'ignore_nodata' where you can toggle the inclusion or exclusion of nodata values from your overlay.

#6
CGIS

CGIS

    Contributor

  • Validated Member
  • PipPip
  • 37 posts
  • Gender:Male
  • Location:Canada
  • Canada

YOu could do this with IDRISI as well, very good at raster manipulation.




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users

-->