CARIS HIPS and SIPS Help : CARIS Batch Utility : BASE Editor Processes : Export Raster
 

Export Raster

Description

The ExportRaster process exports a raster dataset in one format to another format. The output raster will have the same coordinate reference system, geographic extents and values as the input raster.

Inputs

A raster dataset in a supported format.

Outputs

A raster dataset in the specified output format or S-102 exchange set and metadata.

Command Line Syntax

carisbatch --run ExportRaster --output-format <value> [options] <input> <output>

User Interface Command

Export Raster

Options

The following table describes the parameters available for this process.

Parameter

 

Long

Short

Description

Can Repeat

Notes

 

Common Options

--output-format

O

A string specifying the format in which the output is generated. One of:

BAG: The Bathymetry Attributed Grid raster surface format.

ESRI_ASCII: The ESRI ASCII raster surface format.

USGS_DEM: The USGS Digital Elevation Map raster surface format.

GEOTIFF: The GeoTIFF raster format. This may be a raster surface or a raster image, depending on the input.

PNG: The Portable Network Graphics raster image format.

JPEG: The JPEG raster image format, with a compression factor of 75%.

S102: The S-102 edition 2.1 or 2.2 exchange set format.

S102ed3: The S-102 edition 3 exchange set format.

CSAR: The CSAR raster format. This may be a raster surface or a raster image, depending on the input.

Options specific to each format are specified below.

FALSE

This must be specified explicitly.

ExportRasterTo = BAG

--include-band

b

A string specifying the name of a band to include in the output.

The band must contain elevation data.

FALSE

This must be specified explicitly.

--uncertainty

t

A string specifying the name of the uncertainty band in the input.

FALSE

--uncertainty-type

U

A string specifying the source of uncertainty data stored in the input as per the BAG metadata profile. One of:

STDDEV_RAW: Raw standard deviation

STDDEV_CUBE: CUBE standard deviation

PRODUCT_UNCERT: Product uncertainty

STDDEV_HISTORICAL: Historical standard deviation

TPE_AVERAGE: Average total propagated error

UNKNOWN: Unknown

FALSE

This must be specified explicitly.

--compression-level

o

A number specifying the level of compression applied to the output.

The default value is 1. The valid range is 0 to 9, not compressed to highly compressed.

FALSE

--abstract

a

A string containing the description of the output as per ISO 19115.

FALSE

This must be specified explicitly.

--status

s

A string specifying the status of the input as per ISO 19115. One of:

COMPLETED: Complete

ARCHIVE: Historical archive

OBSOLETE: Obsolete

ONGOING: Ongoing

PLANNED: Planned

REQUIRED: Required

UNDER_DEV: Under development

FALSE

This must be specified explicitly.

--vertical-datum

D

A string specifying the vertical datum of the input as per ISO 19115.

FALSE

This must be specified explicitly.

--party-name

M

A string specifying the name of the responsible party as per ISO 19115.

FALSE

--party-position

S

A string specifying the position of the responsible party as per ISO 19115.

FALSE

--party-organization

o

A string specifying the organization of the responsible party as per ISO 19115.

FALSE

--party-role

R

A string specifying the role of the responsible party as per ISO 19115. One of:

RESOURCE_PROVIDER: Resource provider

CUSTODIAN: Custodian

OWNER: Owner

USER: User

DISTRIBUTOR: Distributor

ORIGINATOR: Originator

POINT_OF_CONTACT: Point of contact

PRINCIPAL_INVESTIGATOR: Principal investigator

PROCESSOR: Processor

PUBLISHER: Publisher

AUTHOR: Author

FALSE

This must be specified explicitly.

--legal-constraints

L

A string specifying the legal constraints of the output as per ISO 19115. One of:

COPYRIGHT: Copyright

PATENT: Patent

PATENT_PENDING: Patent pending

TRADEMARK: Trademark

LICENSE: License

IP_RIGHTS: Intellectual property rights

RESTRICTED: Restricted

OTHER_RESTRICTIONS: Other restrictions

FALSE

This must be specified explicitly.

--other-constraints

C

A string specifying details of the legal constraints.

