[Mapserver-users] WMS'ifying a MAP file and Reprojection OTF (shp, postgis & tiff)

Julia Harrell julia.harrell at ncmail.net
Wed Jul 30 22:24:52 EDT 2003


Hello Mapsever Experts

I'm inexperienced with Mapserver & not an expert at WMS, so I would 
appreciate some enlightenment from the list.

We are trying to add a Mapserver WMS map service to regional testbed 
for a National Map viewer. It is an ArcIMS viewer (bad, I know) but
that shouldn't matter a whole lot.  We do have 1 county participant 
already using Mapserver, and we are trying to WMS'ify a copy of their map 
file. Basically we think this just means adding projection and wms metadata 
to a copy of their existing mapfile, but there are issues with reprojecting 
on the fly that we need advice about.

They are running on some variety of Linux :

   MapServer version 3.6.4 OUTPUT=PNG OUTPUT=JPEG OUTPUT=WBMP 
   SUPPORTS=PROJ SUPPORTS=TTF SUPPORTS=WMS_SERVER SUPPORTS=WMS_CLIENT 
   INPUT=EPPL7 INPUT=JPEG INPUT=POSTGIS INPUT=GDAL INPUT=SHAPEFILE

We can get Mapserver to send a blank map when we issue a WMS GETMAP URL
request 
in a browser, but I suspect we have a problem in our projection information,
since none of the layers are drawing.

All of the data (shapefile & PostGIS) is in EPSG:32019 (NC State Plane,
units of Feet, 
NAD 27 Datum). The viewer is only going to be requesting data from all
participating 
map servers in EPSG:4326 (Lat/Longs - WGS84 datum), so this is the only SRS
we 
care about the map service outputting map images in.


>From my archive searching, I think I need to include a projection section
for 
each layer as well as in the main part of the MAP File. I need clarification
on 
these somewhat intertwined issues:

 A) do I use the EPSG code in the MAP section for the 
    SRS I want the maps output in? I want output in EPSG:4326,
    so if this is the case, I assume my extents & units should be in
    decimal degrees. Also, should we use the extents of the county
    or use extents as far out as we want the Mapserver data to
    be visible? Ideally we'd want to be able to view some of
    the layers at a regional level (things like ETJs & City Limits).

 B) do I use the EPSG code in each LAYER section for the
    SRS the data is actually stored in? I have data in EPSG:32019.
    If I should be specifying the output SRS here too, then where
    (and how) do I tell Mapserver what the actual SRS is? It doesn't 
    read shapfile .prj files, so how will it know?

 If either A or B (or both) is not true, then I guess I just need 
 someone to spell-it-all-out :)

 C) What do we need to do to correctly handle the datum transformation?
    I noticed the March 2003 discussion about PROJ support not 
    necessarily meaning you have support for datum shifts.  Does this
    handle only NAD27<->NAD83 datum shifts? I could certainly use
    an example of how we should specify the datum transformation from 
    NC State Plane (feet) NAD27 to WGS84 lat/longs for our output maps, 
    if just specifying the EPSG SRS code is not enough.   

  D) We also need advice about raster warping. One of the layers the 
     county wants to serve to the NC Natl Map viewer is a raster layer 
    (tiles of TIFF orthophotos). The raster how-to wiki page says:

      "However, raster warping is currently only supported for images 
       accessed through GDAL, not for the other builtin formats."
 
    There was no example, so this is actually of limited help to a newbie. 
    Can someone please point me to a well-annotated example of what a MAP 
    file should look like when reprojecting imagery with GDAL, instead of
the 
    (normally) built-in libtiff? Do we have to do anything differently, 
    other than not have libtiff support enabled?  I did read this post:
 
http://mapserver.gis.umn.edu/data2/wilma/mapserver-users/0301/msg00459.html

    How do you tell if your build of Mapserver was compiled without libtiff?
    Is it as simple as not seeing INPUT=TIFF on the -v command line output?
    Luckily, this county is using Linux, so recompilation (if needed)
    *may* be within the skill set of their contractors. 


I realize this is a lot of questions, but I haven't had any success finding
the 
answers we need. Eternal thanks to all who will respond with patience for
the 
extremely confused :)

Sincerely,

Julia Harrell
NC CGIA









More information about the mapserver-users mailing list