RE  : [UMN_MA PSERVER-USERS] Mutiple "DATA " lines in a single l ayer?

Jeff Dege jdege at KORTERRA.COM
Fri May 18 16:51:34 EDT 2007


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/7c4edb8b/attachment.html


More information about the mapserver-users mailing list