ISO 19115 requires that this option must be set if LegalConstraints is set to OTHER_RESTRICTIONS. It is optional otherwise.

FALSE

This option is conditional on LegalConstraints.

--security-constraints

A

A string specifying the security constraints of the output. One of:

UNCLASSIFIED: Unclassified

RESTRICTED: Restricted

CONFIDENTIAL: Confidential

SECRET: Secret

TOP_SECRET: Top secret

FALSE

This must be specified explicitly.

--notes

N

A string specifying notes about the output as per ISO 19115.

FALSE

This must be specified explicitly.

Refer to Export Coverage Metadata for additional BAG metadata profile details.

ExportRasterTo = ESRII ASCII

--include-band

b

A string specifying the name of a band to include in the output.

FALSE

This must be specified explicitly.

--decimal-precision

d

A number specifying the decimal precision for floating point numeric values.

The default value is 3.

FALSE

ExportRasterTo = USGS_DEM

--include-band

b

A string specifying the name of a band to include in the output.

FALSE

This must be specified explicitly.

--decimal-precision

d

A number specifying the decimal precision for floating point numeric values.

The default value is 3.

FALSE

ExportRasterTo = GEOTIFF

--include-band

b

A string specifying the name of a band to include in the output.

The ALL keyword is used to include all bands in the output.

TRUE

At least one band must be specified.

--compression

C

A string specifying the type of compression applied to the output GeoTIFF. One of:

NONE: No compression.

LZW: Lossless LZW compression.

DEFLATE: Lossless Deflate compression.

JPEG: Lossy JPEG compression. Compression 85%.

The default is LZW, where applicable.

JPEG compression is only supported if the input band is an RGB or RGBA colour band

FALSE

--create-tfw

If set, georeferencing information is also written to a TFW file.

This allows using the resulting GeoTIFF in third‑party applications that do not read the georeferencing information embedded in the GeoTIFF file.

FALSE

ExportRasterTo = PNG

--include-band

b

A string specifying the name of a band to include in the output.

FALSE

This must be specified explicitly.

ExportRasterTo = JPEG

--include-band

b

A string specifying the name of a band to include in the output.

FALSE

This must be specified explicitly.

ExportRasterTo = S102

--s102-version

V

The S-102 format version to output. The value must be one of 2.1 or 2.2.

The default value is 2.1.

FALSE

--primary-band

m

A string specifying the name of the input band to be used as the primary band of the output.

The default value is the primary elevation band of the input raster surface.

FALSE

This must be specified explicitly.

--uncertainty

t

A string specifying the name of the uncertainty band in the input.

If this option is not specified, no Uncertainty band is created in the output.

FALSE

--uncertainty-type

U

A string specifying the source of uncertainty data stored in the input as per the BAG metadata profile. One of:

STDDEV_RAW: Raw standard deviation

STDDEV_CUBE: CUBE standard deviation

PRODUCT_UNCERT: Product uncertainty

STDDEV_HISTORICAL: Historical standard deviation

TPE_AVERAGE: Average total propagated error

UNKNOWN: Unknown

FALSE

This must be specified explicitly.

-s100-vertical-datum

S

The vertical datum of the raster input as per S-100. One of:

meanLowWaterSprings

meanLowerLowWaterSprings

meanSeaLevel

lowestLowWater

meanLowWater

lowestLowWaterSprings

approximateMeanLowWaterSprings

indianSpringLowWater

lowWaterSprings

approximateLowestAstronomicalTide

nearlyLowestLowWater

meanLowerLowWater

lowWater

approximateMeanLowWater

approximateMeanLowerLowWater

meanHighWater

meanHighWaterSprings

highWater

approximateMeanSeaLevel

highWaterSprings

meanHigherHighWater

equinoctialSpringLowWater

lowestAstronomicalTide

localDatum

internationalGreatLakesDatum1985

meanWaterLevel

lowerLowWaterLargeTide

higherHighWaterLargeTide

nearlyHighestHighWater

highestAstronomicalTide

internationalGreatLakesDatum2020

seaFloor

seaSurface

hydrographicZero

FALSE

This must be specified explicitly.

--contributor-band

