How to create new raster files and assign values using information from other raster layers?

1441
7
03-13-2017 08:33 AM
Zihan_Lin
New Contributor III

Hi all, I want to create a new raster file and need some guidance. The first screenshot displays the current raster file I have. And I want to enlarge its spatial extent to the rectangular boundary and assign 0 to the newly-added pixels. How can I make it using ArcMap? Any ideas will be highly appreciated! Thanks!

Tags (1)
0 Kudos
7 Replies
AbdullahAnter
Regular Contributor II

Your question is not clear.

What are you want to do in details?

0 Kudos
Zihan_Lin
New Contributor III

Thanks for the reply. I've compiled my question and hopefully it's clear now.

0 Kudos
AbdullahAnter
Regular Contributor II

Do you want to assign 0 value to new pixels to fit rectangle extent?

0 Kudos
Zihan_Lin
New Contributor III

Yes. Exactly.

0 Kudos
PROBERT68
Frequent Contributor

Are you talking about the values that has no "zero" values in their attribute Table ?

0 Kudos
IanMurray
Frequent Contributor

Probably the easiest this would be to create a constant raster with a value of 0 then with the same cell size as your existing raster layer but the extent of your rectangle.  Then you could use any number of raster calculator functions to create a new raster with both rasters as inputs such as the Plus Tool to add them together or use a Over function to copy over the cells from the original where they already exist and apply 0 values to areas where they did not exist before(Unless you have some negative values in your original raster, please look at the raster math toolbox to find the tool to suit your need).  Please take into account what you are using for a snap raster environment, since likely your cells will not perfectly overlap and you will want to shift the constant raster to your existing data, instead of the reverse.

Constant Raster - https://desktop.arcgis.com/en/arcmap/10.4/tools/spatial-analyst-toolbox/create-constant-raster.htm

Over - https://desktop.arcgis.com/en/arcmap/10.4/tools/spatial-analyst-toolbox/over.htm

Plus - https://desktop.arcgis.com/en/arcmap/10.4/tools/spatial-analyst-toolbox/plus.htm

Snap Raster Environment - https://desktop.arcgis.com/en/arcmap/10.4/tools/environments/snap-raster.htm

0 Kudos
AbdullahAnter
Regular Contributor II

What is you license ?

and Do you have Spatial Analyst ?

0 Kudos