[mapserver-users] problem with WMS GetFeatureInfo and GML

Bart van den Eijnden (OSGIS) bartvde at osgis.nl
Fri Sep 4 10:28:44 PDT 2009


Hi Steve,

there is no way to output a geometry with WMS GetFeatureInfo right now, 
see also:

http://trac.osgeo.org/mapserver/ticket/2989

You would better use a WFS GetFeature request.

Best regards,
Bart

Steve.Toutant at inspq.qc.ca wrote:
>
> Hello,
> Via openlayers I launch an url to mapserver (v5.2.1) which returns a 
> GML. See the URL and the response below. I put the layer definition of 
> the mapfile as well.
> I'm not sure if my problem is on mapserver or on openlayers side. The 
> problem is I can't add the geometry to the openlayers vector layer for 
> some reasons. As if the geometry was null.
> If someone could confirm that everything is ok or not on mapserver 
> side would help me.
>
> thanks in advance for your help,
> Steve
> *****************************************
> LAYER
>   NAME "national_2006"
>   GROUP "Vulnerabilite"
>   CONNECTIONTYPE postgis
>   CONNECTION "host=10.2.192.247 dbname=geo user=dbaInspq 
> password=!dbaInspq! port=5432"
>   DATA "geom900913 FROM lim_admin.inddef_2006 using unique gid"
>   TYPE POLYGON
>   STATUS off
>
> PROJECTION
>   "init=epsg:900913"
> END
> PROCESSING "CLOSE_CONNECTION=DEFER"
>   METADATA
>     "wms_title"             "Indice de défavorisation national 2006"
>     "wms_group_title"       "Vulnérabilité"
>     'wms_srs'             'EPSG:4326 EPSG:32198 EPSG:900913'
> "wms_include_items" "all"
>         "gml_include_items" "ad,quintmat,quintsoc"
>         'gml_featureid' 'gid'
>   END
> DUMP TRUE
>         TOLERANCE 0
>         TEMPLATE '../template/query_indiceDef.html'
> HEADER '../template/query_header.html'
> FOOTER '../template/query_footer.html'
>         INCLUDE "/ms4w/inspq/map/Class_IndiceDefavorisation.map"
> END
> **********************************
>
> http://10.2.192.247/cgi-bin/mapserv.exe?map=/ms4w/paccSante/map/paccsante_chaleur.map&&service=WMS&version=1.1.0&request=GetFeatureInfo&layers=national_2006&query_layers=national_2006&styles=&bbox=-8225541.519129%2C5696087.269543%2C-8187017.256881%2C5719324.126138&srs=EPSG%3A900913&feature_count=10&x=425&y=500&height=608&width=1008&info_format=application%2Fvnd.ogc.gml 
>
> *********************************************************************************** 
>
> And the response is this:
> <?xml version="1.0" encoding="ISO-8859-1"?>
>
> <msGMLOutput
>          xmlns:gml="http://www.opengis.net/gml"
>          xmlns:xlink="http://www.w3.org/1999/xlink"
>          xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
>         <national_2006_layer>
>                 <national_2006_feature>
>                         <gml:boundedBy>
>                                 <gml:Box srsName="EPSG:900913">
>                                         
> <gml:coordinates>-8212506.502737,5697097.841728 
> -8204853.558950,5702856.964043</gml:coordinates>
>                                 </gml:Box>
>                         </gml:boundedBy>
>                         <ad>24662464</ad>
>                         <quintmat>1</quintmat>
>                         <quintsoc>2</quintsoc>
>                 </national_2006_feature>
>         </national_2006_layer>
> </msGMLOutput>
>
>  
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> mapserver-users mailing list
> mapserver-users at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/mapserver-users
>   


-- 
Bart van den Eijnden
OSGIS, Open Source GIS
bartvde at osgis.nl
http://www.osgis.nl




More information about the MapServer-users mailing list