Developer’s corner: adding two global equal area projections to GeoTools/GeoServer

Recently we had the pleasure to implement two new map projections for GeoTools/Geoserver: the Eckert IV projection, and the Mollweide projection.

Both projections happen to be equal area projections.
These projections are commonly used in atlases to represent the whole world, as they don’t alter the relative proportions of countries and continents.

This is actually an important feature missing from the common Google/Bing/Yahoo maps. They are all using a close relative of the Mercator projection, which greatly exaggerates the size of all countries at high latitude (for example, Greenland and Antarctica look a lot bigger than they actually are).

Compare that with Eckert IV, obtained calling GeoServer with the map reflector:
http://localhost:8080/geoserver/wms/reflect?layers=countries&srs=EPSG:54012


And here is Mollweide, obtained calling http://localhost:8080/geoserver/wms/reflect?layers=countries&srs=EPSG:54009

One final observation: unfortunately neither Ecker IV nor Molleweide have an official entry in the EPSG database.
In order to use them in GeoServer you’ll have to edit your $GEOSERVER_DATA_DIR/user_projections/epgs.properties file and add the following two entries (mind, each definition has to be added as a single line, here we split them among multiple lines for readability sake):

54009=PROJCS[“World_Mollweide”,\
GEOGCS[“WGS_1984″,DATUM[“WGS_1984″,SPHEROID[“WGS_1984″,6378137.0,298.257223563]],
PRIMEM[“Greenwich”,0.0],UNIT[“Degree”,0.0174532925199433]],PROJECTION[“Mollweide”],
PARAMETER[“Central_Meridian”,0.0],UNIT[“Meter”,1.0]]

54012=PROJCS[“World_Eckert_IV”,
GEOGCS[“WGS_1984″,DATUM[“WGS_1984″,SPHEROID[“WGS_1984″,6378137.0,298.257223563]],
PRIMEM[“Greenwich”,0.0],UNIT[“Degree”,0.0174532925199433]],PROJECTION[“Eckert_IV”],
PARAMETER[“Central_Meridian”,0.0],UNIT[“Meter”,1.0]]

After that you can take your favorite world wide map and use the WMS reflector to get a quick map using the above projections.

These projections will be available in GeoServer 2.1 and GeoTools 2.7.
Interested in more map projections and datum shift improvements? Drop us a line!

The GeoSolutions team
 
  • Ian

    I did what you suggested and got error on reflecting world:borders layer in geoserver 2.1.3:

    Error occurred decoding the espg code EPSG:54009
    No code “EPSG:54009″ from authority “European Petroleum Survey Group” found for object of type “IdentifiedObject”.