RAVE
Lib.Proj Namespace Reference

Classes

class  Proj
 Projection class. More...
 

Functions

 d2r (ll)
 Convenience function for converting a tuple of angles expressed in degrees to radians.
 
 r2d (xy)
 Convenience function for converting a tuple of angles expressed in radians to degrees.
 
 c2s (indata, pcs_id)
 Function for converting a lon/lat coordinate pair to a pair of PCS (projection-specific) coordinates.
 
 s2c (indata, pcs_id)
 Function for converting a PCS (projection-specific) XY coordinate pair to a lon/lat coordinate pair.
 
 ScaleResolutionFromReal (lat, scale)
 Function for converting real resolution on the Earth's surface (meters) to projection-specific resolution.
 
 RealResolutionFromScale (lat, scale)
 Function for converting projection-specific resolution real resolution on the Earth's surface (meters).
 

Variables

 error = _proj.error
 Exception.
 
 dmstor = _proj.dmstor
 Helper.
 
float dr = math.pi / 180.0
 degrees to radians
 
float rd = 180.0 / math.pi
 radians to degrees
 

Detailed Description

Copyright (C) 1997 - Swedish Meteorological and Hydrological Institute (SMHI)

This file is part of RAVE.

RAVE is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.

RAVE is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
See the GNU Lesser General Public License for more details.

You should have received a copy of the GNU Lesser General Public License
along with RAVE.  If not, see <http://www.gnu.org/licenses/>.

Function Documentation

◆ c2s()

Lib.Proj.c2s ( indata,
pcs_id )

Function for converting a lon/lat coordinate pair to a pair of PCS (projection-specific) coordinates.

Parameters
llvariable-length tuple containing lon/lat coordinate pairs
pcs_idstring identifier of the projection to use. Check registered projections using 'projection_rgistry'
Returns
tuple of PCS XY coordinate pairs

◆ d2r()

Lib.Proj.d2r ( ll)

Convenience function for converting a tuple of angles expressed in degrees to radians.

Parameters
lltuple of angles expressed in degrees
Returns
tuple of angles expressed in radians

◆ r2d()

Lib.Proj.r2d ( xy)

Convenience function for converting a tuple of angles expressed in radians to degrees.

Parameters
xytuple of angles expressed in radians
Returns
tuple of angles expressed in degrees

◆ RealResolutionFromScale()

Lib.Proj.RealResolutionFromScale ( lat,
scale )

Function for converting projection-specific resolution real resolution on the Earth's surface (meters).

Based on Petr Novak's work reported to OPERA.

Parameters
latfloat latitude position
scalefloat resolution in projection-specific space
Returns
float surface resolution on the Earth in meters

◆ s2c()

Lib.Proj.s2c ( indata,
pcs_id )

Function for converting a PCS (projection-specific) XY coordinate pair to a lon/lat coordinate pair.

Parameters
xytuple of PCS XY coordinates
pcs_idstring identifier of the projection to use. Check registered projections using 'projection_rgistry'
Returns
tuple of lon/lat coordinates

◆ ScaleResolutionFromReal()

Lib.Proj.ScaleResolutionFromReal ( lat,
scale )

Function for converting real resolution on the Earth's surface (meters) to projection-specific resolution.

Based on Petr Novak's work reported to OPERA.

Parameters
latfloat latitude position
scalefloat surface resolution on the Earth in meters
Returns
float representing the resolution expressed in projection-specific space

Variable Documentation

◆ dmstor

Lib.Proj.dmstor = _proj.dmstor

Helper.

◆ dr

float Lib.Proj.dr = math.pi / 180.0

degrees to radians

◆ error

Lib.Proj.error = _proj.error

Exception.

◆ rd

float Lib.Proj.rd = 180.0 / math.pi

radians to degrees