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.

**ALIASED INTERFACE**

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.

**General Parameters**

proj_params

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.

*proj*

The proj projection code to use (like ortho...)

*x_0*

Cartesian X offset for the output of the transformation

*y_0*

Cartesian Y offset for the output of the transformation

*lat_0*

Central latitude for the projection. NOTE: This may mean other things depending on the projection selected, read the proj docs!

*lon_0*

Central longitude for the projection. NOTE: This may mean other things depending on the projection selected, read the proj docs!

*units*

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.

*init*

Specify a file:unit for proj to use for its runtime defaults. See the proj docs.

*no_defs*

Don’t load any defaults. See the proj docs.

*over*

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.

*geoc*

Input values are geocentric coordinates.

**Earth Figure Parameters**

ellps

Ellipsoid datum to use. Ex: WGS72 , WGS74 . See the proj docs and command line tool for list of possibilities (’proj −le’).

*R*

Radius of the Earth.

*R_A*

Radius of a sphere with equivalent surface area of specified ellipse.

*R_V*

Radius of a sphere with equivalent volume of specified ellipse.

*R_a*

Arithmetic mean of the major and minor axis, Ra = (a + b)/2.

*R_g*

Geometric mean of the major and minor axis, Rg = (ab)1/2.

*R_h*

Harmonic mean of the major and minor axis, Rh = 2ab/(a + b).

*R_lat_a=phi*

Arithmetic mean of the principle radii at latitude phi.

*R_lat_g=phi*

Geometric mean of the principle radii at latitude phi.

*b*

Semiminor axis or polar radius

*f*

Flattening

*rf*

Reciprocal flattening, +rf=1/f

*e*

Eccentricity +e=e

*es*

Eccentricity squared +es=e2

**t_proj**

This is the main entry point for the generalized interface. See above on its usage.

**t_proj_aea**

Autogenerated transformation function for Proj4 projection code aea.

The full name for this projection is Albers Equal Area.

Projection Parameters

lat_1

lat_2

**t_proj_aeqd**

Autogenerated transformation function for Proj4 projection code aeqd.

The full name for this projection is Azimuthal Equidistant.

Projection Parameters

guam

lat_0

**t_proj_airy**

Autogenerated transformation function for Proj4 projection code airy.

The full name for this projection is Airy.

Projection Parameters

lat_b

no_cut

**t_proj_aitoff**

Autogenerated transformation function for Proj4 projection code aitoff.

The full name for this projection is Aitoff.

**t_proj_alsk**

Autogenerated transformation function for Proj4 projection code alsk.

The full name for this projection is Mod. Stererographics of Alaska.

**t_proj_apian**

Autogenerated transformation function for Proj4 projection code apian.

The full name for this projection is Apian Globular I.

**t_proj_august**

Autogenerated transformation function for Proj4 projection code august.

The full name for this projection is August Epicycloidal.

**t_proj_bacon**

Autogenerated transformation function for Proj4 projection code bacon.

The full name for this projection is Bacon Globular.

**t_proj_bipc**

Autogenerated transformation function for Proj4 projection code bipc.

The full name for this projection is Bipolar conic of western hemisphere.

**t_proj_boggs**

Autogenerated transformation function for Proj4 projection code boggs.

The full name for this projection is Boggs Eumorphic.

**t_proj_bonne**

Autogenerated transformation function for Proj4 projection code bonne.

The full name for this projection is Bonne (Werner lat_1=90).

Projection Parameters

lat_1

**t_proj_cass**

Autogenerated transformation function for Proj4 projection code cass.

The full name for this projection is Cassini.

**t_proj_cc**

Autogenerated transformation function for Proj4 projection code cc.

The full name for this projection is Central Cylindrical.

**t_proj_cea**

Autogenerated transformation function for Proj4 projection code cea.

The full name for this projection is Equal Area Cylindrical.

Projection Parameters

lat_ts

**t_proj_chamb**

Autogenerated transformation function for Proj4 projection code chamb.

The full name for this projection is Chamberlin Trimetric.

Projection Parameters

lat_1

lat_2

lat_3

lon_1

lon_2

lon_3

**t_proj_collg**

Autogenerated transformation function for Proj4 projection code collg.

The full name for this projection is Collignon.

**t_proj_crast**

Autogenerated transformation function for Proj4 projection code crast.

The full name for this projection is Craster Parabolic (Putnins P4).

**t_proj_denoy**

Autogenerated transformation function for Proj4 projection code denoy.

The full name for this projection is Denoyer Semi-Elliptical.

**t_proj_eck1**

Autogenerated transformation function for Proj4 projection code eck1.

The full name for this projection is Eckert I.

**t_proj_eck2**

Autogenerated transformation function for Proj4 projection code eck2.

The full name for this projection is Eckert II .

**t_proj_eck3**

Autogenerated transformation function for Proj4 projection code eck3.

The full name for this projection is Eckert III .

**t_proj_eck4**

Autogenerated transformation function for Proj4 projection code eck4.

The full name for this projection is Eckert IV .

**t_proj_eck5**

Autogenerated transformation function for Proj4 projection code eck5.

The full name for this projection is Eckert V.

**t_proj_eck6**

Autogenerated transformation function for Proj4 projection code eck6.

The full name for this projection is Eckert VI .

**t_proj_eqc**

Autogenerated transformation function for Proj4 projection code eqc.

The full name for this projection is Equidistant Cylindrical (Plate Caree).

Projection Parameters

lat_00

lat_ts

**t_proj_eqdc**

Autogenerated transformation function for Proj4 projection code eqdc.

The full name for this projection is Equidistant Conic.

Projection Parameters

lat_1

lat_2

**t_proj_euler**

Autogenerated transformation function for Proj4 projection code euler.

The full name for this projection is Euler.

Projection Parameters

lat_1

lat_2

**t_proj_fahey**

Autogenerated transformation function for Proj4 projection code fahey.

The full name for this projection is Fahey.

**t_proj_fouc**

Autogenerated transformation function for Proj4 projection code fouc.

The full name for this projection is Foucaut.

**t_proj_fouc_s**

Autogenerated transformation function for Proj4 projection code fouc_s.

The full name for this projection is Foucaut Sinusoidal.

**t_proj_gall**

Autogenerated transformation function for Proj4 projection code gall.

The full name for this projection is Gall (Gall Stereographic).

**t_proj_geocent**

Autogenerated transformation function for Proj4 projection code geocent.

The full name for this projection is Geocentric.

**t_proj_geos**

Autogenerated transformation function for Proj4 projection code geos.

The full name for this projection is Geostationary Satellite View.

Projection Parameters

h |

**t_proj_gins8**

Autogenerated transformation function for Proj4 projection code gins8.

The full name for this projection is Ginsburg VIII (TsNIIGAiK).

**t_proj_gn_sinu**

Autogenerated transformation function for Proj4 projection code gn_sinu.

The full name for this projection is General Sinusoidal Series.

Projection Parameters

m |
||

n |

**t_proj_gnom**

Autogenerated transformation function for Proj4 projection code gnom.

The full name for this projection is Gnomonic.

**t_proj_goode**

Autogenerated transformation function for Proj4 projection code goode.

The full name for this projection is Goode Homolosine.

**t_proj_gs48**

Autogenerated transformation function for Proj4 projection code gs48.

The full name for this projection is Mod. Stererographics of 48 U.S..

**t_proj_gs50**

Autogenerated transformation function for Proj4 projection code gs50.

The full name for this projection is Mod. Stererographics of 50 U.S..

**t_proj_gstmerc**

Autogenerated transformation function for Proj4 projection code gstmerc.

The full name for this projection is Gauss-Schreiber Transverse Mercator (aka Gauss-Laborde Reunion).

Projection Parameters

k_0 |

lat_0

lon_0

**t_proj_hammer**

Autogenerated transformation function for Proj4 projection code hammer.

The full name for this projection is Hammer & Eckert-Greifendorff.

Projection Parameters

M |
||

W |

**t_proj_hatano**

Autogenerated transformation function for Proj4 projection code hatano.

The full name for this projection is Hatano Asymmetrical Equal Area.

**t_proj_imw_p**

Autogenerated transformation function for Proj4 projection code imw_p.

The full name for this projection is International Map of the World Polyconic.

Projection Parameters

lat_1

lat_2

lon_1

**t_proj_kav5**

Autogenerated transformation function for Proj4 projection code kav5.

The full name for this projection is Kavraisky V.

**t_proj_kav7**

Autogenerated transformation function for Proj4 projection code kav7.

The full name for this projection is Kavraisky VII .

**t_proj_krovak**

