[mapserver-users] XML interface for query templates

Daniel Morissette morissette at dmsolutions.ca
Mon Apr 23 21:10:22 EDT 2001


Cameron Shorter wrote:
> 
> Stephen Lime wrote:
> >
> > Hi Cameron: We're also working on XML output, initially as part of WMS compliance
> > but then in a more general sense.
> 
> Ah yes, we are creating a WMS (web map server) by putting a perl wrapper
> on top of mapserv.  (We have it working with a couple of minor bugs).
> 
> It would be great to see it done properly within the mapserv baseline.
> How long to you expect it to take to develop the WMS interface?
> 

Cameron,

There has been quite a bit of work on this recently (between Steve and
us), and WMS compatibility is actually there now as part of the mapserv
CGI and is being tested in a few places.  Unfortunately we don't have a
WMS client *publicly* accessible to demonstrate it, but I've setup a
server with the GeoGratis GMap demo data at:
  http://www2.dmsolutions.ca:8099/cgi-bin/mswms_gmap

If anyone has a WMS client then you're invited to try accessing the
server and report any problem you notice.
(Note: mswms_gmap in the URL above is just a simple shell script that
presets the MS_MAPFILE variable and then calls the mapserv V3.5 CGI with
WMS compiled in)

The Capabilities URL is:
http://www2.dmsolutions.ca:8099/cgi-bin/mswms_gmap?request=capabilities

And I guess the simplest possible getMap URL would be:
http://www2.dmsolutions.ca:8099/cgi-bin/mswms_gmap?wmtver=1.0.7&request=map
(I know the above URL is missing some required WMS parameters, but
MapServer forgives that and uses defaults from the map file :)

Here are some of the current features/limitations of WMS support:

- Support for both WMS v1.0.0 and WMS v1.0.7 (draft spec)
- Support for getCapabilities, getMap, and getFeatureInfo
- FeatureInfo currently supported only for type=MIME and returns 
  a text/plain response (will be extended to return a text/html
  response using MapServer HTML templates). 
- GML FeatureInfo output will be supported but is not there yet.
- Capabilities document contains nothing about Styles yet and the
  current implmentation ignores everything about styles.
- Maps can be served in any PROJ.4 supported projection 
  (including on-the-fly raster reprojection if mapserv is compiled
   with the GDAL raster library)

If you feel brave then you can get the CVS source and compile it, then
update your map file to version 3.5 (most changes are related to QUERY
stuff and new METADATA object), and give it a try.  The CVS source is in
pretty good shape so compiling should not be a problem... it's just that
there are a few things required in your MAP file for your server to
generate a valid capabilities document.  I'll try to list them here:

- You need a METADATA object in the WEB object with at least the
  following:
  WEB
   ...
   METADATA
   "title"          "My WMS Server"
   "wms_all_proj"   "EPSG:4269 EPSG:4326"
   "onlineresource" "http://www2.dmsolutions.ca:8099/cgi-bin/mswms_gmap"
   END
  END

- Then the MAP PROJECTION *must* be defined using an EPSG code:
  PROJECTION
    "init=epsg:4269"
  END

  (Note: "init=epsg:..." is possible because a new epsg translation
   file has been added to PROJ 4.4.3 that is required by MapServer 3.5)

- And each layer must have a NAME, the following METADATA and
  a PROJECTION:

  LAYER
    NAME highways
    ...
    METADATA
     "title"   "Highways"
    END
    PROJECTION
     "init=epsg:4269"
    END
    ...
  END


Hopefully the above should be enough to get you going, but since you
already have an understanding of the spec then it should not be too
bad... this will all have to be documented before we officially release
the thing and start supporting it.  
(That's probably why WMS support was not announced by Steve on the list
yet... sorry if I sold the scoop, Steve ;)

-- 
------------------------------------------------------------
 Daniel Morissette               morissette at dmsolutions.ca
 DM Solutions Group              http://www.dmsolutions.ca/
------------------------------------------------------------
  Don't put for tomorrow what you can do today, because if 
      you enjoy it today you can do it again tomorrow.




More information about the mapserver-users mailing list