Geo::GDAL  2.4
Geo::OSR::SpatialReference Class Reference

A spatial reference system.
More...

+ Inheritance diagram for Geo::OSR::SpatialReference:
+ Collaboration diagram for Geo::OSR::SpatialReference:

Public Member Functions

public method As ()
 
public method AutoIdentifyEPSG ()
 
public Geo::OSR::SpatialReference Clone ()
 
public Geo::OSR::SpatialReference CloneGeogCS ()
 
public method ConvertToOtherProjection ()
 
public method CopyGeogCSFrom (scalar rhs)
 
public method EPSGTreatsAsLatLong ()
 
public method EPSGTreatsAsNorthingEasting ()
 
public method Export (scalar format)
 
public method Fixup ()
 
public method FixupOrdering ()
 
public scalar GetAngularUnits ()
 
public method GetAngularUnitsName ()
 
public scalar GetAttrValue (scalar name, scalar child=0)
 
public scalar GetAuthorityCode (scalar target_key)
 
public scalar GetAuthorityName (scalar target_key)
 
public method GetAxisName ()
 
public method GetAxisOrientation ()
 
public method GetInvFlattening ()
 
public scalar GetLinearUnits ()
 
public scalar GetLinearUnitsName ()
 
public scalar GetNormProjParm (scalar name, scalar default_val=0.0)
 
public scalar GetProjParm (scalar name, scalar default_val=0.0)
 
public method GetSemiMajor ()
 
public method GetSemiMinor ()
 
public method GetTOWGS84 ()
 
public method GetTargetLinearUnits ()
 
public method GetUTMZone ()
 
public method ImportFromOzi ()
 
public scalar IsCompound ()
 
public scalar IsGeocentric ()
 
public scalar IsGeographic ()
 
public scalar IsLocal ()
 
public scalar IsProjected ()
 
public scalar IsSame (scalar rs)
 
public scalar IsSameGeogCS (scalar rs)
 
public scalar IsSameVertCS (scalar rs)
 
public scalar IsVertical ()
 
public method MorphFromESRI ()
 
public method MorphToESRI ()
 
public method Set (hash params)
 
public method SetMercator2SP ()
 
public method StripCTParms ()
 
public method Validate ()
 
public Geo::OSR::SpatialReference new (hash params)
 
- Public Member Functions inherited from Geo::OSR
public list AngularUnits ()
 
public method CreateCoordinateTransformation ()
 
public list Datums ()
 
public list GetProjectionMethodParamInfo (scalar projection, scalar parameter)
 
public list GetProjectionMethodParameterList (scalar projection)
 
public array reference GetProjectionMethods ()
 
public scalar GetUserInputAsWKT (scalar name)
 
public scalar GetWellKnownGeogCSAsWKT (scalar name)
 Get well known geographic coordinate system as WKT
More...
 
public list LinearUnits ()
 
public method OAO_Down ()
 
public method OAO_East ()
 
public method OAO_North ()
 
public method OAO_Other ()
 
public method OAO_South ()
 
public method OAO_Up ()
 
public method OAO_West ()
 
public list Parameters ()
 
public list Projections ()
 
public method SRS_PM_GREENWICH ()
 
public method SRS_WGS84_INVFLATTENING ()
 
public method SRS_WGS84_SEMIMAJOR ()
 
public method SRS_WKT_WGS84 ()
 

Detailed Description

A spatial reference system.

Documentation of the underlying C++ class at www.gdal.org

Definition at line 15691 of file all.dox.

Member Function Documentation

public method Geo::OSR::SpatialReference::As ( )


Code:
click to view

public method Geo::OSR::SpatialReference::AutoIdentifyEPSG ( )

Object method.
Set EPSG authority info if possible.

Code:
click to view

public Geo::OSR::SpatialReference Geo::OSR::SpatialReference::Clone ( )

Object method.
Make a duplicate of this SpatialReference object.

Returns
a new Geo::OSR::SpatialReference object

Code:
click to view

public Geo::OSR::SpatialReference Geo::OSR::SpatialReference::CloneGeogCS ( )

Object method.
Make a duplicate of the GEOGCS node of this SpatialReference object.

Returns
a new Geo::OSR::SpatialReference object

Code:
click to view

public method Geo::OSR::SpatialReference::ConvertToOtherProjection ( )


Code:
click to view

public method Geo::OSR::SpatialReference::CopyGeogCSFrom ( scalar  rhs)

Object method.

Parameters
rhsGeo::OSR::SpatialReference

Code:
click to view

public method Geo::OSR::SpatialReference::EPSGTreatsAsLatLong ( )

Object method.
Returns TRUE if EPSG feels this geographic coordinate system should be treated as having lat/long coordinate ordering.