Autogenerated transformation function for Proj4 projection code krovak.

The full name for this projection is Krovak.

**t_proj_labrd**

Autogenerated transformation function for Proj4 projection code labrd.

The full name for this projection is Laborde.

**t_proj_laea**

Autogenerated transformation function for Proj4 projection code laea.

The full name for this projection is Lambert Azimuthal Equal Area.

**t_proj_lagrng**

Autogenerated transformation function for Proj4 projection code lagrng.

The full name for this projection is Lagrange.

Projection Parameters

W |

**t_proj_larr**

Autogenerated transformation function for Proj4 projection code larr.

The full name for this projection is Larrivee.

**t_proj_lask**

Autogenerated transformation function for Proj4 projection code lask.

The full name for this projection is Laskowski.

**t_proj_latlon**

Autogenerated transformation function for Proj4 projection code latlon.

The full name for this projection is Lat/long (Geodetic alias).

**t_proj_latlong**

Autogenerated transformation function for Proj4 projection code latlong.

The full name for this projection is Lat/long (Geodetic alias).

**t_proj_lcc**

Autogenerated transformation function for Proj4 projection code lcc.

The full name for this projection is Lambert Conformal Conic.

Projection Parameters

lat_0

lat_1

lat_2

**t_proj_lcca**

Autogenerated transformation function for Proj4 projection code lcca.

The full name for this projection is Lambert Conformal Conic Alternative.

Projection Parameters

lat_0

**t_proj_leac**

Autogenerated transformation function for Proj4 projection code leac.

The full name for this projection is Lambert Equal Area Conic.

Projection Parameters

lat_1

south

**t_proj_lee_os**

Autogenerated transformation function for Proj4 projection code lee_os.

The full name for this projection is Lee Oblated Stereographic.

**t_proj_longlat**

Autogenerated transformation function for Proj4 projection code longlat.

The full name for this projection is Lat/long (Geodetic alias).

**t_proj_lonlat**

Autogenerated transformation function for Proj4 projection code lonlat.

The full name for this projection is Lat/long (Geodetic).

**t_proj_loxim**

Autogenerated transformation function for Proj4 projection code loxim.

The full name for this projection is Loximuthal.

**t_proj_lsat**

Autogenerated transformation function for Proj4 projection code lsat.

The full name for this projection is Space oblique for LANDSAT .

Projection Parameters

lsat

path

**t_proj_mbt_fps**

Autogenerated transformation function for Proj4 projection code mbt_fps.

The full name for this projection is McBryde-Thomas Flat-Pole Sine (No. 2).

**t_proj_mbt_s**

Autogenerated transformation function for Proj4 projection code mbt_s.

The full name for this projection is McBryde-Thomas Flat-Polar Sine (No. 1).

**t_proj_mbtfpp**

Autogenerated transformation function for Proj4 projection code mbtfpp.

The full name for this projection is McBride-Thomas Flat-Polar Parabolic.

**t_proj_mbtfpq**

Autogenerated transformation function for Proj4 projection code mbtfpq.

The full name for this projection is McBryde-Thomas Flat-Polar Quartic.

**t_proj_mbtfps**

Autogenerated transformation function for Proj4 projection code mbtfps.

The full name for this projection is McBryde-Thomas Flat-Polar Sinusoidal.

**t_proj_merc**

Autogenerated transformation function for Proj4 projection code merc.

The full name for this projection is Mercator.

Projection Parameters

lat_ts

**t_proj_mil_os**

Autogenerated transformation function for Proj4 projection code mil_os.

The full name for this projection is Miller Oblated Stereographic.

**t_proj_mill**

Autogenerated transformation function for Proj4 projection code mill.

The full name for this projection is Miller Cylindrical.

**t_proj_moll**

Autogenerated transformation function for Proj4 projection code moll.

The full name for this projection is Mollweide.

**t_proj_murd1**

Autogenerated transformation function for Proj4 projection code murd1.

The full name for this projection is Murdoch I.

Projection Parameters

lat_1

lat_2

**t_proj_murd2**

Autogenerated transformation function for Proj4 projection code murd2.

The full name for this projection is Murdoch II .

Projection Parameters

lat_1

lat_2

**t_proj_murd3**

Autogenerated transformation function for Proj4 projection code murd3.

The full name for this projection is Murdoch III .

Projection Parameters

lat_1

lat_2

**t_proj_nell**

Autogenerated transformation function for Proj4 projection code nell.

The full name for this projection is Nell.

**t_proj_nell_h**

Autogenerated transformation function for Proj4 projection code nell_h.

The full name for this projection is Nell-Hammer.

**t_proj_nicol**

Autogenerated transformation function for Proj4 projection code nicol.

The full name for this projection is Nicolosi Globular.

**t_proj_nsper**

Autogenerated transformation function for Proj4 projection code nsper.

The full name for this projection is Near-sided perspective.

Projection Parameters

h |

**t_proj_nzmg**

Autogenerated transformation function for Proj4 projection code nzmg.

The full name for this projection is New Zealand Map Grid.

**t_proj_ob_tran**

Autogenerated transformation function for Proj4 projection code ob_tran.

The full name for this projection is General Oblique Transformation.

Projection Parameters

o_alpha

o_lat_1

o_lat_2

o_lat_c

o_lat_p

o_lon_1

o_lon_2

o_lon_c

o_lon_p

o_proj

**t_proj_ocea**

Autogenerated transformation function for Proj4 projection code ocea.

The full name for this projection is Oblique Cylindrical Equal Area.

Projection Parameters

lat_1

lat_2

lon_1

lon_2

**t_proj_oea**

Autogenerated transformation function for Proj4 projection code oea.

The full name for this projection is Oblated Equal Area.

Projection Parameters

m |
||

n |

theta

**t_proj_omerc**

Autogenerated transformation function for Proj4 projection code omerc.

The full name for this projection is Oblique Mercator.

Projection Parameters

alpha

lat_1

lat_2

lon_1

lon_2

lonc

no_rot

no_uoff

rot_conv

**t_proj_ortel**

Autogenerated transformation function for Proj4 projection code ortel.

The full name for this projection is Ortelius Oval.

**t_proj_ortho**

Autogenerated transformation function for Proj4 projection code ortho.

The full name for this projection is Orthographic.

**t_proj_pconic**

Autogenerated transformation function for Proj4 projection code pconic.

The full name for this projection is Perspective Conic.

Projection Parameters

lat_1

lat_2

**t_proj_poly**

Autogenerated transformation function for Proj4 projection code poly.

The full name for this projection is Polyconic (American).

**t_proj_putp1**

Autogenerated transformation function for Proj4 projection code putp1.

The full name for this projection is Putnins P1.

**t_proj_putp2**

Autogenerated transformation function for Proj4 projection code putp2.

The full name for this projection is Putnins P2.

**t_proj_putp3**

Autogenerated transformation function for Proj4 projection code putp3.

The full name for this projection is Putnins P3.

**t_proj_putp3p**

Autogenerated transformation function for Proj4 projection code putp3p.

The full name for this projection is Putnins P3’.

**t_proj_putp4p**

Autogenerated transformation function for Proj4 projection code putp4p.

The full name for this projection is Putnins P4’.

**t_proj_putp5**

Autogenerated transformation function for Proj4 projection code putp5.

The full name for this projection is Putnins P5.

**t_proj_putp5p**

Autogenerated transformation function for Proj4 projection code putp5p.

The full name for this projection is Putnins P5’.

**t_proj_putp6**

Autogenerated transformation function for Proj4 projection code putp6.

The full name for this projection is Putnins P6.

**t_proj_putp6p**

Autogenerated transformation function for Proj4 projection code putp6p.

The full name for this projection is Putnins P6’.

**t_proj_qua_aut**

Autogenerated transformation function for Proj4 projection code qua_aut.

The full name for this projection is Quartic Authalic.

**t_proj_robin**

Autogenerated transformation function for Proj4 projection code robin.

The full name for this projection is Robinson.

**t_proj_rouss**

Autogenerated transformation function for Proj4 projection code rouss.

The full name for this projection is Roussilhe Stereographic.

**t_proj_rpoly**

Autogenerated transformation function for Proj4 projection code rpoly.

The full name for this projection is Rectangular Polyconic.

Projection Parameters

lat_ts

**t_proj_sinu**

Autogenerated transformation function for Proj4 projection code sinu.

The full name for this projection is Sinusoidal (Sanson-Flamsteed).

**t_proj_somerc**

Autogenerated transformation function for Proj4 projection code somerc.

The full name for this projection is Swiss. Obl. Mercator.

**t_proj_stere**

