[UMN_MAPSERVER-DEV] Projections

Ed McNierney ed at TOPOZONE.COM
Mon Jul 9 11:06:02 PDT 2007


Paul -

This doesn't seem correct to me.  You're suggesting a Transverse Mercator
projection on an ellipsoid when the request was for a Mercator on a sphere.

I did a little Googling around and while it appears that the 41001
projection is often referred to as "Transverse Mercator", and there are
several references to the PROJ definition you mention (+proj=tmerc, etc.),
there is a more sensible reference to 41001 being defined in a GeoServer
install as:

PROJCS["WGS84 / Simple Mercator",
  GEOGCS["WGS 84",
    DATUM["WGS_1984",
      SPHEROID["WGS_1984", 6378137.0, 298.257223563]],
    PRIMEM["Greenwich", 0.0],
    UNIT["degree", 0.017453292519943295],
    AXIS["Lon", EAST],
    AXIS["Lat", NORTH]],
  PROJECTION["Mercator_1SP"],
  PARAMETER["central_meridian", 0.0],
  PARAMETER["scale_factor", 1.0],
  PARAMETER["false_easting", 0.0],
  PARAMETER["false_northing", 0.0],
  UNIT["m", 1.0],
  AXIS["x", EAST],
  AXIS["y", NORTH],
  AUTHORITY["EPSG","41001"]]

This is more sensible (at least it's a Mercator projection!) but it is still
a ellipsoidal rather than spherical projection, so it's not quite right.

However, the entire universe of Web-based "geographic" projection fans,
stimulated by Google and Microsoft, obviously don't really get bothered when
their maps are "not quite right", so I should learn not to be so fussy.

     - Ed

P.S. I modified the reply to go only to the MAPSERVER-USERS list, since the
original cross-posting to both lists only complicates matters for people
trying to help.


> From: Paul Spencer <pspencer at DMSOLUTIONS.CA>
> Reply-To: Paul Spencer <pspencer at DMSOLUTIONS.CA>
> Date: Sun, 8 Jul 2007 22:17:03 -0400
> To: <MAPSERVER-DEV at LISTS.UMN.EDU>
> Subject: Re: [UMN_MAPSERVER-DEV] Projections
> 
> You need what is commonly referred to as EPSG:41001, defined as:
> 
> <41001> +proj=tmerc +ellps=WGS84 +units=m +no_defs  <>
> 
> To use this, add the above line to your 'epsg' file and also add a
> projection object to your map object:
> 
> PROJECTION
> "init=epsg:41001"
> END
> 
> You will also need to make sure that every layer in your map file has
> a proper projection so mapserver can reproject it correctly.
> 
> Cheers
> 
> Paul
> 
> On 8-Jul-07, at 9:44 PM, Bradley Mclain wrote:
> 
>> This is kind of hard to explain but what I want to do is use
>> Mapserver to project my data which is in the GDA94 projection as
>> shown below:
>> 
>> "# GDA94 / MGA zone 55
>> <28355> +proj=utm +zone=55 +south +ellps=GRS80
>> +towgs84=0,0,0,0,0,0,0 +units=m +no_defs  <>"
>> 
>> to a projection that will be able to be properly merged with Google
>> maps (using OpenLayers) which uses a projection something like the
>> following:
>> 
>> "Update 4: Agreement frrom Melita Kennedy and David Burrows that
>> Google Maps and Virtual Earth use spherical equations for the
>> Mercator projection.  The correct proj4  settings are:
>> 
>> +proj=merc +latts=0 +lon0=0 +k=1.0 +x0=0 +y0=0
>> +a=6378137.0 +b=6378137.0 +units=m
>> 
>> Note this is different than using the  ellipsoidal equations which
>> would be:
>> 
>> +proj=merc +latts=0 +lon0=0 +k=1.0 +x0=0 +y0=0
>> +ellps=WGS84 +datum=WGS84 +units=m no_defs"
>> 
>> I believe that I need to use Mapserver to do this but I have no
>> idea how to go about it. Currently my Mapserver is running fine
>> displaying the data correctly using the GDA94 projection except i
>> had to use a .vrt file to correctly align the raster image which
>> was slightly out of alignment. I have also set up and can call my
>> Mapserver as a WMS (thought having issues with the WMS Layer
>> function in OpenLayers, just displays a white screen but I believe
>> that this is to do with projections)
>> 
>> My Mapserver has been compiled with GD, GDAL, GEOS, PostGIS, PHP
>> and proj4.
>> 
>> In my mapfile I have defined each layer using "init=epsg:28355" as
>> well as globally defining the map using the same projection.
>> 
>> This reason I am trying to do this is because currently I don't
>> think that my projection can be properly imported into OpenLayers
>> and merged with Google Maps.
>> 
>> Thanks
>> 
>> Brad
> 
> +-----------------------------------------------------------------+
> |Paul Spencer                          pspencer at dmsolutions.ca    |
> +-----------------------------------------------------------------+
> |Chief Technology Officer                                         |
> |DM Solutions Group Inc                http://www.dmsolutions.ca/ |
> +-----------------------------------------------------------------+



More information about the MapServer-users mailing list