This page describes about how to manage coordinate reference system (CRS) information within OPALS and description of python script to help some tasks.
CRS in ODM files is stored as WKT (Well-known text) String. While OPALS deals with other data format, each file stores (maybe partial) CRS information by themselves. In case of grid datasets which are usually handled using GDAL, CRS information is stored separately in the metadata in addition to the driver supported CRS storage mechanism which are either format-supported or GDAL auxillary file. This is because some GDAL drivers (e.g. GeoTIFF) might be lossy as unrecognized items (e.g. EXTENSION
) might not be stored. CRS in GDAL raster files are stored using SOURCE_CRS
key in the metadata. If this CRS metadata available then this information will be used as CRS instead of CRS from GDAL.
Module Info can be used to show information from an ODM file. Additionally, displaying CRS information from ODM and grid data files (supported by GDAL) is available through Python helper script (see here ).
using Module Import, CRS information is obtained using the following order :
.prj
filecoord_ref_sys
parameterOutput files generated from OPALS modules carries CRS information from its input file(s). If there are some input file that do not have CRS information stored then it is assumed that the CRS is the same as other file(s) has CRS information stored. In case where all the input files have no CRS information stored, CRS information can be manually set during modules executions via coord_ref_sys
parameter. Moreover, CRS information can also be set globally in the installation-wise configuration file.
The following definitions are used when comparing CRS information.
A CRS is considered empty if it is an empty string.
COMPD_CS
and COMPD_CS
, GEOG_CS
and GEOG_CS
, etc.)GEOG_CS
: DATUM
, PRIMEM
, UNIT
) a python script (_setCRS.py
) is provided in the $OPALS_ROOT/opals/workflows
directory to show or modify existing files. Another python script (_validateCRS.py
) is also provided for validating CRS information given from text file containing CRS in WKT, from ODM file, or from GDAL-supported rasters.
_setCRS.py
script can be use to print out available CRS information from a ODM or raster file.
Above command will result in the following output
To add CRS information from EPSG code, Use -e/--epsgCode
parameter
To add CRS information from .prj
file containing WKT string, Use -w/--wkt
parameter
To add CRS information from a source file (ODM or GDAL Rasters) containing WKT string, Use -c/--copySource
parameter
To add CRS information from file containing WKT string, Use -w/--wkt
parameter
To add CRS information from a source file (ODM or GDAL Rasters) containing WKT string, Use -i/--inFile
parameter
Geographic information - Well-known text (WKT) representation of coordinate reference systems OGC 12-063r5