How can I run ExportMosaicDatasetData from a script?

830
2
03-27-2017 01:33 PM
deleted-user-De598MZ4-kwO
New Contributor

Suppose I have a master collection of elevation data stored as a mosaic, with something like ZOrder to grade the data sources from best to worst.  I need to extract the best data to an output raster using an extent, cell size, and mask of my choosing.  I need to do this often for various needs and users, and want to automate this task.

The ArcGIS documentation lists two methods:  CopyRaster and ExportMosaicDatasetData.  The CopyRaster tool is fine for what it does, but is slow and will not apply a mask and, more importantly it won't change the cell size for me.  So it's worthless for my purposes.  The ExportMosaicDatasetData tool does everything I need, as long as I set up a graphic in ArcMap to control the extent and mask.  It's a good tool.  However, it only seems to run interactively as a dialog box within ArcMap.  I don't know of a way to get it into a Python script.  Solutions?

Can someone tell me what kind of resampling is used by ExportMosaicDatasetData?

As a smaller part of the same general problem, I would like to convert selected features from a layer into a graphic, but again this only seems to be available interactively by using a dialog box.  Is there a way to "ConvertFeaturesToGraphics" within a script?

Thanks for any help.  New to this forum, Tim.L

0 Kudos
2 Replies
DanPatterson_Retired
MVP Emeritus

do you have the link?  I see export, geometry, items and paths... ie

export-mosaic-dataset-items and the code examples are at the end of none of those are the ones to which you refer.

0 Kudos
HongXu
by Esri Contributor
Esri Contributor

If you want to output a mosaic (not the items of the mosaic) with a rectangle or a polygon mask, it is better to use Clip GP tool . It allows you to set a clip polygon, and you also have a choice of maintaining the clipping extent (but adjusting cell size) or maintain cell size and alignment by slightly adjusting extent. Note, the resampling method is defined in the environment setting. If you want resample to a specific the cell size, you can run Resample GP tool. 

0 Kudos