You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 22 Next »

ArcGIS Enterprise Marketplace Linux image comes with ArcPy. Thus, it is possible to run MDCS script (in theory).


Step-by-step guide for Table / Raster Catalog

  1. Copy the entire contents of https://github.com/Esri/mdcs-py/blob/master/scripts/ to working directory.
  2. Modify raster_type section of MDCS.xml.

    <!-- AR - Add Rasters-->
      <AddRasters>
    	<AddRaster>
              <dataset_id>power</dataset_id>
              <raster_type>Table / Raster Catalog</raster_type>
    
    
  3. Specify table (in CSV) location.

              <Sources>
                <data_path>Z:\home\arcgis\data\LC08.csv</data_path>
              </Sources>
  4. Edit the Raster column of .csv file. It must be local and a raster proxy. You can test a sample raster proxy file from [2].

    OBJECTID,Variable,StdTime,StdTime_Max,StdZ,Raster
    0,ALL_SFC_SW_DN,2018-01-01 00:00:00,2018-01-01 00:59:59,2,"Z:\home\arcgis\data\LC08_L1TP_160043_20180326_20180404_01_T1\LC08_L1TP_160043_20180326_20180404_01_T1_B1.TIF"

Step-by-step guide for Raster Data Set

This is useful for creating a mosaic set from a set of TIF files that resides in a directory.

  1. Copy the entire contents of https://github.com/Esri/mdcs-py/blob/master/scripts/ to working directory.
  2. If you use Raster Dataset for rasterType, you can create mosaic from MRFs. Put MRF files under the data_path.

         <!-- AR - Add Rasters-->
          <AddRasters>
            <AddRaster>
              <dataset_id>power</dataset_id>
              <raster_type>Raster Dataset</raster_type>
              <Sources>
                <data_path>Z:\home\arcgis\data\cermrf</data_path>
              </Sources>
              <filter>*</filter>
            </AddRaster>
          </AddRasters>
  3. Disable DF and AI in MDCS.xml if you don't use Table / Raster Catalog for rasterType.

    <Application>
      <Name>CERES_Hourly_Solar</Name>                                               
      <!-- Command>CM+AR+SP+AF+CV+CC+BF+DF+CS+AI</Command -->                       
      <Command>CM+AR+SP+AF+CV+CC+BF+CS</Command>


MDTools_Setup.exe cannot be installed. MDTools is a set of command line tools that simplifies some common management tasks when working with rasters in a mosaic dataset.

Error 999999

Arcpy throws an error when it adds an item. This is a known issue for Linux platform according to Abhijit at Esri. It doesn't happen on Windows.

2020-01-28T17:26:58.118: Synchronizing items associated with raster type instan\
ce 'Table / Raster Catalog' [ID: 1].
2020-01-28T17:26:58.124: Error: 80042019: Could not build mosaic dataset item. \
[ID: 1, URI: 'Z:\home\arcgis\data\CERES.csv|0']
2020-01-28T17:26:58.127: Error: 80042019: Could not build mosaic dataset item. \
[ID: 2, URI: 'Z:\home\arcgis\data\CERES.csv|1']
2020-01-28T17:26:58.129: Error: 8004205e: 2 mosaic dataset items could not be b\
uilt.
...
log-msg: Command:AR->Add rasters/data to a mosaic dataset.
log-msg: Adding rasters:
log-msg:        Using mosaic dataset/ID:CERES_Hourly_Solar/power
log-msg:        Using ART for CERES_HOURLY_SOLAR: Table / Raster Catalog
log-msg: Adding items..
log-warning: Args less than required, filling with default (#)
log-msg: Calling (arcpy.AddRastersToMosaicDataset_management)
log-critical: ERROR 999999: Something unexpected caused the tool to fail. Conta\
ct Esri Technical Support (http://esriurl.com/support) to Report a Bug, and ref\
er to the error help for potential solutions or workarounds.
Failed to execute (AddRastersToMosaicDataset).

Installing Missing Packages

  1. conda install pip
  2. "z:\home\arcgis\bin\Python\envs\test\Scripts\pip.exe" install logger

Use of py cache (.pyc)  files and Python version

Use of solutionsLib.pyc is not compatible with Python3 [1]. Always use source https://github.com/Esri/mdcs-py/blob/master/scripts/solutionsLib.py.

Z:\home\arcgis\src\SDT-56>"z:\home\arcgis\bin\Python\envs\test\python.exe" MDCS.py 
Traceback (most recent call last):
  File "MDCS.py", line 34, in <module>
    import solutionsLib  # import Raster Solutions library
ImportError: bad magic number in 'solutionsLib': b'\x03\xf3\r\n'


References

  1. https://github.com/Miserlou/Zappa/issues/854
  2. https://www.esri.com/arcgis-blog/products/arcgis-pro/imagery/optimizerasters-2-released-available-for-download/
  • No labels