| 1 | <?xml version="1.0" encoding="utf-8"?> |
|---|
| 2 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> |
|---|
| 3 | <html xmlns="http://www.w3.org/1999/xhtml"><head><link rel="stylesheet" type="text/css" href="81help.css?format=raw" /><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>Find and Move Rasters</title></head><body><table style="margin-top:-1em; margin-bottom:0; padding:0; margin-left:-1em"><tr><td style="background:white"><img width="875" height="70" alt="ArcToolbox banner" src="AHBanner_ArcToolbox.gif?format=raw" /></td></tr></table><h1>Find and Move Rasters</h1><p></p><p>Finds and moves rasters in an ArcGIS workspace.</p><p>Unlike the ArcGIS geoprocessor's CopyRaster tool, this tool does |
|---|
| 4 | not crash ArcGIS when copying rasters to a destination directory that |
|---|
| 5 | already contains several hundred rasters. For more information on this |
|---|
| 6 | ArcGIS bug, see |
|---|
| 7 | <a href="http://forums.esri.com/Thread.asp?c=93&f=1729&t=196716&mc=0">http://forums.esri.com/Thread.asp?c=93&f=1729&t=196716&mc=0</a>.</p><br /><p><h2><img width="11" height="11" border="0" src="sm_arrow_down.gif?format=raw" /> Command line syntax</h2></p><div Class="expand" id="id103145">ArcGISRasterFindAndMove_GeoEco <inputWorkspace> <outputWorkspace> {wildcard} {searchTree} {rasterType} {destinationRasterPythonExpression} {modulesToImport;modulesToImport...} {skipExisting} <br /><br /><b>Parameters</b><br /><table width="100%" border="0" cellpadding="5"><tbody><tr><th width="40%"><b>Expression</b></th><th width="60%"><b>Explanation</b></th></tr><tr><td class="info"><inputWorkspace></td><td class="info" align="left"><p>Workspace to search.</p></td></tr><tr><td class="info"><outputWorkspace></td><td class="info" align="left"><p>Workspace to receive the rasters.</p></td></tr><tr><td class="info">{wildcard}</td><td class="info" align="left"><p>Wildcard expression specifying the rasters to find. Please see the |
|---|
| 8 | documentation for the ArcGIS geoprocessor's ListRasters function for |
|---|
| 9 | more information about the syntax. At the time of this writing, only |
|---|
| 10 | the * wildcard character was supported, which would match zero or more |
|---|
| 11 | of any character.</p></td></tr><tr><td class="info">{searchTree}</td><td class="info" align="left"><p>If True, child workspaces will be searched.</p></td></tr><tr><td class="info">{rasterType}</td><td class="info" align="left"><p>Type of rasters to find. If provided, only rasters of this type |
|---|
| 12 | will be found. Please see the documentation for the ArcGIS |
|---|
| 13 | geoprocessor's ListRasters function for more information. At the time |
|---|
| 14 | of this writing, the ArcGIS 9.2 documentation specified that any of |
|---|
| 15 | the following strings would be accepted: All, ADRG, BIL, BIP, BSQ, |
|---|
| 16 | BMP, CADRG, CIB, ERS, GIF, GIS, GRID, STACK, IMG, JPEG, LAN, SID, SDE, |
|---|
| 17 | TIFF, RAW, PNG, NITF.</p></td></tr><tr><td class="info">{destinationRasterPythonExpression}</td><td class="info" align="left"><p>Python expression used to calculate the absolute path of a |
|---|
| 18 | destination raster. The expression may be any Python statement |
|---|
| 19 | appropriate for passing to the eval function and must return a Unicode |
|---|
| 20 | string. The expression may reference the following variables:</p><ul><li><p>workspaceToSearch - the value provided for the workspace to search |
|---|
| 21 | parameter</p></li></ul><ul><li><p>destinationWorkspace - the value provided for the destination |
|---|
| 22 | workspace parameter</p></li></ul><ul><li><p>sourceRaster - the absolute path to the source raster</p></li></ul><p>The default expression:</p><dl><dt></dt><dd><pre>os.path.join(destinationWorkspace, sourceRaster[len(workspaceToSearch)+1:])</pre></dd></dl><p>stores the raster in the destination workspace at the same relative |
|---|
| 23 | location it appears in the workspace to search. The destination path |
|---|
| 24 | is calculated by stripping the workspace to search from the source |
|---|
| 25 | path and replacing it with the destination workspace.</p><p>For more information on Python syntax, please see the <a href="http://www.python.org/doc/">Python |
|---|
| 26 | documentation</a>.</p></td></tr><tr><td class="info">{modulesToImport;modulesToImport...}</td><td class="info" align="left"><p>Python modules to import prior to evaluating the expression. If |
|---|
| 27 | you need to access Python functions or classes that are provided by a |
|---|
| 28 | module rather than being built-in to the interpreter, list the module |
|---|
| 29 | here. For example, to be able to use the datetime class in your |
|---|
| 30 | expression, list the datetime module here. In your expression, you |
|---|
| 31 | must refer to the class using its fully-qualified name, |
|---|
| 32 | datetime.datetime.</p></td></tr><tr><td class="info">{skipExisting}</td><td class="info" align="left"><p>If True, moving will be skipped for destination rasters that already exist.</p></td></tr></tbody></table></div><p><h2><img width="11" height="11" border="0" src="sm_arrow_down.gif?format=raw" /> Scripting syntax</h2></p><div Class="expand" id="TEST">ArcGISRasterFindAndMove_GeoEco (inputWorkspace, outputWorkspace, wildcard, searchTree, rasterType, destinationRasterPythonExpression, modulesToImport, skipExisting) <br /><br /><b>Parameters</b><br /><table width="100%" border="0" cellpadding="5"><tbody><tr><th width="40%"><b>Expression</b></th><th width="60%"><b>Explanation</b></th></tr><tr><td class="info">Workspace to search (Required) </td><td class="info" align="left"><p>Workspace to search.</p></td></tr><tr><td class="info">Destination workspace (Required) </td><td class="info" align="left"><p>Workspace to receive the rasters.</p></td></tr><tr><td class="info">Wildcard expression (Optional) </td><td class="info" align="left"><p>Wildcard expression specifying the rasters to find. Please see the |
|---|
| 33 | documentation for the ArcGIS geoprocessor's ListRasters function for |
|---|
| 34 | more information about the syntax. At the time of this writing, only |
|---|
| 35 | the * wildcard character was supported, which would match zero or more |
|---|
| 36 | of any character.</p></td></tr><tr><td class="info">Search workspace tree (Optional) </td><td class="info" align="left"><p>If True, child workspaces will be searched.</p></td></tr><tr><td class="info">Raster type (Optional) </td><td class="info" align="left"><p>Type of rasters to find. If provided, only rasters of this type |
|---|
| 37 | will be found. Please see the documentation for the ArcGIS |
|---|
| 38 | geoprocessor's ListRasters function for more information. At the time |
|---|
| 39 | of this writing, the ArcGIS 9.2 documentation specified that any of |
|---|
| 40 | the following strings would be accepted: All, ADRG, BIL, BIP, BSQ, |
|---|
| 41 | BMP, CADRG, CIB, ERS, GIF, GIS, GRID, STACK, IMG, JPEG, LAN, SID, SDE, |
|---|
| 42 | TIFF, RAW, PNG, NITF.</p></td></tr><tr><td class="info">Destination raster Python expression (Optional) </td><td class="info" align="left"><p>Python expression used to calculate the absolute path of a |
|---|
| 43 | destination raster. The expression may be any Python statement |
|---|
| 44 | appropriate for passing to the eval function and must return a Unicode |
|---|
| 45 | string. The expression may reference the following variables:</p><ul><li><p>workspaceToSearch - the value provided for the workspace to search |
|---|
| 46 | parameter</p></li></ul><ul><li><p>destinationWorkspace - the value provided for the destination |
|---|
| 47 | workspace parameter</p></li></ul><ul><li><p>sourceRaster - the absolute path to the source raster</p></li></ul><p>The default expression:</p><dl><dt></dt><dd><pre>os.path.join(destinationWorkspace, sourceRaster[len(workspaceToSearch)+1:])</pre></dd></dl><p>stores the raster in the destination workspace at the same relative |
|---|
| 48 | location it appears in the workspace to search. The destination path |
|---|
| 49 | is calculated by stripping the workspace to search from the source |
|---|
| 50 | path and replacing it with the destination workspace.</p><p>For more information on Python syntax, please see the <a href="http://www.python.org/doc/">Python |
|---|
| 51 | documentation</a>.</p></td></tr><tr><td class="info">Python modules to import (Optional) </td><td class="info" align="left"><p>Python modules to import prior to evaluating the expression. If |
|---|
| 52 | you need to access Python functions or classes that are provided by a |
|---|
| 53 | module rather than being built-in to the interpreter, list the module |
|---|
| 54 | here. For example, to be able to use the datetime class in your |
|---|
| 55 | expression, list the datetime module here. In your expression, you |
|---|
| 56 | must refer to the class using its fully-qualified name, |
|---|
| 57 | datetime.datetime.</p></td></tr><tr><td class="info">Skip existing outputs (Optional) </td><td class="info" align="left"><p>If True, moving will be skipped for destination rasters that already exist.</p></td></tr></tbody></table></div></body></html> |
|---|