[MetaCRS] Adding Projection Classes to Proj4js

winwaed at gmail.com winwaed at gmail.com
Fri Jul 24 23:53:05 EDT 2009


Hello,

I'm currently working on a demonstration project, most of which I shall be  
writing up on http://www.geowebguru.com in September as a part of a series  
on map projections and coordinate systems.

I have chosen 9 global equal area map projections, and have them  
implemented in MapServer and OpenLayers.
Well the MapServer / WMS / OpenLayers side of things is working, but  
OpenLayers has problems adding overlays (typically GeoRSS or KML) for 7 out  
of the 9 projections.
It didn't take much investigating before I found the reason for this was  
because proj4js did not support the projection classes in question.
For the record, they are:

crast Parabolic Craster
eck4 Eckert IV
eck6 Eckert VI
mbtfpq McBryde-Thomas Polar Quartic
quau Quartic Authalic
hammer Hammer
cea Cylindrical Equal Area (I'm actually using the Behrmann variant)
bonne Bonne

(Mollweide and Sinusoidal both work fine - thanks, guys!)

In retrospect, it isn't that surprising that many of these are missing.  
proj.4 is an extensive library (hence MapServer supports them all), but  
proj4js needs to be relatively lightweight due to its use in web page  
client applications.

So, thinking about it, I could skip the overlay support for most of the  
above projections (especially all the extra pseudo-cylindricals).
However, the one I really want (and I am surprised it is not supported), is  
the cea Cylindrical Equal Area projection class. The maths for this should  
be relatively easy, so how easy is it to add new projections to proj4js?  
Yes I'm proposing to do it myself.

Cylindrical Equal Area will allow support for the Behrmann Projection (the  
one I want) but also the much-maligned-but-popular-in-some-circles  
Gall-Peters.

I don't know if there have been requests for the others? Bonne is a nice  
novelty projection but probably has limited value in the 21st century...

I'm jetting off on vacation on Monday, so unless I "pull an all-nighter"  
this weekend, implementing CEA will probably have to wait until mid-August.

I'm always on the lookout for possible new articles for GeoWebGuru.com. I  
think proj4js development might be a bit too detailed/intricate, but I  
think there's definitely potential for me to write a short "how to use  
proj4js" article in my planned series on map projections.



Richard Marsden
Winwaed Software Technology LLC
http://www.winwaed.com
http://www.mapping-tools.com
http://www.geowebguru.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/metacrs/attachments/20090725/de940039/attachment.html


More information about the MetaCRS mailing list