proj4 (version 1.7.2)
index
/mac_home/jsw/lib/python/proj4.so

Pyrex wrapper to provide python interfaces to 
PROJ.4 (http://proj.maptools.org) functions.
 
Performs cartographic transformations (converts from longitude,latitude
to native map projection x,y coordinates and vice versa, or from
one map projection coordinate system directly to another).
 
Example usage:
 
>>> from pyproj import Proj
>>> p = Proj(proj='utm',zone=10)
>>> x,y = p(-120.108, 34.36116666)
>>> print x,y
>>> print p(x,y,inverse=True)
765975.641091 3805993.13406
(-120.10799999995851, 34.3611.79972767)
 
Input coordinates can be given as python arrays, lists/tuples, scalars
or Numeric/numarray/numpy arrays. Optimized for objects that support
the Python buffer protocol (regular python, Numeric, numarray and
numpy arrays).
 
Download http://www.cdc.noaa.gov/people/jeffrey.s.whitaker/python/pyproj-1.7.2.tar.gz
 
See the docstrings for pyproj.Proj and pyproj.transform for more documentation.
 
Examples scripts are in 'test' subdirectory of source distribution.
 
Contact:  Jeffrey Whitaker <jeffrey.s.whitaker@noaa.gov
 
copyright (c) 2006 by Jeffrey Whitaker.
 
Permission to use, copy, modify, and distribute this software and its
documentation for any purpose and without fee is hereby granted,
provided that the above copyright notice appear in all copies and that
both the copyright notice and this permission notice appear in
supporting documentation.
THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO
EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, INDIRECT OR
CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF
USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
PERFORMANCE OF THIS SOFTWARE.

 
Modules
       
__builtin__
array
math
types

 
Classes
       
__builtin__.object
Proj

 
class Proj(__builtin__.object)
    performs cartographic transformations (converts from longitude,latitude
to native map projection x,y coordinates and vice versa) using proj 
(http://proj.maptools.org/)
 
Proj class instance is initialized with 
proj map projection control parameter key/value pairs.
The key/value pairs can either be passed in a dictionary,
or as keyword arguments.
See http://www.remotesensing.org/geotiff/proj_list for
examples of key/value pairs defining different map projections.
 
Calling a Proj class instance with the arguments lon, lat will
convert lon/lat (in degrees) to x/y native map projection 
coordinates (in meters).  If optional keyword 'inverse' is
True (default is False), the inverse transformation from x/y
to lon/lat is performed. If optional keyword 'radians' is True
(default is False) lon/lat are interpreted as radians instead
of degrees. Works with numarray/Numeric/numpy/regular python
array objects, lists, tuples or scalars (fastest for arrays). lon and
lat must be of same type (array, list/tuple or scalar) and have the
same length (if array, list or tuple).
 
  Methods defined here:
__call__(...)
x.__call__(...) <==> x(...)
__reduce__(...)
special method that allows pyproj.Proj instance to be pickled
is_geocent(...)
returns True if projection in geocentric (x/y) coordinates
is_latlong(...)
returns True if projection in geographic (lon/lat) coordinates

Data and other attributes defined here:
__new__ = <built-in method __new__ of type object>
T.__new__(S, ...) -> a new object with type S, a subtype of T
proj_version = <member 'proj_version' of 'proj4.Proj' objects>
projparams = <member 'projparams' of 'proj4.Proj' objects>

 
Functions
       
transform(...)
x2, y2, z2 = transform(p1, p2, x1, y1, z1, radians=False)
 
Transform points between two coordinate systems defined
by the Proj instances p1 and p2.
 
The points x1,y1,z1 in the coordinate system defined by p1
are transformed to x2,y2,z2 in the coordinate system defined by p2.
 
z1 is optional, if it is not set it is assumed to be zero (and 
only x2 and y2 are returned).
 
In addition to converting between cartographic and geographic
projection coordinates, this function can take care of datum shifts
(which cannot be done using the __call__ method of the Proj instances).
It also allows for one of the coordinate systems to be geographic 
(proj = 'latlong'). 
 
If optional keyword 'radians' is True (default is False) and
p1 is defined in geographic coordinate (pj.is_latlong() is True),
x1,y1 is interpreted as radians instead of the default degrees.
Similarly, if p2 is defined in geographic coordinates 
and radians=True, x2, y2 are returned in radians instead of degrees.
if p1.is_latlong() and p2.is_latlong() both are False, the
radians keyword has no effect.
 
x,y and z can be Numeric/numarray/numpy or regular python arrays,
python lists/tuples or scalars. Arrays are fastest. x,y and z must be
all of the same type (array, list/tuple or scalar), and have the 
same length (if arrays, lists or tuples).
For projections in geocentric coordinates, values of
x and y are given in meters.  z is always meters.

 
Data
        __version__ = '1.7.2'