Mosaic to new raster - resample during output

4976
8
Jump to solution
10-06-2015 04:58 AM
BenLeslie1
Occasional Contributor III

Hello

I am applying a blend to a mosaic dataset that contain two rasters with differing resolutions. I am then outputting the blended image to a tiff.

When I view the mosaic dataset in Arc it looks super smooth and super cool because I have used chosen:

Resample during display = Bilinear Interpolation

Smooth_blend.jpg

However when I "Mosaic to new raster" to output my tiff, the Bilinear Interpolation is not used and the lower resolution portions of output look really blocky and uncool.

Blocky_blend.jpg

Is there a way to output my tif using Bilinear Interpolation? - to have to resample my source image before adding it to the mosaic seems crazy because it will create, what seems to me to be, unnecessary steps and an extra unnecessary large file on my system.

The environment setting for pyramids does not have the desired effect.

0 Kudos
1 Solution

Accepted Solutions
GabrielUpchurch1
Occasional Contributor III

A few things to consider:

1. I don't think Mosaic To New Raster is the best way to accomplish this.  I would try right-clicking on the Image layer of the mosaic dataset in ArcMap and selecting "Export Data" to export to a tiff.

2. As an alternative to the above method, I would try the Copy Raster tool with the mosaic dataset as input and save the output as a tiff.

3.  If for some reason neither of the above methods works, be sure to specify a cell size in the Mosaic to New Raster tool and also to specify Bilinear for the "Resample" option of the Raster Storage section in the Environment Settings of the tool.

View solution in original post

8 Replies
GabrielUpchurch1
Occasional Contributor III

A few things to consider:

1. I don't think Mosaic To New Raster is the best way to accomplish this.  I would try right-clicking on the Image layer of the mosaic dataset in ArcMap and selecting "Export Data" to export to a tiff.

2. As an alternative to the above method, I would try the Copy Raster tool with the mosaic dataset as input and save the output as a tiff.

3.  If for some reason neither of the above methods works, be sure to specify a cell size in the Mosaic to New Raster tool and also to specify Bilinear for the "Resample" option of the Raster Storage section in the Environment Settings of the tool.

BenLeslie1
Occasional Contributor III

Gabriel, thank you - are you able to expain why you eschew the Mosaic To New Raster (afterall I'm trying to create a new raster from a mosaic)?  Furthermore, MTNR allows me to select "Blend" as the mosaic method and the output cellsize - maybe it's a security blanket but I like to set these because they are important to me.

Currently testing - don't know if your suggestions work for me yet.

0 Kudos
GabrielUpchurch1
Occasional Contributor III

I wouldn't say that I eschew the Mosaic To New Raster tool.  In this particular situation, it just seems that it may be a redundant step.  For clarification, it is not the Mosaic Dataset To New Raster tool.  The Mosaic To New Raster tool is intended to merge multiple raster datasets into a new raster dataset.  The Mosaic tool is similar except it requires an existing raster dataset to mosaic into.  Mosaic datasets, the Mosaic To New Raster tool, and the Mosaic tool all perform mosaicking operations (i.e., they do the same general thing).  Since you have already mosaicked the datasets by adding them to a mosaic dataset and achieved the desirable rendering, you should (in theory) just need to create a single file copy of the mosaic dataset (using one of the two options I suggested).  If you browse to the mosaic dataset in Catalog and open its properties, you will see similar parameters under the "Defaults" tab to what you find in the Mosaic To New Raster tool.

One thing to keep in mind is that the mosaicking operations may not yield identical results when performed by the mosaic dataset versus the Mosaic To New Raster tool.  Furthermore, I am not sure how the Mosaic To New Raster tool handles a mosaic dataset as input.  The main question I have is does it see the input as a single raster or does it pull in the source rasters and process them directly?  If you know what settings you need to apply in the Mosaic To New Raster tool, you can add the individual raster datasets directly to the tool and skip the mosaic dataset altogether. In my opinion, you are adding a layer of complexity to the process by adding the mosaic dataset to the tool instead of just mosaicking the individual datasets directly or creating a copy from the mosaic dataset.

BenLeslie1
Occasional Contributor III

As far as I can tell from my tests:

1. "Export Data" - this works

2. Copy Raster - this works so long as the Environments-->Raster Storage-->Resampling Method is set to BILINEAR.

3.  Mosaic To New Raster - this does not work irrespective of the Resampling Method setting.

Thanks,

Ben.

0 Kudos
BenLeslie1
Occasional Contributor III

Note:  poor documentation on this subject

ArcGIS Help (10.2, 10.2.1, and 10.2.2)

Python syntax unclear.

Once I work it out I might write here what the correct version is..... if I can be bothered.....

DoingESRI'sjob​

0 Kudos
GabrielUpchurch1
Occasional Contributor III

What is your specific concern with the documentation?

With such a large amount of documentation to maintain there are bound to be mistakes.  Unfortunately, with the constant need to update existing documents and release new documents, issues are unlikely to be corrected unless Esri is made aware of them.  A constructive way to deal with potential documentation issues is to use the "Feedback" button in the upper right corner of the document (see screenshot below) or to contact Esri Support.

Feedback.jpg

BenLeslie1
Occasional Contributor III

Anyway, your reply is helpful, I was not aware of the feedback button -

The specific issue is that the docs list the syntax as:

first - arcpy.env.resample

then - arcpy.env.resamplingmethod

when the actual syntax is:

arcpy.env.resamplingMethod

0 Kudos
GabrielUpchurch1
Occasional Contributor III

The document is clearly incorrect for both examples making it a good candidate for the Feedback button.  I checked the 10.3 documentation and the correct syntax is provided:  Resampling Method (Environment setting)—Help | ArcGIS for Desktop .

0 Kudos