+ Reply to Thread
Results 1 to 6 of 6

Thread: How to merge raster files in ArcGIS?

  1. #1
    Hao Huang
    Join Date
    Apr 2010
    Posts
    13
    Points
    0
    Answers Provided
    0


    0

    Default How to merge raster files in ArcGIS?

    I tried merge function from Map algebra in the Spatial Analysis Toolbox, but doesn't work. who kow how to deal with it? Thanks a lot....

  2. #2
    Crystal Dorn
    Join Date
    Oct 2009
    Posts
    30
    Points
    4
    Answers Provided
    0


    1

    Default Need more information to help you...

    Without more details or a description of the error you received it's not possible to comment, for example, I assume you are using the Single Output Map Algebra tool?

    In the meantime, start with:
    Your Toolbox ENVIRONMENT settings, e.g. input projections and processing output projections, path to output workspace?, etc.

    Have you tried to use the Mosaic to New Raster tool?
    Crystal
    Esri California Regional Office
    @crystaldorn

  3. #3
    Jakub Sisak
    Join Date
    Apr 2010
    Posts
    466
    Points
    19
    Answers Provided
    1


    4

    Default

    ArcToolbox -> Data Management Tools -> Raster -> Raster Dataset -> Mosaic To New Raster

  4. #4

    Join Date
    Oct 2010
    Posts
    1
    Points
    0
    Answers Provided
    0


    0

    Wink Re: How to merge raster files in ArcGIS?

    Quote Originally Posted by jakubsisak View Post
    ArcToolbox -> Data Management Tools -> Raster -> Raster Dataset -> Mosaic To New Raster
    Yep, that works fine. Thanks a lot!

  5. #5
    Todd MacPherson
    Join Date
    Jun 2011
    Posts
    8
    Points
    1
    Answers Provided
    0


    0

    Lightbulb Re: How to merge raster files in ArcGIS?

    Thanks for this. An oldie but a goodie.

  6. #6
    Curtis Price

    Join Date
    Oct 2009
    Posts
    1,796
    Points
    874
    Answers Provided
    127


    2

    Default Re: How to merge raster files in ArcGIS?

    The real oldie and goody is merge(), which with "real" Con was removed at 10.0. (Though the rough edges of the Mosaic tool have been smoothed a bit (haha). Mosaic, being a core raster tool, is not integrated in arcpy map algebra, which is a pity.

    More map-algebra friendly replacements for the old (missing) merge function include:

    - CellStatistics with the "DATA" parameter, using an appropriate statistics choice in case there is overlap (For example - "MAXIMUM" or "MEAN")

    Code:
    CellStatistics([raster1, raster2, raster3], "MEAN", "NODATA")
    - Use Con and IsNull to get the first in the list that is non-NoData
    Code:
    Con(^ IsNull(raster1), raster1, Con(^ IsNull(raster2), raster2)))
    Con(^ IsNull(raster1), raster1, Con(^ IsNull(raster2), raster2, Con(^ IsNull(raster3), raster3)))
    - You can still use SOMA (this is only supported for backwards compatibility).

    Code:
    expr = "merge({0}".format(",".join[str(r) for r in [raster1, raster2, raster3]])
    tmpras  = arcpy.CreateScratchName("","","raster")
    outras = Raster(arcpy.gp.SingleOutputMapAlgebra_sa(expr,  tmpras))
    Please join me and vote this up!

    ideas.arcgis.com: Bring back Spatial Analyst Merge tool
    Last edited by curtvprice; 10-03-2013 at 11:58 PM. Reason: fix ideas link

+ Reply to Thread

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts