[mapserver-users] WMS Client?

Ian Turton ian at geography.leeds.ac.uk
Wed Oct 30 02:26:26 PST 2002


At 08:24 PM 29/10/2002, Van Ulden, Joost wrote:
>Hello all,
>
>I have some questions about the WMS Client capabilities of MapServer.  Is it
>possible to create a map from both local and remote files.  It was my
>understanding that this was possible however I have been unsuccessful.  I
>get the following error when trying to load a remote layer:
>msDrawRasterLayer(): Unable to access file. chdir()
>
>Does anyone have a sample mapfile that does this?  Any suggestions?

Here's how we do it.

#
# Projection definition, consult the PROJ.4 documentation for parameter 
discussion
#
PROJECTION
         "init=epsg:4269"
END

WEB
         IMAGEPATH /home/karl/ccgweb/Web/tmp/
#       LOG /home/karl/ccgweb/Web/ian/wms.log
         METADATA
                 "wms_title" "CCG demo WMS"
                 "wms_onloneresource" "http://www.ccg.leeds.ac.uk/cgi-bin/wms?"
                 "wms_srs" "EPSG:4269 EPSG:4326 EPSG:27700"
         END
END


##
## Start of layer definitions
##
#
LAYER
      NAME demis
      METADATA
        "wms_title" "Demis"
                          "wms_srs" "EPSG:4326"
                          "wms_boundingbox" "epsg:4326 -180 -90 180 90"
                          "wms_latlonboundingbox" "-180 -90 180 90"
                          wms_extent "-180 -90 180 90"
                          "wms_opaque" "true"
                          "wms_abstract" "Simple basemap from Demis 
(http://www2.demis.nl)."
                          "wms_connectiontimeout" "5000"
      END
      TYPE RASTER
      STATUS OFF
      CONNECTIONTYPE WMS
      CONNECTION 
"http://www2.demis.nl/mapserver/request.asp?WMTVER=1.0.0&LAYERS=Countries,Topography,Hillshading,Coastlines,Rivers,Streams,Waterbodies&STYLES=&FORMAT=png&BGCOLOR=0xFFFFFF&EXCEPTIONS=INIMAGE"
END
LAYER
      NAME NIMA_color
      METADATA
        "wms_title" "color:NIMA-DTED0"
                          "wms_srs" "EPSG:4269"
                          "wms_boundingbox" "epsg:4269 -180 -90 180 90"
                          "wms_latlonboundingbox" "-180 -90 180 90"
                          wms_extent "-180 -90 180 90"
                          "wms_abstract" "Simple basemap from cubewerx 
(http://www.cubewerx.com/)."
                          "wms_opaque" "true"
      END
      TYPE RASTER
      STATUS OFF
      CONNECTIONTYPE WMS
      CONNECTION 
"http://www.cubewerx.com/demo/cubeserv/cubeserv.cgi?request=map&WMTVER=1.0.0&LAYERS=color:NIMA-DTED0&STYLES=&FORMAT=PNG&TRANSPARENT=TRUE&BGCOLOR=0xFFFFFF&EXCEPTIONS=INIMAGE"
END

LAYER
      NAME etopo5
      METADATA
        "wms_title" "Elevation/Bathymetry"
                          "wms_srs" "EPSG:4269"
                          "wms_boundingbox" "epsg:4269 -180 -90 180 90"
                          "wms_latlonboundingbox" "-180 -90 180 90"
                          wms_extent "-180 -90 180 90"
                          "wms_opaque" "true"
                          "wms_abstract" "Etopo5 foundation from cubwerx 
(http://usl.cubewerx.com)."
      END
      TYPE RASTER
      STATUS OFF
      CONNECTIONTYPE WMS
      CONNECTION 
"http://usl.cubewerx.com/gfst/cubeserv/cubeserv.cgi?request=map&WMTVER=1.0.0&LAYERS=ETOPO5:Foundation&STYLES=&FORMAT=PNG&TRANSPARENT=TRUE&BGCOLOR=0xFFFFFF&EXCEPTIONS=INIMAGE"
END
LAYER
         name world
         data world.png
         type raster
         status off
         projection
                 "init=epsg:4326"
         END
         METADATA
                 wms_title world
          wms_extent "-180 -90 180 90"
         END
END

>Thank you in advance.
>
>=================================
>Joost van Ulden
>Programmer/Analyst
>Geological Survey of Canada, Pacific Division
>101-605 Robson Street
>Vancouver, BC V6B 5J3
>ph    604.666.7525
>fax   604.666.1124
>msn jvanulde at nrcan.gc.ca
>=================================
>"Anyone who has lost track of time when using a computer knows the
>propensity to dream, the urge to make dreams come true and the tendency to
>miss lunch." - Tim Berners-Lee

Ian Turton, Director, Centre for Computational Geography, University of 
Leeds, Leeds, LS2 9JT
http://www.geog.leeds.ac.uk/people/i.turton http://www.ccg.leeds.ac.uk 
http://www.geotools.org
+44 (0) 113 343 3392 fax: +44 (0) 113 343 3308




More information about the MapServer-users mailing list