A string specifying the contributor band in the input to map to the sourceSurveyID of the quality of survey data.

Optional. If no value is specified, but the input has a Contributor band, the Contributor band is used.

This option can only be specified if S102Version is set to 2.2 or greater.

FALSE

--abstract

a

A string containing the description of the output as per ISO 19115.

FALSE

This must be specified explicitly.

--party-name

M

A string specifying the name of the responsible party as per ISO 19115.

FALSE

--party-position

S

A string specifying the position of the responsible party as per ISO 19115.

FALSE

--party-organization

o

A string specifying the organization of the responsible party as per ISO 19115.

FALSE

--party-role

R

A string specifying the role of the responsible party as per ISO 19115. One of:

RESOURCE_PROVIDER: Resource provider

CUSTODIAN: Custodian

OWNER: Owner

USER: User

DISTRIBUTOR: Distributor

ORIGINATOR: Originator

POINT_OF_CONTACT: Point of contact

PRINCIPAL_INVESTIGATOR: Principal investigator

PROCESSOR: Processor

PUBLISHER: Publisher

AUTHOR: Author

FALSE

This must be specified explicitly.

Refer to Export Coverage Metadata for additional S-102 metadata profile details.

--metadata

Specify this option to export the metadata of the raster surface to an S-102 metadata xml file.

FALSE

ExportRasterTo = S102ed3

--primary-band

m

A string specifying the name of the input band to be used as the primary band of the output.

The default value is the primary elevation band of the input raster surface.

FALSE

This must be specified explicitly.

--uncertainty

t

A string specifying the name of the uncertainty band in the input.

FALSE

If this option is not specified, no Uncertainty band is created in the output.

-s100-vertical-datum

S

The vertical datum of the raster input as per S-100. One of:

meanLowWaterSprings

meanLowerLowWaterSprings

meanSeaLevel

lowestLowWater

meanLowWater

lowestLowWaterSprings

approximateMeanLowWaterSprings

indianSpringLowWater

lowWaterSprings

approximateLowestAstronomicalTide

nearlyLowestLowWater

meanLowerLowWater

lowWater

approximateMeanLowWater

approximateMeanLowerLowWater

meanHighWater

meanHighWaterSprings

highWater

approximateMeanSeaLevel

highWaterSprings

meanHigherHighWater

equinoctialSpringLowWater

lowestAstronomicalTide

localDatum

internationalGreatLakesDatum1985

meanWaterLevel

lowerLowWaterLargeTide

higherHighWaterLargeTide

nearlyHighestHighWater

highestAstronomicalTide

internationalGreatLakesDatum2020

seaFloor

seaSurface

hydrographicZero

FALSE

This must be specified explicitly.

--contributor-band

A string specifying the contributor band in the input to map to the Quality Of Bathymetry Coverage. This is done by mapping a Contributor band from the input CSAR raster to the corresponding output elements in the featureAttributeTable of the S102 file.

Any contributor string table attributes in the specified band that match the column names in the featureAttributeTable will be mapped to those columns automatically. If none of the attributes match the column names, then the entire contributor string attribute is written to sourceSurveyID column by default.

FALSE

This parameter is optional, but must be specified to output the Quality of Bathymetry Coverage data.

--contributor-band-mapping-file

A string specifying the path to a file that maps contributor band attributes to Quality Of Bathymetry Coverage attributes.

This is only needed if the attribute names in the contributor band do not match the column names in the featureAttributeTable and/or if the contributor band attributes need to be mapped to specific column names rather than the defaults.

FALSE

This option can only be specified if ContributorBand has also been specified.

--edition

The edition number of the dataset.

Only positive integers are supported. If not set, 1 is used by default.

FALSE

--issue-date

The issue date of the dataset.

FALSE

The current date is used if this is not specified.

--issue-time

The issue time of the dataset.

FALSE

The current time is used if neither Issue Date nor Issue Time are specified.

--producer-code

A string of 4 characters for the producer code according to the IHO Geospatial Information Registry. The registry can be found at IHO Geospatial Information Registry.

The only characters that are supported are A to Z and 0 to 9.

FALSE

This must be specified explicitly.

--filename-suffix

