[Geoprisma-dev] wms and xml config

Julien-Samuel Lacroix jlacroix at mapgears.com
Mon Jun 6 10:04:12 EDT 2011


Hi,

Service: URL to your mapfile
DataStore: Name of your layer
Resource: If you have 2 services pointing to the same data, WMS and 
TileCache for example, you group the layers here. So a resource is the 
group of all Datastore pointing to the same layer.



<wms>
       <name>Unique ID</name>
       <srs>*</srs>
       <format>*</format>
       <source>http://your_url.com?map=/your/mapfile.map</source>
</wms>
<datastore>
       <name>Unique ID</name>
       <params>
         <layers>layer_name_in_your_mapfile</layers>
       </params>
</datastore>
<resource>
       <name>Unique ID</name>
       <datastores>
         <datastore>Unique ID of the datastore</datastore>
       </datastores>
</resource>


The last thing to know is that you always put the security on your Resource.

Also, like Yves suggested, look at the documentation and the samples, it 
should help a lot.


HTH.
Julien



On 11-06-03 08:18 PM, Emmanuel NIYONGABIRE wrote:
> 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!
>
>
>
> _______________________________________________
> Geoprisma-dev mailing list
> Geoprisma-dev at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/geoprisma-dev

-- 
Julien-Samuel Lacroix
Mapgears
http://www.mapgears.com/


More information about the Geoprisma-dev mailing list