GeoEco.DataProducts.CMEMS.CMEMSARCOArray.SetSpatialReference

CMEMSARCOArray.SetSpatialReference(srType, sr)

Sets the spatial reference of this dataset.

This method is similar in operation to the ArcGIS DefineProjection() geoprocessing tool; it changes the spatial reference of the dataset without changing any of the data itself. The change is not just made to the in-memory Dataset instance; it is also made to the underlying physical dataset itself. This method is used mainly to fix datasets for which the spatial reference is missing or mis-defined.

Not all datasets support setting the spatial reference. To determine if the spatial reference can be set, use TestCapability() to test for the 'SetSpatialReference' capability.

Parameters:
  • srType (str) –

    Type of spatial reference you are providing for the sr parameter.

    The allowed values are:

    • WKT - sr is a WKT string in standard OGC format.

    • ArcGIS - sr is a WKT string in ESRI format, typically obtained from a dataset produced by ArcGIS. (The ESRI format differs from the OGC standard; various projections and parameters are named differently and certain nodes are not recognized. See the OSR documentation for more information.)

    • Proj4 - sr is a string suitable for passing to the Proj4 utility.

    • Obj - sr is an instance of the osgeo.osr.SpatialReference class.

    To set the spatial reference to unknown, set srType to 'obj' and sr to None. Allowed values꞉ 'WKT', 'ArcGIS', 'Proj4', 'Obj'.

  • sr (object) – Spatial reference for the dataset. To set the spatial reference to unknown, set srType to 'obj' and sr to None.