[OSRS-PROJ] Problem with projecting 180,90 using Mercator

Ed McNierney ed at topozone.com
Wed Jul 2 10:38:47 EDT 2003


Benjamin -

In the Mercator projection the Y-coordinate is related to the tangent of the latitude, and the tangent of 90 degrees is infinite.  The longitude isn't a problem, but you can't go to 90 dgrees North or South in that projection.

You might want to look at the REAL bounding box of that hardcopy map.  If it's a Mercator source map, the northern and southern edges are NOT at 90 degrees of latitude - they're typically around 80 degrees or so.  Beyond that the paper/planet ratio starts to get uneconomical <g>.

	- Ed

Ed McNierney
President and Chief Mapmaker
TopoZone.com / Maps a la carte, Inc.
73 Princeton Street, Suite 305
North Chelmsford, MA  01863
ed at topozone.com
(978) 251-4242 

-----Original Message-----
From: Benjamin Wragg [mailto:bwragg at tpg.com.au]
Sent: Tuesday, July 01, 2003 7:37 PM
To: osrs-proj at remotesensing.org
Subject: [OSRS-PROJ] Problem with projecting 180,90 using Mercator


Hi list,

I'm currently using PostGIS (which uses the proj4 library) to convert
and store some spatial data. I receive 4 coordinates in lat/long which
define the extents of a hardcopy map. I use these coordinates to create
a PostGIS feature. The next step I need to do is convert the feature to
the desired coordinate system. This works great for most features but
I've found that if a hardcopy map has been specified with coordinates
like -180,-90,180,90 (a typical map of the world) the transformation
crashes. I've questioned the PostGIS list and Paul Ramsey suggested
running cs2cs manually which is what PostGIS essentially uses for
transformations. When I run the following:

	cs2cs +proj=latlong +ellps=WGS84 +to +proj=merc +lon_0=150.0
	180 90

I get:

	* * 0.00

If I pass in any other coordinate I get values back OK.
So why is -180,-90,180,90 not being projected? Any suggestions?

Thanks,

Benjamin Wragg

----------------------------------------
PROJ.4 Discussion List
See http://www.remotesensing.org/proj for subscription, unsubscription
and other information.
----------------------------------------
PROJ.4 Discussion List
See http://www.remotesensing.org/proj for subscription, unsubscription
and other information.



More information about the Proj mailing list