GeoEco.Datasets.ArcGIS.ArcGISRaster.CreateRaster

classmethod ArcGISRaster.CreateRaster(path, grid, overwriteExisting=False, **options)

Writes a Grid out as an ArcGIS raster.

This is a convenience function that is equivalent to:

from GeoEco.Datasets.ArcGIS import ArcGISWorkspace, ArcGISRaster

ws = ArcGISWorkspace(path=os.path.dirname(path),
                     datasetType=ArcGISRaster,
                     pathCreationExpressions=[os.path.basename(path)])

ws.ImportDatasets(datasets=[grid],
                  mode='Replace' if overwriteExisting else 'Add',
                  reportProgress=False,
                  options=options)
Parameters:
  • path (str) – ArcGIS catalog path to the raster to create. Minimum length꞉ 1.

  • grid (Grid) – Grid to write to the raster. It must be two dimensional.

  • overwriteExisting (bool, optional) – If True and path exists, it will be overwritten. If False and path exists, an error will be raised.

  • options (dict mapping str to object) –

    Additional options, which can include:

    • blockSize (int) - Number of bytes to read at a time from the grid and write to the raster. The default is 32*1024*1024 bytes (32 MB).

    • buildPyramids (bool) - If True, pyramids will be built for the raster using the BuildPyramids() geoprocessing tool.

    • buildRAT (bool) - If True, a raster attribute table will be built for the raster using the BuildRasterAttributeTable() geoprocessing tool.

    • calculateStatistics (bool) - If True, statistics and a histogram will be calculated using GDAL and written along with the raster in the appropriate format. Depending on the raster’s format, the statistics and histogram may be present in the raster file itself, or a “sidecar” file with the extension .aux.xml.

    • useUnscaledData (bool) - If True and grid has a scaling equation, the underlying unscaled data will be written out, rather than the scaled data that are normally of interest.