[Geoprisma-dev] wms and xml config

Emmanuel NIYONGABIRE naleumme at yahoo.fr
Fri Jun 3 20:18:38 EDT 2011


I am trying to use geoprisma but I am just newbie with it. I'd like to know if 
to edit the config.xml file is enough to be able to display for example a wms 
layer. I've been working with OpenLayers and GeoExt and it's well doing. Wanting 
to graduate to geoprisma now...
Using one of the tutorials of Mapserver, I've a Mapfile like this:
MAP
 NAME "wmsconfig"
 EXTENT -180 -90 180 90
 IMAGECOLOR 255 255 255
 OUTPUTFORMAT
        NAME "gif"
        DRIVER "GD/GIF"
        MIMETYPE "image/gif"
        IMAGEMODE PC256
        EXTENSION "gif"
        TRANSPARENT ON
 END
 SIZE 400 300
 STATUS ON
 MAXSIZE 5120
 PROJECTION
  "init=epsg:4326"
 END
SYMBOLSET "../symbols/symboles.sym"
 WEB
   IMAGEPATH "c:/ms4w/Apache/htdocs/application/mapfiles"
   IMAGEURL "/application/"
   METADATA
     "wms_title"           "WMS-service"
     "wms_onlineresource" 
 "http://localhost/cgi-bin/mapserv.exe?map=c:/ms4w/Apache/htdocs/application/mapfiles/wmsconfig.map&"

     "wms_srs"             "EPSG:4326"
   END
 END

 LAYER
   DATA "c:/ms4w/Apache/htdocs/application/data/bluemarble.tiff"
   NAME "bluemarble"
   PROJECTION
     "init=epsg:4326"
   END
   METADATA
     "wms_title"           "bluemarble"
     "wms_srs"             "EPSG:4326"
   END
   STATUS ON
   TYPE RASTER
   UNITS METERS
 END

 LAYER
   CONNECTION "host=localhost dbname=mdb user=postgres password=success"
   CONNECTIONTYPE POSTGIS
   DATA "the_geom from countries using unique gid"
   NAME "countries"
   PROJECTION
     "init=epsg:4326"
   END
   METADATA
     "wms_title"           "countries"
     "wms_srs"             "EPSG:4326"
   END
   STATUS ON
   TYPE POLYGON
   UNITS METERS
   CLASS
     NAME "country"
     STYLE
       ANGLE 360
       COLOR 252 199 101
       OPACITY 80
       SYMBOL 0
     END
     STYLE
       ANGLE 360
       OPACITY 100
       OUTLINECOLOR 118 73 1
       SYMBOL 0
     END
   END
 END
END

With OpenLayers, this mapfile runs perfectly. But when I want to intergrate it 
into geoprima (config.xml), it does work.
I think I don't understand the main concepts (resource, datastore). Please, tell 
me, what is the datastore, or the resource through my mapfile.

How should I complete these blocks of the config.xml file:
<wms>
      <name>..???..</name>
      <srs>*</srs>
      <format>*</format>
      <source>..(what to put here) ...</source></wms>
<datastore>
      <name> ...what to put here???..</name>
      <params>
        <layers>..???..</layers>
      </params>
</datastore>
<resource>
      <name>????</name>

</resource>

Is it enough to edit the config.xml or do I have to edit the .xslt file?
Thank you for your answer!
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/geoprisma-dev/attachments/20110604/0ad45729/attachment.html


More information about the Geoprisma-dev mailing list