[mapserver-users] Data for a layer based on zoom level

Jesper Kempe jesper.kempe at gmail.com
Fri Oct 4 00:11:39 PDT 2013


Hi

We have bunch of data for different times loaded into a PostGIS-database.
This data has an id that we match to a another table containing the
geometries with a join. To get the correct data for given timestep a %TIME%
parameter from the WMS-query is used in the where clause.

CONNECTIONTYPE postgis
DATA "the_geom from (select gid, stationname, the_geom, cout from
highres_shapes join seadata on stationname=seaareaid where
reftime='2013-10-03T07:59:00Z' and validtime = '%TIME%') as subquery using
SRID=3006 using unique gid"


The problem now is performance. The geometries used are very detailed so on
high zoom levels it takes a bit too long to plot all the polygons. Zoomed
in where fewer polygon are in view it takes no time to plot the image.

I have created a simplified version of the geometries that is quite a lot
faster to draw. But this polygon can only be used on the highest levels. If
you zoom in further we need to use higher resolution.

I have tried to create two layers with the same GROUP and
different MINSCALEDENOM and MACSCALEDENOM. That works but then I cant get
the supplied TIME-parameter in the url to be used in the db-query.

The question for you guys now if there is another way I can switch between
the two versions (ie database tables) of the geometries based on zoom level?


Jesper
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/mapserver-users/attachments/20131004/a874d536/attachment.htm>


More information about the MapServer-users mailing list