Merging Raster files

4450
13
05-16-2017 12:04 AM
Labels (1)
AnanG
by
New Contributor II

I want to merge many landuse raster data. Each raster file has its own different kinds of landuse type. 

When I try to merge all of them (I have like 30+ raster files) the "Mosaic to New Raster" tool gives me an output with only 4 (the minimum number of unique values in one of the raster files) types of landuse file. 

I also tried using "Combine" tool with (< 20 files) but it didn't work.

How can I merge all the landuse raster files and also get 7 unique values in the final output?

0 Kudos
13 Replies
DanPatterson_Retired
MVP Emeritus

do they overlap in extent?

are they adjacent with no overlap?

Answers to these questions might suggest whether a reclass is necessary for some or all the files or whether a merge/mosaic in combination with a combine is necessary

0 Kudos
AnanG
by
New Contributor II

What do you mean by "overlap in extent"? They all have the same geographic coordinate system.

Prior to merging, I previously reclassified them with landuse categories from 1 to 7. 

0 Kudos
DanPatterson_Retired
MVP Emeritus

extent.... left right, top bottom... are they all the same or are they side-by-side or are there some that overlap

0 Kudos
AnanG
by
New Contributor II

Hi Dan, 

One of the tiles seem to be overlapping. Here is the extent. 

0 Kudos
DanPatterson_Retired
MVP Emeritus

so you have to check that they are all in the same coordinate system.  Your example is in decimal degrees, hence a Geographic Coordinate System.  When you do a merge, or anything with multiple files, you have to decide whether you are working with the union (ie combination) of their extents... what to do with overlaps (if any), what to do with gaps (spaces between adjoining layers), the final cell size (if any differ) and a variety of other things.  This is why I said that it may be a combination of steps/processes and a one-button solution may not be possible.  So figure out exactly what you have and how to proceed incrementally.  It is apparent from your previous attempt that something got left out during the process... you have to figure out why.  There is nothing wrong with combining a couple of files that you know are adjacent without overlaps etc... then proceed to introduce other files as you go.

AnanG
by
New Contributor II

I checked my files again and all their extents are different. I also noticed a small gap between the adjoining layers. 

How do I make sure there are no gaps and also make the extents uniform? Thanks, Dan! Appreciate your help! 

0 Kudos
AnanG
by
New Contributor II

Dan_Patterson‌ - Hi again!

I unified the extent of the each file by exporting the data and changing the pixel size to a uniform size (0.00054). I just merged it again but could not get the output. I checked the coordinate system too, it looks alright. What else could I be doing wrong?

0 Kudos
DanPatterson_Retired
MVP Emeritus

This option looks like you are getting on track, it appears that the colour maps differ, and I would check the cell sizes of these to ensure that they are the same. Then examine the options in mosaic to ensure that you get everything aligned and color matched.  I would do this with copies,... you can mosaic to new raster, but that tool keeps saying mosaic has more options.  the mosaic dataset option is another to look at depending on what you want to do

AnanG
by
New Contributor II

How would you suggest me to match the colours? I used the "Mosaic Dataset Option" only to get a black coloured raster that looked like DEM. I need to put all the coloured landuse maps together for landuse analysis. 

0 Kudos