[mapserver-users] no result with getFeatureInfo text/plain

Rahkonen Jukka (MML) jukka.rahkonen at maanmittauslaitos.fi
Wed Jun 10 08:15:40 PDT 2015


Hi,

Definitely, not sure about that. It can be a feature if you are both configuring Mapserver and building/controlling the applications which are using the service. If you just offer a WMS service for the public your users can't imagine that changing info_format in the client settings may have an effect on the data that is returned with GetFeatureInfo.  Consider GetMaps with image/png vs. image/jpeg or WFS GetFeature output as GML vs. GeoJSON.

Because attributes are different then MAP level setting could only have options "all" or "none".  Current situation means practically having "none" as a default for all layers. So the advantage would be an option to set the default to "all" for every layer in the service and Mapserver admin should remember to think if GetFeatureInto output should be restricted somehow for the new layers.  That does not feel like a big saving in labour.

What could save labour would be to generate automatically a template that would show all the fields which are listed in the "ows_include_items" in a simple default html table. Keyword for activating it could be "TEMPLATE" "AUTO" or something like that. I suppose that Geoserver is doing it that way http://docs.geoserver.org/latest/en/user/tutorials/GetFeatureInfo/index.html

-Jukka Rahkonen-

Jörg Thomsen wrote:

> Hello Jukka,

> it is definitely a feature. It's nice to define different outputs, all items for text/plain an only a formatted subset in html.

> But wouldn't it be nice too, if we only had to configure it in the header with an overwrite-option in the layer-section?

Jörg

Am 10.06.2015 um 16:26 schrieb Rahkonen Jukka (MML):
> Hi,
> 
> You must have either "wms_include_items" or "ows_include_items" in the LAYER-METADATA. Now you have only "gml_include_items" at LAYER level. You do have "ows_include_items" at MAP level but it does not have any effect there. On the other hand, "ows_include_items" does not have any effect on the text/html output but that can only be adjusted by editing the template. For sending out the same information with text/plain and text/html the Mapserver admin must make edits in two different places - ows_include_items and the template. I am not sure if this should be considered as a bug or a feature but at least it is confusing.
> 
> Tested with Mapserver 7.0-beta1.
> 
> -Jukka Rahkonen-
> 
> Jörg Thomsen wrote:
> 
> 
>> Hello,
> 
>> in my WMS getFeatureInfo works fine with info_format html [1] and gml, but I don't get a result with text/plain [2]. And I found similar a example on mapserver.org... [3] & [4].
> 
>> Why does getFeaturInfo for text/plain not work?
> 
> [1]
> http://geoportal.luckau.de/ows/flaechennutzungsplaene?VERSION=1.1.1&RE
> QUEST=GetFeatureInfo&SERVICE=WMS&LAYERS=FNP10_Grenze&QUERY_LAYERS=FNP1
> 0_Grenze&WIDTH=650&HEIGHT=450&SRS=EPSG:25833&BBOX=392406,5730396.80769
> 2308,434593,5759603.192307692&STYLES=&FORMAT=image/png&INFO_FORMAT=tex
> t/html&EXCEPTIONS=application/vnd.ogc.se_xml&X=369&Y=359&FEATURE_COUNT
> =100&
> 
> [2]
> http://geoportal.luckau.de/ows/flaechennutzungsplaene?VERSION=1.1.1&RE
> QUEST=GetFeatureInfo&SERVICE=WMS&LAYERS=FNP10_Grenze&QUERY_LAYERS=FNP1
> 0_Grenze&WIDTH=650&HEIGHT=450&SRS=EPSG:25833&BBOX=392406,5730396.80769
> 2308,434593,5759603.192307692&STYLES=&FORMAT=image/png&INFO_FORMAT=tex
> t/plain&EXCEPTIONS=application/vnd.ogc.se_xml&X=369&Y=359&FEATURE_COUN
> T=100&
> 
> [3]
> http://demo.mapserver.org/cgi-bin/wms?SERVICE=WMS&VERSION=1.1.1&REQUES
> T=GetFeatureInfo&BBOX=-11.332970,24.121208,47.584718,57.965035&SRS=EPS
> G:4326&WIDTH=1001&HEIGHT=575&LAYERS=cities&STYLES=&FORMAT=image/png&TR
> ANSPARENT=true&QUERY_LAYERS=cities&INFO_FORMAT=text/plain&X=229&Y=280
> 
> [4]
> http://demo.mapserver.org/cgi-bin/wms?SERVICE=WMS&VERSION=1.1.1&REQUES
> T=GetFeatureInfo&BBOX=-11.332970,24.121208,47.584718,57.965035&SRS=EPS
> G:4326&WIDTH=1001&HEIGHT=575&LAYERS=cities&STYLES=&FORMAT=image/png&TR
> ANSPARENT=true&QUERY_LAYERS=cities&INFO_FORMAT=text/html&X=229&Y=280
> 
> Jörg
> 
> and here's my mapfile:
>>   WEB
>>     IMAGEPATH '/tmp/'
>>     IMAGEURL '/tmp/'
>>
>>     METADATA
>>       'ows_title'           'Flächennutzungsplan der Stadt Luckau und seinen Ortsteilen'
>>       'ows_onlineresource'  'http://geoportal.luckau.de/ows/flaechennutzungsplaene'
>>       'ows_srs'             'EPSG:4326  EPSG:25832 EPSG:25833 EPSG:325833 EPSG:4528 EPSG:4839'
>>       'ows_abstract'        'WMS-Dienst zur Dartellung von Flächennutzungspläne im Stadtgebiet Luckau mit seinen Ortsteilen'
>>       'ows_accessconstraints' 'none'
>>       'ows_fees' 'none'
>>       'ows_keywordlist' 'Luckau, Flächennutzungspläne, WMS'
>>       'ows_include_items' 'all'
>>       'ows_encoding' 'ISO-8859-1'
>>       'WMS_FEATURE_INFO_MIME_TYPE' 'text/html'
>>       'gml_include_items' 'all'
>>       include      './includes/contact_information.inc.map'
>>     END
>>   END
>>
>> ### Layer ####
>>
>>   LAYER
>>     NAME 'FNP01_Grenze'
>> 	    CLASS
>>        NAME 'plan_grenze' 
>>        STYLE
>>          SYMBOL 0 
>> 		 width 3
>>          OUTLINECOLOR 0 0 255
>>          #COLOR 220 54 199
>>        END
>>     END
>>     DATA 'raster/fnp_luckau/grenzen_umring/plan_01_grenze.shp'
>>     METADATA
>>       'ows_title' 'FNP 01 Grenze'
>>       'ows_abstract' 'Umring Flächennuntzungsplan Luckau, Teil 1, Kümmritz, Uckro, Paserin'
>> 	  'ows_srs'             'EPSG:4326 EPSG:25833 EPSG:325833 EPSG:4528 EPSG:4839'
>> 	  "gml_include_items" "all"
>>       "gml_featureid"     "ID"
>>       "ows_enable_request" "*"
>>     END
>>     STATUS ON
>>     PROJECTION
>> 		"init=epsg:325833"
>>     END
>> 	    TYPE POLYGON
>>     DUMP true
>>     HEADER './templates/fnp_legende_header.html'
>>     TEMPLATE './templates/fnp_legende.html'
>>     FOOTER './templates/footer.html'
>>   END
> 
> 
> _______________________________________________
> mapserver-users mailing list
> mapserver-users at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/mapserver-users
> 



More information about the MapServer-users mailing list