Code:
click to view

public method Geo::OSR::SpatialReference::EPSGTreatsAsNorthingEasting ( )


Code:
click to view

public method Geo::OSR::SpatialReference::Export ( scalar  format)

Object method.
Export the spatial reference to a selected format.

Note
a.k.a. As

Parameters
formatOne of the following. The return value is explained
after the format. Other arguments are explained in parenthesis.
- WKT (Text): Well Known Text string
- PrettyWKT: Well Known Text string nicely formatted (simplify)
- Proj4: PROJ.4 string
- PCI: a list: ($proj_string, $units, [$parms1, ...])
- USGS: a list: ($code, $zone, [$parms1, ...], $datum)
- GML (XML): GML based string (dialect)
- MapInfoCS (MICoordSys): MapInfo style co-ordinate system definition

Note
The named parameter syntax also works and is needed is those
cases when other arguments need or may be given. The format should
be given using key as, 'to' or 'format'.

ExportTo* and AsText methods also exist but are not documented here.

Returns
a scalar or a list depending on the export format

Code:
click to view

public method Geo::OSR::SpatialReference::Fixup ( )

Object method.

Code:
click to view

public method Geo::OSR::SpatialReference::FixupOrdering ( )

Object method.

Code:
click to view

public scalar Geo::OSR::SpatialReference::GetAngularUnits ( )

Object method.

Returns
a number

Code:
click to view

public method Geo::OSR::SpatialReference::GetAngularUnitsName ( )


Code:
click to view

public scalar Geo::OSR::SpatialReference::GetAttrValue ( scalar  name,
scalar  child = 0 
)

Object method.

Parameters
name
child
Returns
string

Code:
click to view

public scalar Geo::OSR::SpatialReference::GetAuthorityCode ( scalar  target_key)

Object method.

Parameters
target_key
Returns
string

Code:
click to view

public scalar Geo::OSR::SpatialReference::GetAuthorityName ( scalar  target_key)

Object method.

Parameters
target_key
Returns
string

Code:
click to view

public method Geo::OSR::SpatialReference::GetAxisName ( )


Code:
click to view

public method Geo::OSR::SpatialReference::GetAxisOrientation ( )


Code:
click to view

public method Geo::OSR::SpatialReference::GetInvFlattening ( )

Object method.

Code:
click to view

public scalar Geo::OSR::SpatialReference::GetLinearUnits ( )

Object method.

Returns
a number

Code:
click to view

public scalar Geo::OSR::SpatialReference::GetLinearUnitsName ( )

Object method.

Returns
string

Code:
click to view

public scalar Geo::OSR::SpatialReference::GetNormProjParm ( scalar  name,
scalar  default_val = 0.0 
)

Object method.

Parameters
name
default_val
Returns
a number

Code:
click to view

public scalar Geo::OSR::SpatialReference::GetProjParm ( scalar  name,
scalar  default_val = 0.0 
)

Object method.

Parameters
name
default_val
Returns
a number

Code:
click to view

public method Geo::OSR::SpatialReference::GetSemiMajor ( )

Object method.

Code:
click to view

public method Geo::OSR::SpatialReference::GetSemiMinor ( )

Object method.

Code:
click to view

public method Geo::OSR::SpatialReference::GetTargetLinearUnits ( )


Code:
click to view

public method Geo::OSR::SpatialReference::GetTOWGS84 ( )

Object method.

Returns
array = ($p1, $p2, $p3, $p4, $p5, $p6, $p7)

Code:
click to view

public method Geo::OSR::SpatialReference::GetUTMZone ( )

Object method.
Get UTM zone information.

Returns
The UTM zone (integer). In scalar context the returned value
is negative for southern hemisphere zones. In list context returns
two values ($zone, $north), where $zone is always non-negative and
$north is true or false.

Code:
click to view

public method Geo::OSR::SpatialReference::ImportFromOzi ( )


Code:
click to view

public scalar Geo::OSR::SpatialReference::IsCompound ( )

Object method.

Returns
boolean

Code:
click to view

public scalar Geo::OSR::SpatialReference::IsGeocentric ( )

Object method.

Returns
boolean

Code:
click to view

public scalar Geo::OSR::SpatialReference::IsGeographic ( )

Object method.

Returns
boolean

Code:
click to view

public scalar Geo::OSR::SpatialReference::IsLocal ( )

Object method.

Returns
boolean

Code:
click to view

public scalar Geo::OSR::SpatialReference::IsProjected ( )

Object method.

Returns
boolean

Code:
click to view

public scalar Geo::OSR::SpatialReference::IsSame ( scalar  rs)

Object method.

Parameters
rsa Geo::OSR::SpatialReference object
Returns
boolean

