[mapserver-users] Doubt about MapServer projections and WMS

Jorge Arévalo jorge.arevalo at deimos-space.com
Thu Nov 10 13:49:45 EST 2011


Hello,

>From http://mapserver.org/mapfile/projection.html

I get this:

"(...) To set up projections you must define one projection object for
the output image (in the MAP object) and one projection object for
each layer (in the LAYER objects) to be projected.

(..)

Think of the MAP-level projection object as your output projection.
The EXTENT and UNITS values at the MAP-level must be in the output
projection units. Also, if you have layers in other projections (other
than the MAP-level projection) then you must define PROJECTION objects
for those layers, to tell MapServer what projections they are in."

Ok, pretty clear so far. Mapserver will render one or more data
layers. Each data layer will have its own projection, and this is
specified in the PROJECTION property of the layer object. The layers
will be render to a image map with another projection. This projection
is specified in the PROJECTION property of the MAP object, at highest
level. This is the output projection.

Now, I want to serve my maps under WMS protocol.
http://mapserver.org/ogc/wms_server.html#setup-a-mapfile-for-your-wms

So, I need to define a MAP PROJECTION. And that projection will be
used to generate a BoundingBox tag for the GetCapabilities XML
response. But, my first question: Is this the projection in which the
data will be rendered? What about if I want to serve my data in
different projections? Do I need to specify several PROJECTION objects
at MAP level?

I guess not, because I read: "(...)  it is often impossible to find an
EPSG code to match the projection of your data. In those cases, the
“wms_srs” metadata is used to list one or more EPSG codes that the
data can be served in, and the PROJECTION object contains the real
PROJ4 definition of the data’s projection"

So, if I understood, I specify the output projections I offer for my
data in "wms_srs" at WEB object level. But then, why do I need a
PROJECTION object at MAP level? I specified the projection of all my
input data in each LAYER object. Or other way:

- My input data projection is defined at LAYER level
- The output projections offered are specified in "wms_srs" at WEB level

Then,,, why do I need PROJECTION object at MAP level when I want to
configure my WMS server?

Sorry for the basic questions, and many thanks in advance

Best regards,

-- 
Jorge Arévalo
Internet & Mobility Division, DEIMOS
jorge.arevalo at deimos-space.com
http://es.linkedin.com/in/jorgearevalo80
http://mobility.grupodeimos.com/
http://gis4free.wordpress.com
http://geohash.org/ezjqgrgzz0g


More information about the mapserver-users mailing list