- GENERALIZED INTERFACE
- PARAMETERS AVAILABLE IN ALL PROJECTIONS
PDL::Transform::Proj4 - PDL::Transform interface to the Proj4 projection library
# Using the generalized proj interface: # Make an orthographic map of Earth use PDL::Transform::Cartography; use PDL::Transform::Proj4; $a = earth_coast(); $a = graticule(10,2)->glue(1,$a); $t = t_proj( proj_params => "+proj=ortho +ellps=WGS84 +lon_0=-90 +lat_0=40" ); $w = pgwin(xs); $w->lines($t->apply($a)->clean_lines()); # Using the aliased functions: # Make an orthographic map of Earth use PDL::Transform::Cartography; use PDL::Transform::Proj4; $a = earth_coast(); $a = graticule(10,2)->glue(1,$a); $t = t_proj_ortho( ellps => 'WGS84', lon_0 => -90, lat_0 => 40 ) $w = pgwin(xs); $w->lines($t->apply($a)->clean_lines());
Works like PDL::Transform::Cartography, but using the proj library in the background.
Please see the proj library docs at http://www.remotesensing.org/proj for more information on proj, and how to use the library.
The main object here is the PDL::Transform::Proj4 object, aliased to the t_proj() function.
This object accepts all of the standard options described below, but mainly is there to be called with just the proj_params option defined.
When options are used, they must be used with a '+' before them when placed in the proj_params string, but that is not required otherwise. See the SYNOPSIS above.
Other than t_proj(), all of the other transforms below have been autogenerated, and may not work properly. The main problem is determining the parameters a projection requires from the proj library itself.
Due to the difficulties in doing this, there may be times when the proj docs specify a parameter for a projection that won't work using the anon-hash type specification. In that case, just throw that parameter in the proj_params string, and everything should work fine.
PARAMETERS AVAILABLE IN ALL PROJECTIONS
This is a string containing the proj "plus style" parameters. This would be similar to what you would put on the command line for the 'proj' tool. Like "+proj=ortho +ellps=WGS84 +lon_0=-90 +lat_0=40".
This parameter overrides the others below when it contains parameters that are also specified explicitly.
The proj projection code to use (like ortho...)
Cartesian X offset for the output of the transformation
Cartesian Y offset for the output of the transformation
Central latitude for the projection. NOTE: This may mean other things depending on the projection selected, read the proj docs!
Central longitude for the projection. NOTE: This may mean other things depending on the projection selected, read the proj docs!
Cartesian units used for the output of the projection. NOTE: Like most of the options here, this is likely useless in the current implementation of this library.
Specify a file:unit for proj to use for its runtime defaults. See the proj docs.
Don't load any defaults. See the proj docs.
Normally, the transformation limits the output to between -180 and 180 degrees (or the cartesian equivalent), but with this option that behavior is turned off.
Input values are geocentric coordinates.
Earth Figure Parameters
Ellipsoid datum to use. Ex: WGS72, WGS74. See the proj docs and command line tool for list of possibilities ('proj -le').
Radius of the Earth.
Radius of a sphere with equivalent surface area of specified ellipse.
Radius of a sphere with equivalent volume of specified ellipse.
Arithmetic mean of the major and minor axis, Ra = (a + b)/2.
Geometric mean of the major and minor axis, Rg = (ab)1/2.
Harmonic mean of the major and minor axis, Rh = 2ab/(a + b).
Arithmetic mean of the principle radii at latitude phi.
Geometric mean of the principle radii at latitude phi.
Semiminor axis or polar radius
Reciprocal flattening, +rf=1/f
Eccentricity squared +es=e2
This is the main entry point for the generalized interface. See above on its usage.