Extending an existing raster extent.

12240
10
04-14-2010 06:34 PM
CedricWannaz
New Contributor
Dear all,

     If have a raster which covers part of the globe (say [-180,180] longitude and [-53, 85] latitude), that I want to use in map algebra computations with other rasters that are global. For the reduced raster not to reduce the extent of the output of these computations, it seems to me that I have to replace its NoData pixels with values, as well as to extend it so it covers the whole globe.

    I can reclassify the NoData (to 0 or to the global average), but I still have a reduced extent. I created a constant value raster that covers the globe and I was hoping to find a way to combine them, but I have not been very successful so far.

    Could anybody tell me how to proceed (using the toolbox if possible, and not "edition by hand")?


Thank you and best regards,

Cedric
0 Kudos
10 Replies
EricRice
Esri Regular Contributor
Hi Cedric,

Hopefully I understand this correctly.  It sounds like the raster with the smaller extent doesn't even have NoData pixels that would make it have a global extent which is why you are seeing a minimized extent returned on your computations.  To create these NoData pixels, set the analysis extent (SA toolbar > Options > Extent tab) to be one of your global rasters.  In the raster calculator simply evaluate your non global extent raster.  The result should look identical to the original but have lots of NoData pixels now and a global extent.  You can confirm by displaying NoData pixels as a particular color on the symbology tab.

From here you can do a few things.  One, continue your computations but embed a Con(IsNull)) type statement in your expression.  Essentially what I'm saying is, where your formerly non global extent raster contains NoData (null), do one calculation, where it is not null, do some other calculation.

If you don't like that approach, you can reclassify NoData to be 0 like you suggested in your initial post.  This is assuming values of 0 won't impact your computations.  We wouldn't want you to multiply or divide by 0 probably. 🙂

If you�??re not comfortable with the raster calculator you can use the Copy Raster GP tool and set the output extent in the environments equal to one of your global rasters.
0 Kudos
CedricWannaz
New Contributor
Hi Eric,

     Thank you very much for your answer and sorry for not having reacted earlier. I will follow your advices and update this message right after.

Best regards,

Cedric
0 Kudos
SamuelGeorgian
New Contributor
Hello,

I am trying to do basically the same thing (extend the extent of one of my rasters to match the extent of a larger raster, by adding no data pixels). I have tried to copy the raster and set the extent to my global raster but I always get an error message. If I set the extent spatial analyst, what do I need to enter into the raster calculator to evaluate the raster to have the new extent?

Thank you
0 Kudos
EricRice
Esri Regular Contributor
Greetings,

In Spatial Analyst, Input Raster + 0 is basically the same as copying the raster.

Eric
0 Kudos
AaronKing
New Contributor II
Greetings,

In Spatial Analyst, Input Raster + 0 is basically the same as copying the raster.

Eric


That is all well and good, except that it does not work.  I set the extent to a larger area than my raster and the output just ignores that and reproduces the same raster with no expanded extent.

i cannot believe this is so hard.
0 Kudos
EricRice
Esri Regular Contributor
Aaron,

How are you verifying the extent was not expanded?  You wouldn't notice just by displaying the output of "input +0".  You have to display NoData (symbology tab) as a color, or review the Extent tab in the layer properties to veryify the change.

Best,
Eric
0 Kudos
MeToo
by
New Contributor

Hi Eric,

This is still not working for me.

I have set the extent of the raster layer to that of a larger one; have the display the NoData turned on via the Layer Properties dialog. It shows an extended area, but when I try to generate a new raster with the maximum values from the small raster and correct size raster via CellStatistics, the result raster has the extent of my small raster and not of the larger one, which is what I need.

I have also experimented with the Con and IsNull tools, but no luck in expanding the small raster to the extent of the larger one.

Please advise,

Thanks

0 Kudos
MeToo
by
New Contributor

I found an easy way to do this:

  1. Start ArcMap with the raster layer that is too small
  2. Set the extent of the data frame to what you would like the output raster to be
  3. Right-click on the small raster > Data > Export Data
  4. In the Export Raster Data dialog, make sure Extent is set to Data Frame (Current)
  5. Et voila.
0 Kudos
MeToo
by
New Contributor

Actually, since my posting, I found out that it wasn't as simple as "Et voila" because of what I believe is a bug in ArcMap 10.3. For some rasters, the Export Raster Data dialog changes the extent that was set manually to the data frame (by zooming in ArcMap). In my case, it only considered about half the height of the data frame extent! My workaround: zoom far out enough and then export the raster.

After enlarging the raster beyond the extent that I needed (with NoData cells), I have tried to clip it back to a smaller area that I needed, but ArcMap had a problem there too. This data being mainly intermediary for my CellStatistics calculations, it wasn't too much of a problem.

I hope this helps.

0 Kudos