Select to view content in your preferred language

name 'mosaic' not defined - message

2726
3
Jump to solution
04-08-2011 08:03 AM
by Anonymous User
Not applicable
Original User: Jgregory

For many years I've used the raster calculator to mosaic DEMs. I can create mosaics through the 'mosaic' tool in "Raster Dataset", but I prefer to use the raster calculator for many analysis tasks.


In version 10, when trying to create a DEM mosaic in Raster Calculator I get the following error message...

<type 'exceptions.NameError'>: name 'mosaic' is not defined.

Does the new Raster Calculator not recognize 'mosaic' anymore, or am I missing something within the environments settings or somewhere else?
0 Kudos
1 Solution

Accepted Solutions
TimothyHales
Esri Notable Contributor
I am pretty sure that the 'mosaic' function does not work in the Raster Calculator since it was rewritten for ArcGIS 10 with the changes to the Spatial Analyst toolbar.  If you do not want to use the geoprocessing tools, I would suggest using the Python window instead.  You can find a sample of the mosaic code at the bottom of the help document:

Mosaic (Data Management)

View solution in original post

0 Kudos
3 Replies
TimothyHales
Esri Notable Contributor
I am pretty sure that the 'mosaic' function does not work in the Raster Calculator since it was rewritten for ArcGIS 10 with the changes to the Spatial Analyst toolbar.  If you do not want to use the geoprocessing tools, I would suggest using the Python window instead.  You can find a sample of the mosaic code at the bottom of the help document:

Mosaic (Data Management)
0 Kudos
by Anonymous User
Not applicable
Original User: Jgregory

Thanks for the reply.

If, in fact, 'mosaic' is no longer recognized in Raster Calculator, it's another head-scratcher from the developers.
I'd much rather type in a command instead of going through a toolset interface and a few pull-downs to accomplish something simple. But, I guess that's the 'old school' in me.
0 Kudos
TimothyHales
Esri Notable Contributor
Yeah, I understand your concern.  I think that the command functions are being pushed towards Python.  You can access the Spatial Analyst tools and functions through the Python window so there is less reliance on the raster calculator.  Although it can be difficult to adapt to the new software changes, there are many benefits to learning these new areas within the software.
0 Kudos