A string of up to 12 characters to uniquely identify the bathymetry dataset.

The only characters that are supported are A to Z, 0 to 9, and underscores.

FALSE

--organization-namepace

A string for the organization namespace used in the datasetID.

The only characters that are supported are a to z, 0 to 9, and hyphens.

FALSE

--catalogue-defaults

A string specifying the path to a file containing default values used in the output CATALOG.XML file.

This file must be in the same format as a CATALOG.XML file. Programmatically-determined values will override any default values specified in this file. Any user-specified process options take precedence over the static defaults file.

FALSE

This must be specified explicitly.

--description

A string with a short description giving the area or location covered by the dataset.

If this option is not specified, and an abstract is stored in the source file metadata, the abstract is used. Otherwise, a value in the Catalogue Defaults File will be used, if one exists.

FALSE

--comment‘

A string with additional information about the dataset.

FALSE

If not specified, a value in the Catalogue Defaults File will be used, if one exists.

--copyright

A string specifying whether the dataset is copyrighted.

One of the following:

TRUE: The dataset is copyrighted.

FALSE: The dataset is not copyrighted.

Specifying a value for this option overrides any value in the defaults file.

FALSE

If not specified, a value in the Catalogue Defaults File will be used, if one exists.

If a default value has not been defined, this option must be specified.

--not-for-navigation

A string specifying whether or not the dataset is intended to be used for navigation.

One of the following:

TRUE: The dataset is not intended to be used for navigation.

FALSE: The dataset is intended to be used for navigation.

Specifying a value for this option overrides any value in the defaults file.

FALSE

If not specified, a value in the Catalogue Defaults File will be used, if one exists.

If a default value has not been defined, this option must be specified.

--navigation-purpose

A string specifying the navigational purpose of the dataset.

One of the following:

PORT: For port and near shore operations

TRANSIT: For coast and planning purposes

OVERVIEW: For ocean crossing and planning purposes

Specifying a value for this option overrides any value in the defaults file.

TRUE

If not specified, a value in the Catalogue Defaults File will be used, if one exists.

If a default value has not been defined, this option must be specified.

--classification

A string specifying the security constraints of the output.

One of the following:

UNCLASSIFIED: Unclassified

RESTRICTED: Restricted

CONFIDENTIAL: Confidential

SECRET: Secret

TOP_SECRET: Top secret

SENSITIVE: Sensitive but unclassified

OFFICIAL_USE_ONLY: For official use only

PROTECTED: Protected

LIMITED_DISTRIBUTION: Limited distribution

Specifying a value for this option overrides any value in the defaults file.

FALSE

If not specified, a value in the Catalogue Defaults File will be used, if one exists.

If a default value has not been defined, this option must be specified.

MinimumDisplayScale

A number representing the minimum (smallest) scale with which the data is intended to be displayed (1:Minimum Display Scale).

This is specified as an integer, decimals are not supported.

Specifying a value for the minimum display scale overrides any value in the defaults file.

FALSE

If not specified, a value in the Catalogue Defaults File will be used, if one exists.

OptimumDisplayScale

A number representing the compilation scale for the data (1:Optimum Display Scale).

This is specified as an integer, decimals are not supported.

The data is overscaled if displayed at any higher scale.

Specifying a value for the optimum display scale overrides any value in the defaults file.

FALSE

If not specified, a value in the Catalogue Defaults File will be used, if one exists.

MaximumDisplayScale

A number representing the maximum (largest) scale with which the data is intended to be displayed (1:Maximum Display Scale).

The data is "grossly overscaled" if displayed at any higher scale.

This is specified as an integer, decimals are not supported.

Specifying a value for the maximum display scale overrides any value in the defaults file.

FALSE

If not specified, a value in the Catalogue Defaults File will be used, if one exists.

--bathymetry-output

The S-102 exchange set bathymetry HDF5 file.

FALSE

--catalogue-output

The S-102 exchange set CATALOG.XML file.

FALSE

ExportRasterTo = CSAR

--include-band

b

A string specifying the name of a band to include in the output.

The ALL keyword is used to include all bands in the output.

TRUE

At least one band must be specified.

Example

To use this command refer to the following examples.

