WMS GetMap-Request and class expressions
sweykam at TELELINE.ES
Fri Oct 7 11:32:05 EDT 2005
Hi list members,
A while ago I developed a very simple mapserver application which I would
now like to make available as WMS. I wonder if it is possible to modify the
class expressions via the WMS GetMap-request ?? Or can this only be done by
You can see the application here at: http://184.108.40.206/Atlas/
It contains maps of 3 thematic groups (species distribution maps, maps on
biodiversity indices and environmental factors) and a query that allows to
generate a list of species, biodiversity indices and environmental factors
for each graticule.
The species distribution maps are what I would like to make available as web
map service but I can't figure out how to pass the parameter on that
indicates the species code.
The problem is the layer 'Dlyr', my species distribution layer.
As for the application, the user selects a species name from a list and this
variable is then used to render the map by modifying the predefined classes
in the map file.
$clObj1->setExpression('(['.$sp.']>0 AND ['.$sp.']<=20)');
$clObj2->setExpression('(['.$sp.']>20 AND ['.$sp.']<=40)');
$clObj3->setExpression('(['.$sp.']>40 AND ['.$sp.']<=60)');
$clObj4->setExpression('(['.$sp.']>60 AND ['.$sp.']<=80)');
The class ranges never change, no matter what species is selected.
The species code $sp identifies a column in a PostgreSQL table, i.e. [DEMI].
Each species has its table column.
I have already prepared a first version that you may try typing this in your
You may retrieve a map composition, for example...
First, the client has to have as well a species list that allows to select
and pass on the species code (I will later make this list available). How is
the species identifier added to the request string ?
I guess, this calls for providing the layer as WFS instead (?). The client
then creates his own classes and I don't have to modify my code at all?
Is it possible to avoid that the whole data set is retrieved by a
GetFeature-request? I tried by specifying 'wfs_maxfeatures', but it had no
effect on the GetFeature response.
I am using MapServer 4.4 and this layer is a PostGIS table.
Thanks for your comments,
More information about the mapserver-users