class SpatialReference(GDALBase):
Method | __getitem__ |
Return the value of the given string attribute node, None if the node doesn't exist. Can also take a tuple as a parameter, (target, child), where child is the index of the attribute in the WKT. For example: |
Method | attr_value |
The attribute value for the given target node (e.g. 'PROJCS'). The index keyword specifies an index of the child node to return. |
Method | auth_code |
Return the authority code for the given string target node. |
Method | auth_name |
Return the authority name for the given string target node. |
Method | clone |
Return a clone of this SpatialReference object. |
Method | from_esri |
Morph this SpatialReference from ESRI's format to EPSG. |
Method | identify_epsg |
This method inspects the WKT of this SpatialReference, and will add EPSG authority nodes where an EPSG identifier is applicable. |
Method | import_epsg |
Import the Spatial Reference from the EPSG code (an integer). |
Method | import_proj |
Import the Spatial Reference from a PROJ string. |
Method | import_user_input |
Import the Spatial Reference from the given user input string. |
Method | import_wkt |
Import the Spatial Reference from OGC WKT (string) |
Method | import_xml |
Import the Spatial Reference from an XML string. |
Method | to_esri |
Morph this SpatialReference to ESRI's format. |
Method | validate |
Check to see if the given spatial reference is valid. |
Method | __init__ |
No summary |
Method | __str__ |
Use 'pretty' WKT. |
Instance Variable | axis_order |
Undocumented |
Instance Variable | ptr |
Undocumented |
Property | angular_name |
Return the name of the angular units. |
Property | angular_units |
Return the value of the angular units. |
Property | ellipsoid |
Return a tuple of the ellipsoid parameters: (semimajor axis, semiminor axis, and inverse flattening) |
Property | geographic |
Return True if this SpatialReference is geographic (root node is GEOGCS). |
Property | inverse_flattening |
Return the Inverse Flattening for this Spatial Reference. |
Property | linear_name |
Return the name of the linear units. |
Property | linear_units |
Return the value of the linear units. |
Property | local |
Return True if this SpatialReference is local (root node is LOCAL_CS). |
Property | name |
Return the name of this Spatial Reference. |
Property | pretty_wkt |
Return the 'pretty' representation of the WKT. |
Property | proj |
Return the PROJ representation for this Spatial Reference. |
Property | proj4 |
Alias for proj(). |
Property | projected |
Return True if this SpatialReference is a projected coordinate system (root node is PROJCS). |
Property | semi_major |
Return the Semi Major Axis for this Spatial Reference. |
Property | semi_minor |
Return the Semi Minor Axis for this Spatial Reference. |
Property | srid |
Return the SRID of top-level authority, or None if undefined. |
Property | units |
Return a 2-tuple of the units value and the units name. Automatically determine whether to return the linear or angular units. |
Property | wkt |
Return the WKT representation of this Spatial Reference. |
Property | xml |
Return the XML representation of this Spatial Reference. |
Inherited from CPointerBase
(via GDALBase
):
Method | __del__ |
Free the memory used by the C++ object. |
Method | ptr.setter |
Undocumented |
Class Variable | destructor |
Undocumented |
Instance Variable | _ptr |
Undocumented |
Return the value of the given string attribute node, None if the node doesn't exist. Can also take a tuple as a parameter, (target, child), where child is the index of the attribute in the WKT. For example:
>>> wkt = 'GEOGCS["WGS 84", DATUM["WGS_1984, ... AUTHORITY["EPSG","4326"]]' >>> srs = SpatialReference(wkt) # could also use 'WGS84', or 4326 >>> print(srs['GEOGCS']) WGS 84 >>> print(srs['DATUM']) WGS_1984 >>> print(srs['AUTHORITY']) EPSG >>> print(srs['AUTHORITY', 1]) # The authority value 4326 >>> print(srs['TOWGS84', 4]) # the fourth value in this wkt 0 >>> print(srs['UNIT|AUTHORITY']) # For the units authority, have to use the pipe symbole. EPSG >>> print(srs['UNIT|AUTHORITY', 1]) # The authority value for the units 9122