Projection problems

Ed McNierney ed at TOPOZONE.COM
Tue Jan 24 07:54:00 PST 2006


Dave -

If you need to make maps that cover relatively small areas, then a Transverse Mercator is a good choice.  The UTM (Universal Transverse Mercator) family of projections is standard and popular worldwide.  A Transverse Mercator (TM) projection is centered on an arbitrary north-south meridian.  If you customize your TM projection to the central meridian (longitude) of each city, you'll get very accurate maps with very little distortion at all at the city/regional scale.  But you'll have coordinates unique to your projections.  The UTM family are just 60 TM projections with predefined central meridians every 6 degrees around the world.  Each zone is nominally 6 degrees wide, although you can stretch them wider to account for edges; London's just about the worst possible case for UTM, since 0 degrees longitude is an edge between two zones!

Proj=latlong produces a projection known as equirectangular or "Plat Carrée", sometimes misspelled "Plate Carrée".  It is, obviously, a very simple projection.  And in exchange it produces a lot of distortion.  You cannot, for example, put an accurate scale bar on such a map unless you're covering a small area at the equator (are Quito, Libreville, or Kampala on your list of cities <g>?)

What it's doing is just what you think it's doing.  It is using latitude and longitude as if they were rectangular Cartesian coordinates.  Away from the equator this "stretches" the map east-west.  At the latitude of London this actually distorts east-west distances to be about 60% larger than they really are.

	- Ed

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



-----Original Message-----
From: Dave Keen [mailto:dev at ruffness.com] 
Sent: Tuesday, January 24, 2006 10:16 AM
To: Ed McNierney; MAPSERVER-USERS at LISTS.UMN.EDU
Subject: Re: [UMN_MAPSERVER-USERS] Projection problems

Hiya Ed,

Thanks for writing back so promptly.  I think I'm a still a bit confused about all this, even after reading lots of information about projections
:)  At present we have developed a Flash map application that gets its tiles from a MapServer backend using the GB National Grid and I haven't paid any attention to projections since we were only mapping London and on such a small scale it didn't matter.

However, we know have to extend our application to deal with Europe, America, Japan and potentially every major city in the world so we need to switch over to using lat/long instead of the GBGrid.  Since I want to limit the number of times I need to reproject coordinates is there a decent looking projection that has its output format in degrees, or does the very nature of a projection mean that degrees are no longer applicable.

Specifying proj=latlong does draw a Mercatorish looking map and it allows me to specify my coordinates in lat/long, but what is this actually doing?  (I will need to implement exactly the same projection algorithm in the client application without using proj.4 so I need to know the mechanics of this).

Many thanks,

Dave

Ed McNierney wrote:

>Dave -
>
>"Am I missing something fundamental here?"
>
>Well, yes <g>.  First, the assumption that the Mercator projection has 
>"the least distortion" is only true if you are a seventeenth-century 
>mariner using  magnetic compass for open-water navigation!  The 
>Mercator projection is "familiar" because it is commonly used on world 
>maps, but it distorts both distance and area.  If your output map is a 
>world map, then it's a reasonable choice mainly because it is 
>familiar-looking; people expect Greenland to look larger than Brazil, 
>even if that's not true.
>
>But "Transverse Mercator" is not the same as "Mercator" - they are 
>related but very different projections.
>
>Your EXTENT problem is due to the fact that your extents need to be 
>specified in the units of your output coordinate system/projection.  If 
>your output projection is in degrees, then degrees are fine.  But if 
>you change that you need to change the extent, too.
>
>You cannot have a Mercator-projection map that runs from -90 to +90 
>latitude; it would be infinitely tall.  You cannot have a Transverse 
>Mercator-projection map that runs from -180 to +180 longitude; it would 
>be infinitely wide.
>
>You should review your output projection decision; then use the PROJ 
>tools or other projection tools to calculate the new extent of your map 
>view, remembering that you can't show the whole planet in a Mercator or 
>Transverse Mercator map.
>
>	- Ed
>
>Ed McNierney
>President and Chief Mapmaker
>TopoZone.com / Maps a la carte, Inc.
>73 Princeton Street, Suite 305
>North Chelmsford, MA  01863
>Phone: +1 (978) 251-4242
>Fax: +1 (978) 251-1396
>ed at topozone.com
>
>
>-----Original Message-----
>From: UMN MapServer Users List [mailto:MAPSERVER-USERS at LISTS.UMN.EDU] 
>On Behalf Of Dave K
>Sent: Tuesday, January 24, 2006 8:28 AM
>To: MAPSERVER-USERS at LISTS.UMN.EDU
>Subject: [UMN_MAPSERVER-USERS] Projection problems
>
>Hi there,
>
>I am having some problems reprojecting a map.  The map comes from a WMS 
>server and is in espg:4236 which as I understand it means that it uses 
>the
>WGS84 datum and ellipsoid, but has no inherent projection.  I then want 
>to project the map using a Transverse Mercator projection (which I'm 
>told has the least distortion).
>
>If I access the map without the PROJECTION clause (or with it set to
>epsg:4326) the map displays fine and for some reason looks like it is 
>in the standard Mercator projection.
>
>However, as soon as I include the PROJECTION clause the map becomes 
>completely blank.
>
>My extents are:
>  MINX=-180
>  MINY=90
>  MAXX=180
>  MAXY=-90
>
>... which should be displaying the entire world.
>
>Am I missing something fundamental here?
>
>Cheers,
>
>Dave K
>
>-------
>
>MAP
>
>  OUTPUTFORMAT
>    NAME swf
>    MIMETYPE "application/x-shockwave-flash"
>    DRIVER "SWF"
>    IMAGEMODE PC256
>    FORMATOPTION "OUTPUTMODE=SINGLE"
>  END
>
>  # This bit is causing a problem
>  PROJECTION
>    "proj=tmerc"
>    "ellps=WGS84"
>    "datum=WGS84"
>    "lat_0=0"
>    "lon_0=0"
>    "k=0.9996"
>    "x_0=0"
>  END
>
>  LAYER
>    NAME "demis"
>    STATUS OFF
>    TYPE RASTER
>    CONNECTIONTYPE WMS
>    CONNECTION
>"http://www2.demis.nl/WMS/wms.asp?REQUEST=GetMap&LAYERS=*&FORMAT=png&TR
>A NSPARENT=true&EXCEPTIONS=INIMAGE&WMS=WorldMap"
>
>    METADATA
>      "wms_title" "Demis"
>      "wms_name" "*"
>      "wms_server_version" "1.1.1"
>      "wms_srs" "epsg:4326"
>      "wms_format" "image/png"
>    END
>
>    PROJECTION
>      "init=epsg:4326"
>
>      # This is the same as:
>      #"proj=latlong" (No projection)
>      #"ellps=WGS84"
>      #"datum=WGS84"
>    END
>
>END
>
>
>
>
>  
>



More information about the MapServer-users mailing list