Projection problems
Ed McNierney
ed at TOPOZONE.COM
Tue Jan 24 06:52:16 PST 2006
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&TRA
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