Autogenerated transformation function for Proj4 projection code stere.

The full name for this projection is Stereographic.

Projection Parameters

lat_ts

**t_proj_sterea**

Autogenerated transformation function for Proj4 projection code sterea.

The full name for this projection is Oblique Stereographic Alternative.

**t_proj_tcc**

Autogenerated transformation function for Proj4 projection code tcc.

The full name for this projection is Transverse Central Cylindrical.

**t_proj_tcea**

Autogenerated transformation function for Proj4 projection code tcea.

The full name for this projection is Transverse Cylindrical Equal Area.

**t_proj_tissot**

Autogenerated transformation function for Proj4 projection code tissot.

The full name for this projection is Tissot.

Projection Parameters

lat_1

lat_2

**t_proj_tmerc**

Autogenerated transformation function for Proj4 projection code tmerc.

The full name for this projection is Transverse Mercator.

**t_proj_tpeqd**

Autogenerated transformation function for Proj4 projection code tpeqd.

The full name for this projection is Two Point Equidistant.

Projection Parameters

lat_1

lat_2

lon_1

lon_2

**t_proj_tpers**

Autogenerated transformation function for Proj4 projection code tpers.

The full name for this projection is Tilted perspective.

Projection Parameters

azi |
||

h |

tilt

**t_proj_ups**

Autogenerated transformation function for Proj4 projection code ups.

The full name for this projection is Universal Polar Stereographic.

Projection Parameters

south

**t_proj_urm5**

Autogenerated transformation function for Proj4 projection code urm5.

The full name for this projection is Urmaev V.

Projection Parameters

alphi

n |
||

q |

**t_proj_urmfps**

Autogenerated transformation function for Proj4 projection code urmfps.

The full name for this projection is Urmaev Flat-Polar Sinusoidal.

Projection Parameters

n |

**t_proj_utm**

Autogenerated transformation function for Proj4 projection code utm.

The full name for this projection is Universal Transverse Mercator ( UTM ).

Projection Parameters

south

zone

**t_proj_vandg**

Autogenerated transformation function for Proj4 projection code vandg.

The full name for this projection is van der Grinten (I).

**t_proj_vandg2**

Autogenerated transformation function for Proj4 projection code vandg2.

The full name for this projection is van der Grinten II .

**t_proj_vandg3**

Autogenerated transformation function for Proj4 projection code vandg3.

The full name for this projection is van der Grinten III .

**t_proj_vandg4**

Autogenerated transformation function for Proj4 projection code vandg4.

The full name for this projection is van der Grinten IV .

**t_proj_vitk1**

Autogenerated transformation function for Proj4 projection code vitk1.

The full name for this projection is Vitkovsky I.

Projection Parameters

lat_1

lat_2

**t_proj_wag1**

Autogenerated transformation function for Proj4 projection code wag1.

The full name for this projection is Wagner I (Kavraisky VI ).

**t_proj_wag2**

Autogenerated transformation function for Proj4 projection code wag2.

The full name for this projection is Wagner II .

**t_proj_wag3**

Autogenerated transformation function for Proj4 projection code wag3.

The full name for this projection is Wagner III .

Projection Parameters

lat_ts

**t_proj_wag4**

Autogenerated transformation function for Proj4 projection code wag4.

The full name for this projection is Wagner IV .

**t_proj_wag5**

Autogenerated transformation function for Proj4 projection code wag5.

The full name for this projection is Wagner V.

**t_proj_wag6**

Autogenerated transformation function for Proj4 projection code wag6.

The full name for this projection is Wagner VI .

**t_proj_wag7**

Autogenerated transformation function for Proj4 projection code wag7.

The full name for this projection is Wagner VII .

**t_proj_weren**

Autogenerated transformation function for Proj4 projection code weren.

The full name for this projection is Werenskiold I.

**t_proj_wink1**

Autogenerated transformation function for Proj4 projection code wink1.

The full name for this projection is Winkel I.

Projection Parameters

lat_ts

**t_proj_wink2**

Autogenerated transformation function for Proj4 projection code wink2.

The full name for this projection is Winkel II .

Projection Parameters

lat_1

**t_proj_wintri**

Autogenerated transformation function for Proj4 projection code wintri.

The full name for this projection is Winkel Tripel.

Projection Parameters

lat_1

Judd Taylor, Orbital Systems, Ltd. judd dot t at orbitalsystems dot com