Wrapper for proj4 C API.
More...
#include <Proj4API.h>
Wrapper for proj4 C API.
- Author
- John Clyne
This class provides a convience wrapper for the proj4 Cartographic Projections Library http://trac.osgeo.org/proj/
Definition at line 17 of file Proj4API.h.
VAPoR::Proj4API::Proj4API |
( |
| ) |
|
VAPoR::Proj4API::~Proj4API |
( |
| ) |
|
string VAPoR::Proj4API::GetDstStr |
( |
| ) |
const |
Return the current destination projection definition string.
string VAPoR::Proj4API::GetSrcStr |
( |
| ) |
const |
Return the current source projection definition string.
int VAPoR::Proj4API::Initialize |
( |
string |
srcdef, |
|
|
string |
dstdef |
|
) |
| |
Initialize the class
Initializes the class with source and destination proj4 transformation strings.
- Parameters
-
[in] | srcdef | The source proj4 transformation definition. If empty, the string "+proj=latlong" is used. |
[in] | dstdef | The destintation proj4 transformation definition. If empty, the string "+proj=latlong" is used. |
- Return values
-
status | Retruns a negative int on failure |
- See also
- pj_init_plus()
bool VAPoR::Proj4API::IsGeocentDst |
( |
| ) |
const |
bool VAPoR::Proj4API::IsGeocentSrc |
( |
| ) |
const |
bool VAPoR::Proj4API::IsLatLonDst |
( |
| ) |
const |
Return true of destination projection definition is lat-long
This method returns true iff the destination projection definition is geographic (i.e. +proj=latlong). If true, subsequent transforms will return output values in geographic coordinates (i.e. degrees) False is returned otherwise
- See also
- Initialize(), pj_is_latlong()
bool VAPoR::Proj4API::IsLatLonSrc |
( |
| ) |
const |
Return true of source projection definition is lat-long
This method returns true iff the source projection definition is geographic (i.e. +proj=latlong). If true, subsequent transforms expect input values to be in geographic coordinates (i.e. degrees) False is returned otherwise
- See also
- Initialize(), pj_is_latlong()
string VAPoR::Proj4API::ProjErr |
( |
| ) |
const |
Return the error string generated by the proj4 C API for the most recent error
- See also
- pj_strerrno()
int VAPoR::Proj4API::Transform |
( |
double * |
x, |
|
|
double * |
y, |
|
|
size_t |
n, |
|
|
int |
offset = 1 |
|
) |
| const |
Transform coordinates
Transforms coordinates based on defintions of the source and destination proj4 transformation definitions passed to Initialize(). Transformations are performed between Geographic coordinates (latitude and longitude) and Cartographic coordinates (Cartesian) as specified by the transformation definitions. Cartographic coordinates are referred to as the Projection Coordinate System (PCS). Default units for the PCS are meters on the ground. Geographic coordinates are always in degrees.
- Note
- As with the proj4 C library the transformations are performed in place, modifiying the input values
- Parameters
-
[in,out] | x | array of longitudes or PCS X values |
[in,out] | y | array of latitudes or PCS Y values |
[in] | n | num elements in x, y, and z |
[in] | offset | Offset between adjacent values in the input and output arrays. |
- Return values
-
status | Retruns a negative int on failure |
- See also
- Initialize(), pj_transform()
int VAPoR::Proj4API::Transform |
( |
double * |
x, |
|
|
double * |
y, |
|
|
double * |
z, |
|
|
size_t |
n, |
|
|
int |
offset = 1 |
|
) |
| const |
The documentation for this class was generated from the following file: