[Proj] pj_transform function
Hugo Tyson
Hugo.Tyson at cpslocates.com
Fri Oct 6 01:38:01 PDT 2006
proj-bounces at lists.maptools.org <> wrote:
> I want to transform ... this lat/lon 39.739/-104.985...
> to world mercator project ..with the defintition
>
> World Mercator <54004> +proj=merc +latts=0 +lon0=0
> +k=1.000000 +x0=0 +y0=0 +ellps=WGS84 +datum=WGS84 +units=m no_defs <>
>
> but the method gives an "error"....
>
> this method works fine if i give lat/lon say 42.4182,-74.2643
I've not heard of "world mercator", but looking at the parameters
it's projecting into a plane tangent to the sphere at lat 0, lon 0.
So it only works for longitudes from -90 to +90 (though these map
to infinities in the projected plane).
Your example of -104 longitude is around the back of the earth,
on the "far side" from the projection plane. Therefore a
line from the origin through the point never intersects the
projection plane, so no result can be calculated. Hence your
error. Lon -74 is in range, so it's OK.
HTH,
- Huge
--
Hugo Tyson, Cambridge Positioning Systems Ltd
=************************************************************
********************************************************************************
This email and any attachments are confidential. They have been checked for viruses but it is your
responsibility to conduct your own virus checks.
Cambridge Positioning Systems Limited, 62-64 Hills Road, Cambridge, CB2 1LA, is registered in England
under company number 2808344.
********************************************************************************
More information about the Proj
mailing list