Creating Seamless Raster Mosaic

4727
6
04-02-2012 12:25 PM
KaileyCooper
New Contributor
I used the "Mosaic to New Raster" tool to create a mosaic of DEM's.

Now I want to make them seamless so I can do watershed analysis on them. I am using ArcGIS 10 and the code I was given to use in the Raster Calculator is not working.
I got the code from this video: http://www.youtube.com/watch?v=qJHCbEVbMv0

They appear to be using an older version and have a code for ArcGIS 10, but that is not working either.

These are the codes I was given:

Con(IsNull(â??myrasterâ?�),FocalStatistics(â??myrasterâ?�,NbrRectang¬le(2,2),â?�MEANâ?�),â?�myrasterâ?�) - this is for ArcGIS 10


[seemless] = con(isNull([mosaic]),focalmean([mosaic],rectangle,2,2),[mosaic]) - this is for the older version. [seemless] would be the name of the file I am generating and mosaic is the file I already created.


Do you have any suggestions on making this work? Much appreciated!!
Tags (2)
0 Kudos
6 Replies
TarunJaiswal
Esri Contributor
Greetings!

Please try the following syntax:
Con(IsNull("myraster"), FocalStatistics("myraster", NbrRectangle(2,2, "CELL"), "MEAN"), "myraster")

Also, here is a link to a Knowledge Base - Technical Article on this subject

Remove and replace no data values within a raster using statistical information from the surrounding...

Hope this helps.

Thank you.
0 Kudos
DarrenWiens2
MVP Honored Contributor
NbrRectang¬le(2,2)

Is there really a strange character in there?
0 Kudos
KaileyCooper
New Contributor
Thank you so much!

That worked - saved me so much more stress! 🙂
0 Kudos
KaileyCooper
New Contributor
Is there really a strange character in there?


No - It must have done that when I copied it. oops!
0 Kudos
KaileyCooper
New Contributor
Greetings!

Please try the following syntax:
Con(IsNull("myraster"), FocalStatistics("myraster", NbrRectangle(2,2, "CELL"), "MEAN"), "myraster")

Also, here is a link to a Knowledge Base - Technical Article on this subject

Remove and replace no data values within a raster using statistical information from the surrounding...

Hope this helps.

Thank you.


Thank you so much!

That worked - saved me so much more stress! 🙂
0 Kudos
DarrenWiens2
MVP Honored Contributor
Greetings!

Please try the following syntax:
Con(IsNull("myraster"), FocalStatistics("myraster", NbrRectangle(2,2, "CELL"), "MEAN"), "myraster")


Tarun, the only difference between your statement and cooperkn's is the additional of the units parameter ("CELL"), which is clearly labelled in the help pages as optional. Is this, in fact, not optional? If so, how does a person report errors in the help documentation?

edit: nevermind, I found the feedback button. We'll see if it gets changed.
0 Kudos