ArcGIS Enterprise Marketplace Linux operating system comes with ArcPy. Thus, it is possible to run Mosaic Dataset Configuration Script (MDCS) script (in theory).
Step-by-Step Guide for Creating a Table/Raster Catalog
- Copy the entire contents of mdcs-py/blob/master/scripts to working directory
- Modify raster_type section of MDCS.xml
- Specify table (in comma-separated value [CSV]) location
- Edit the Raster column of input table .csv file. It must be local and a raster proxy. You can test a sample raster proxy file from OptimizeRasters 2.0. You can use a VRT file here if you'd like to use MRF in S3.
- If you want to visualize mosaic dataset with ArcGIS Pro on a Windows machine, set the path that exists in both the Windows Server and the Linux Server. You can keep adding more VRT files as long as object id and time are unique.
- To make the visualization work, make sure that the Windows Server has S3FullAccess role attached in the EC2 instance. Then, check that the Source value in the VRT file starts with
vsis3/
.
Step-by-Step Guide for a Raster Dataset
This is useful for creating a mosaic set from a set of TIF files that resides in a directory.
- Copy the entire contents of the MDCS Python scrips from GitHub to a working directory
- If you use Raster Dataset for rasterType, you can create mosaic from MRFs. Put the MRF files under the
data_path
- Disable DF and AI in MDCS.xml if you don't use Table / Raster Catalog for rasterType
Note: 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 the 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
- conda install pip
- "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. Always use the GitHub MDCS source.
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' </module>
Troubleshooting
If MDCS hangs, try to restart the server using the startup scripts under /arcgis/server/
.
References
GitHub, Miserlou/Zappa: bad magic number in 'application': b'\x03\xf3\r\n': ImportError #854
ArcGIS Blog: OptimizeRasters 2.0 released, available for download