RE : [UMN_MAPSERVER-USERS] Mutiple "DATA " lines in a single layer?
Guillaume SUEUR
guillaume.sueur at GEOSIGNAL.FR
Fri May 18 13:03:51 PDT 2007
as Stephen said, there is only ONE data statement per layer. But, if you use mapscript, you can change it dynamically depending on the scale for example
---------------------------------------------
Guillaume SUEUR
Géosignal - Groupe BVA
25bis Avenue Marcel Dassault
BP 95836
31505 Toulouse CEDEX 05
Tél : 05 61 17 47 17
---------------------------------------------
________________________________
De: UMN MapServer Users List de la part de Jeff Dege
Date: ven. 18/05/2007 20:32
À: MAPSERVER-USERS at LISTS.UMN.EDU
Objet : [UMN_MAPSERVER-USERS] Mutiple "DATA" lines in a single layer?
I'm starting to play around with using MapServer to serve maps from a
PostGIS database.
One of the features that MapServer has is that you can define multiple
classes within a single layer, so you can change the way that the map
looks when drawn at different scales/resolutions.
Is there some way to define multiple data sources within a single layer,
so that I can change how that data is obtained at different layers?
In particular, I'm wondering how to best take advantage of PostGIS's
simplify() function - which can be used to reduce the number of points
included in a geometry based on resolution. If I'm drawing a map at a
resolution where one pixel equals 2000 meters on the ground, there is no
advantage to sending the viewer a geometry defined with points
twenty-five meters apart.
The obvious way is to define multiple layers, each enabled at certain
scales, and to include the resulution appropriate for those scales in
the DATA keyword's sql statement. But this requires that the layer be
duplicated for each scale range. Is there a way to enable different
DATA sql statements at different scales/resolutions in a single layer
definition?
I don't see the DATA keyword in the documentation for the CLASS section.
Which is where I'd expect it to be if I could do what I want.
Is there a way of including a value calculated from the scale in the SQL
statement within the LAYER section?
DATA "simplify(the_geom, 1.0/<scale>) from streets"
Or am I stuck with using multiple layers?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/mapserver-users/attachments/20070518/97ea5b03/attachment.htm>
More information about the MapServer-users
mailing list