Projections and WMS servers

Ed McNierney ed at TOPOZONE.COM
Tue Sep 28 08:01:46 PDT 2004


Nico -

Can you send the URL of the WMS server you're using?  The only service I can find on that site is a WFS feature service.

You need to be able describe the projection of the data coming from the WMS service, and MapServer will request the data in that projection (which must, of course, be a supported projection on that server).

You will have two types of PROJECTION blocks in your map file.  You should have one for each LAYER, describing the native projection in which that layer's data is stored.  And you should have one at the top level of your map file, indicating what *output* projection should be used in producing the requested map.

The PROJECTION block below is superficially OK, but it's certainly not the Monte Mario projection (a central longitude of -155 is a highly non-Italian location).  The EPSG 26591 projection is defined as:

  <26591>
    proj=tmerc
    lat_0=0.000000000
    lon_0=9.000000000
    k=0.999600
    x_0=1500000.000
    y_0=0.000
    ellps=intl
    units=m
    no_defs
  <>

and those are rather different numbers.  Where possible, you can use the EPSG projection definition directly as:

PROJECTION
  "init=epsg:26951"
END

This greatly reduces the risk of typos, at the expense of making the projection definition more cryptic.

        - Ed

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

-----Original Message-----
From: UMN MapServer Users List [mailto:MAPSERVER-USERS at LISTS.UMN.EDU] On Behalf Of Nico Alberti
Sent: Tuesday, September 28, 2004 9:57 AM
To: MAPSERVER-USERS at LISTS.UMN.EDU
Subject: [UMN_MAPSERVER-USERS] Projections and WMS servers

Hi everybody.

I was happily working on a Mapserver project using only my shapefiles and raster images when I started playing with mapserv2.esrin.esa.it WMS server. According to the documentation (and what I am seeing on my screen :-) ) there is a severe projection mismatch. I am only the computer guy, so I have no great knowledge of this topic.
All I know is that my shape files are in Gauss-Boaga's (Monte Mario/Italy Zone 1) projection, so in my map file I put:

  PROJECTION
    "proj=tmerc "
    "lat_0=18.833333333 "
    "lon_0=-155.500000000 "
    "k=0.999967 "
    "x_0=152400.305 "
    "y_0=0.000 "
    "ellps=clrk66 "
    "to_meter=0.3048006096 "
    "no_defs"
  END

According to Proj config files this should be also known as epsg:26591 The problem is that I don't know if I can even use the esrin WMS server, as in its capability this projection is not listed.

So the question is lame: can I make it work (possibly in a simple
manner) or am I completely stuck? Being a test I would be happy if someone could point me to some other WMS server that can be used together with my data

Thank you in advance; as you can imagine Cartography is not exactly my field :-)
--
Ciao
Nico



More information about the MapServer-users mailing list