Example

Objective

You want to export a gridded surface to ESRI ASCII format.

Description

Command Line Syntax

The output format will be ESRI ASCII.

--output-format ESRI_ASCII

The Depth attribute of the source surface is to be exported.

--include-band Depth

The source surface is Surface.csar, located in the D:\BatchSample directory.

D:\BatchSample\Surface.csar

The resulting output will be created in the D:\BatchSample directory with the name ESRIASCII_Export.asc.

D:\BatchSample\ESRIASCII_Export.asc

Command Line

carisbatch --run ExportRaster --output-format ESRI_ASCII --include-band Depth D:\BatchSample\Surface.csar D:\BatchSample\ESRIASCII_Export.asc

Outcome

The source surface is exported to the selected format according to the options specified.

Extra Notes

N/A

Example

Objective

You want to export a raster surface to BAG format.

Description

Command Line Syntax

The output format will be BAG.

--output-format BAG

The Depth band is to be included.

--include-band Depth

The uncertainty data should be exported from the Uncertainty band.

--uncertainty Uncertainty

The uncertainty type is Average total propagated error.

--uncertainty-type TPE_AVERAGE

A compression level of 9 will be applied to the resulting output.

--compression-level 9

The following metadata information will be defined for the resulting data:

Status = Completed

Vertical datum = Mean low water

Party role = Custodian

Party Organization = Company Name

Legal constraints = Copyright

Security constraints = Unclassified

Notes = This is a sample note.

--status COMPLETED

--vertical-datum meanLowWater

--party-role CUSTODIAN

--party-organization "Company Name"

--legal-constraints COPYRIGHT

--security-constraints UNCLASSIFIED

--notes "This is a sample note."

The input surface is RasterSurface.csar and can be found at D:\Data\Source.

D:\Data\Source\RasterSurface.csar

The output file will be saved as ExportSurface.bag in D:\Data\Products.

D:\Data\Products\ExportSurface.bag

Command Line

carisbatch --run ExportRaster --output-format BAG --include-band Depth --uncertainty Uncertainty --uncertainty-type TPE_AVERAGE --compression-level 9 --status COMPLETED --vertical-datum meanLowWater --party-role CUSTODIAN --party-organization "Company Name" --legal-constraints COPYRIGHT --security-constraints UNCLASSIFIED --notes "This is a sample note." D:\Data\Source\RasterSurface.csar D:\Data\Products\ExportSurface.bag

Outcome

The source surface is exported to BAG format according to the options specified.

Extra Notes

N/A

Example

Objective

You want to export a raster surface to an S-102 edition 3 exchange set.

Description

Command Line Syntax

The output format will be S102ed3.

--output-format S102ed3

The Catalogue Defaults file is named CATALOG.xml and can be found at C:\Catalogues.

--catalogue-defaults C:\Catalogues\CATALOG.XML

The producer code to be used is 001C.

--producer-code 001C

The minimum display scale for the data is 1000.

--minimum-display-scale 1000

The optimum display scale for the data is 500.

--optimum-display-scale 500

The maximum display scale for the data is 250.

--maximum-display-scale 250

The QualityofBathymetry data will be created using the data from the QoBD contributor band.

--contributor-band QoBD

A mapping file will be applied to the data in the contributor band. The attribute_mapping.json file can be found at D:\Data\Mapping.

--contributor-band-mapping-file D:\Data\Mapping\attribute_mapping.json

The input raster is RasterSurface.csar and can be found at D:\Data\Source.

D:\Data\Source\RasterSurface.csar

The resulting exchange set will be created in D:\Data\S102_Output.

D:\Data\S102_Output

Command Line

carisbatch --run ExportRaster --output-format S102ed3 --catalogue-defaults C:\Catalogues\CATALOG.XML --producer-code 001C --minimum-display-scale 1000 --optimum-display-scale 500 --maximum-display-scale 250 --contributor-band QoBD --contributor-band-mapping-file D:\Data\Mapping\attribute_mapping.json D:\Data\Source\RasterSurface.csar D:\Data\S102_Output

Outcome

The S-102 exchange set is exported to the output folder specified.

Extra Notes

N/A