Code:
click to view

public scalar Geo::OSR::SpatialReference::IsSameGeogCS ( scalar  rs)

Object method.

Parameters
rsa Geo::OSR::SpatialReference object
Returns
boolean

Code:
click to view

public scalar Geo::OSR::SpatialReference::IsSameVertCS ( scalar  rs)

Object method.

Parameters
rsa Geo::OSR::SpatialReference object
Returns
boolean

Code:
click to view

public scalar Geo::OSR::SpatialReference::IsVertical ( )

Object method.

Returns
boolean

Code:
click to view

public method Geo::OSR::SpatialReference::MorphFromESRI ( )

Object method.

Code:
click to view

public method Geo::OSR::SpatialReference::MorphToESRI ( )

Object method.

Code:
click to view

public Geo::OSR::SpatialReference Geo::OSR::SpatialReference::new ( hash  params)

Class method.
Create a new spatial reference object using a named parameter. This
constructor recognizes the following key words (alternative in
parenthesis): WKT (Text), Proj4, ESRI, EPSG, EPSGA, PCI, USGS, GML
(XML), URL, ERMapper (ERM), MapInfoCS (MICoordSys). The value
depends on the key.
- WKT: Well Known Text string
- Proj4: PROJ.4 string
- ESRI: reference to a list of strings (contents of ESRI .prj file)
- EPSG: EPSG code number
- EPSGA: EPSG code number (the resulting CS will have EPSG preferred axis ordering)
- PCI: listref: [PCI_projection_string, Grid_units_code, [17 cs parameters]]
- USGS: listref: [Projection_system_code, Zone, [15 cs parameters], Datum_code, Format_flag]
- GML: GML string
- URL: URL for downloading the spatial reference from
- ERMapper: listref: [Projection, Datum, Units]
- MapInfoCS: MapInfo style co-ordinate system definition

For more information, consult the import methods in OGR documentation.

Note
ImportFrom* methods also exist but are not documented here.

Usage:
<br>$sr = Geo::OSR::SpatialReference->new( key => value );
<br>

Returns
a new Geo::OSR::SpatialReference object

Code:
click to view

public method Geo::OSR::SpatialReference::Set ( hash  params)

Object method.
Set a parameter or parameters in the spatial reference object.

Parameters
paramsNamed parameters. Recognized keys and respective
values are the following.
- Authority: authority name (give also TargetKey, Node and Code)
- TargetKey:
- Node: partial or complete path to the target node (Node and Value together sets an attribute value)
- Code: code for value with an authority
- Value: value to be assigned to a node, a projection parameter or an object
- AngularUnits: angular units for the geographic coordinate system (give also Value) (one of Geo::OSR::LinearUnits)
- LinearUnits: linear units for the target node or the object (give also Value and optionally Node) (one of Geo::OSR::LinearUnits)
- Parameter: projection parameter to set (give also Value and Normalized) (one of Geo::OSR::Parameters)
- Normalized: set to true to indicate that the Value argument is in "normalized" form
- Name: a well known name of a geographic coordinate system (e.g. WGS84)
- GuessFrom: arbitrary text that specifies a projection ("user input")
- LOCAL_CS: name of a local coordinate system
- GeocentricCS: name of a geocentric coordinate system
- VerticalCS: name of a vertical coordinate system (give also Datum and optionally VertDatumType [default is 2005])
- Datum: a known (OGC or EPSG) name (or(?) one of Geo::OSR::Datums)
- CoordinateSystem: 'WGS', 'UTM', 'State Plane', or a user visible name (give optionally also Parameters, Zone, North, NAD83, UnitName, UnitConversionFactor, Datum, Spheroid, HorizontalCS, and/or VerticalCS
- Parameters: a reference to a list containing the coordinate system or projection parameters
- Zone: zone for setting up UTM or State Plane coordinate systems (State Plane zone in USGS numbering scheme)
- North: set false for southern hemisphere
- NAD83: set false if the NAD27 zone definition should be used instead of NAD83
- UnitName: to override the legal definition for a zone
- UnitConversionFactor: to override the legal definition for a zone
- Spheroid: user visible name
- HorizontalCS: Horizontal coordinate system name
- Projection: name of a projection, one of Geo::OSR::Projections (give also optionally Parameters and Variant)

Note
Numerous Set* methods also exist but are not documented here.

Code:
click to view

public method Geo::OSR::SpatialReference::SetMercator2SP ( )


Code:
click to view

public method Geo::OSR::SpatialReference::StripCTParms ( )

Object method.

Code:
click to view

public method Geo::OSR::SpatialReference::Validate ( )

Object method.

Code:
click to view


The documentation for this class was generated from the following file: