RE : [UMN_MA PSERVER-USERS] Mutiple "DATA " lines in a single l ayer?
Ed McNierney
ed at TOPOZONE.COM
Fri May 18 13:57:26 PDT 2007
Jeff -
Just use multiple layers in the map file, with a GROUP statement for each,
and a MINSCALE/MAXSCALE value in each. That will let them appear to the
client as a single logical layer using the GROUP name you specified.
- Ed
--
Ed McNierney
President and Chief Mapmaker
Maps a la carte, Inc. / TopoZone.com
73 Princeton Street, Suite 305
North Chelmsford, MA 01863
Phone: (978) 251-4242
Fax: (978) 251-1396
ed at topozone.com
From: Jeff Dege <jdege at KORTERRA.COM>
Reply-To: Jeff Dege <jdege at KORTERRA.COM>
Date: Fri, 18 May 2007 15:51:34 -0500
To: <MAPSERVER-USERS at LISTS.UMN.EDU>
Conversation: [UMN_MAPSERVER-USERS] RE : [UMN_MAPSERVER-USERS] Mutiple "DATA
" lines in a single layer?
Subject: Re: [UMN_MAPSERVER-USERS] RE : [UMN_MA PSERVER-USERS] Mutiple "DATA
" lines in a single l ayer?
We're using OpenLayers as the map viewer. MapServer will be running in CGI
mode, either directly or as a WMS server. So mapscript isn't part of the
equation.
I've never looked at the MapServer source, but I'm wondering if allowing
DATA statements to be placed in CLASS sections would be a reasonable
enhancement.
>
>
>
> From: UMN MapServer Users List [mailto:MAPSERVER-USERS at LISTS.UMN.EDU] On
> Behalf Of Guillaume SUEUR
> Sent: Friday, May 18, 2007 3:04 PM
> To: MAPSERVER-USERS at LISTS.UMN.EDU
> Subject: [UMN_MAPSERVER-USERS] RE : [UMN_MAPSERVER-USERS] Mutiple "DATA "
> lines in a single layer?
>
>
>
>
> 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/6b1afbd8/attachment.htm>
More information about the MapServer-users
mailing list