msRASTERLayerOpen(): General error message. Attempt to open a RASTER layer, but this is only supported after a raster query
Frank Warmerdam
warmerdam at POBOX.COM
Thu Nov 25 07:11:14 PST 2004
Bart van den Eijnden wrote:
> Hi list,
>
> if I use a wfs_filter in my METADATA section for a WMS layer in
> php_mapscript_44 I get the following error message, and the map comes back
> fully red (the color depends on the color defined in my only class). If I
> use php_mapscript_42 the right selection comes back (INWONERS < 35000),
> but php_mapscript_42 probably ignored the wfs_filter I guess?
>
> If I comment out the wfs_filter I get back my selection in red.
...
> LAYER
> CONNECTION "http://myserver/cgi-bin/44beta3/mapserv.exe?map=/mymap.map&"
> CONNECTIONTYPE WMS
...
> CLASS
> EXPRESSION ( ([INWONERS] < 35000) )
> METADATA
> END
> STYLE
> COLOR 255 0 0
> MAXSIZE 500
> MINSIZE 1
> SYMBOL 0
> END
Bart,
I read this message originally because you included msRasterLayerOpen() in
the subject line. Did you get the error message in the subject line at
some point?
What is the CLASS definition supposed to accomplish in a WMS layer?
The msRasterLayerOpen() is the open/close code I recently wrote for
raster layers so that query results could be accessed. If you are getting
that error message, it might be because WMS layers are also being treated like
raster layers for some purposes that they should not. If you can submit a
bug report for a situation where that message is issued when it should not,
perhaps you should submit a bug report on the issue so that I can fix it.
I haven't looked to close at the WMS layer code, but in general the results
of the WMS query are fetched back as a raster file which is then passed off
to the normal raster layer rendering code to overlay. If the WMS layer definition
is passed in unaltered to the raster code (I think it works this way) then of
course everything will be painted red. There is no [INWONERS] attribute as far
as the raster classification code is concerned, so the expression would
presumably always evaluate as true and everything would be set to red. If
you did a test like "[INWONERS] < 2500 and [INWONDERS] ne 0" I suspect the
class definition would be ignored by the raster code. But even then the
low level raster code would still try to "classify" the WMS result which I
doubt you really want.
Best regards,
--
---------------------------------------+--------------------------------------
I set the clouds in motion - turn up | Frank Warmerdam, warmerdam at pobox.com
light and sound - activate the windows | http://pobox.com/~warmerdam
and watch the world go round - Rush | Geospatial Programmer for Rent
More information about the MapServer-users
mailing list