[Chameleon] Query Widget and WMS layers added via WMSBrowser widget

Paul Spencer pspencer at dmsolutions.ca
Sun Dec 12 20:43:08 EST 2004


Unfortunately, WMS gives you no indication of the actual type of data 
that is being rendered for any given layer.  If there is a WFS 
associated with the WMS, it is possible to do a DescribeLayer request to 
find the WFS server and typename, then attempt to establish the data 
type from the WFS server, but even this is not guaranteed as WFS doesn't 
require that the data be homogeneous (i.e. all the same type, so you can 
have mixed points and polygons).

So in most cases, the TYPE of a WMS layer is set to RASTER because, as 
far as MapServer is concerned, it is a RASTER that it is dealing with. 
Before 4.0, this was actually mandatory.  It changed to allow other than 
RASTER types to aid in SLD processing (actually, to allow creation of 
classes on WMS layers that are automatically turned into an SLD when 
requesting the layer).

The type of a WMS layer should not affect its 'queryability' ... I think 
this is a sufficient test case to post as a bug on the mapserver 
bugzilla ... post your layer definition and a query string that 
passes/fails when the layer type changes.



Ken Sanderson wrote:
> Thanks for the reply Paul, did what you suggested and I think I found 
> the problem.
> The WMS Browser is setting the type of the WMS layer, atleast in the 
> cases I have tried, to RASTER. If I manually edit the latest MAP file in 
> the sessions folder and change that to POLYGON then the identify on the 
> WMS layer works properly.
> I tried several different WMS servers and different layers, along with 
> polygon and line features and every time the WMS Browser is setting
> Is there something I can change to make the WMS Browser set the 
> appropriate type of layer instead of just RASTER?
> Thanks,
> Ken
> PS - Pasting the LAYER info from the session map file below so you can 
> see it completely.
>     CONNECTION "http://wms1.agr.gc.ca/cgi-bin/mapeco?"
>       METADATA
>         "wms_srs"    "EPSG:42304 EPSG:42101 EPSG:4269 EPSG:4326 
> EPSG:26907 EPSG:26908 EPSG:26909 EPSG:26910 EPSG:26911 EPSG:26912 
> EPSG:26913 EPSG:26914 EPSG:26915 EPSG:26916 EPSG:26917 EPSG:26918 
> EPSG:26919 EPSG:26920 EPSG:26921 EPSG:26922 EPSG:32607 EPSG:32608 
> EPSG:32609 EPSG:32610 EPSG:32611 EPSG:32612 EPSG:32613 EPSG:32614 
> EPSG:32615 EPSG:32616 EPSG:32617 EPSG:32618 EPSG:32619 EPSG:32620 
> EPSG:32621 EPSG:32622 EPSG:42304"
>         "wms_onlineresource"    "http://wms1.agr.gc.ca/cgi-bin/mapeco?"
>         "wms_latlonboundingbox"    "-179.23399 33.9634 -7.91397 85.1585"
>         "layer_index"    "15"
>         "wms_queriable"    "1"
>         "wms_name"    "ecozones"
>         "wms_formatlist"    "image/png, image/jpeg, image/wbmp, 
> text/html, image/tiff"
>         "wms_format"    "image/png"
>         "wms_boundingbox"    "EPSG:42304 -2600000 -875000 3200000 4000000"
>         "LEGEND_ORDER"    "15"
>         "wms_server_version"    "1.1.1"
>         "wms_title"    "Ecozones"
>       END
>     NAME "National_Ecosites-ecozones"
>       "init=epsg:42304"
>     END
>     TEMPLATE "blank.html"
>   END
> Paul Spencer wrote:
>> Ken,
>> you will need to look at the difference between the layer you add 
>> manually and the layer that gets added using WMS Browser by finding 
>> the latest mapfile in the newest session directory in the tmp directory.
>> There is probably some difference (perhaps subtle like tolerance) that 
>> is causing problems.
>> Cheers,
>> Paul
>> Ken Sanderson wrote:
>>> Trying to get this working and not seeming to have much luck.
>>> If I put a WMS layer in my MAP file with a template specified then I 
>>> have no problems using the query tool to query a specific WMS layer.
>>> However if I add the extact same WMS layer to my map using the WMS 
>>> Browser widget, it wont return anything from my query attempts, 
>>> though it does return:
>>> The following layers did not return any results:
>>> National_Ecosites-ecozones
>>> Which makes me think that its atleast trying. Is this possible, and 
>>> is there some trick to it that I obviously dont know?
>>> Thanks,
>>> Ken
>>> _______________________________________________
>>> Chameleon mailing list
>>> Chameleon at lists.maptools.org
>>> http://lists.maptools.org/mailman/listinfo/chameleon
> _______________________________________________
> Chameleon mailing list
> Chameleon at lists.maptools.org
> http://lists.maptools.org/mailman/listinfo/chameleon

|Paul Spencer                           pspencer at dmsolutions.ca   |
|Applications & Software Development                              |
|DM Solutions Group Inc                 http://www.dmsolutions.ca/|

More information about the Chameleon mailing list