Wasn't RFC 86 (http://mapserver.org/development/rfc/ms-rfc-86.html) intended to solve such problems? Does something like the following work and do the job?
SCALETOKEN NAME "%geometry%" VALUES "0" "the_geom" "1000" "st_simplify(the_geom, 100)" "10000" "st_simplify(the_geom, 1000)" END END DATA "the_geom from (select %geometry% as the_geom, prop1 from roads) as foo" Would be nice to know if that would work... Regards, Andreas Eichner > -----Ursprüngliche Nachricht----- > Von: mapserver-users-boun...@lists.osgeo.org [mailto:mapserver-users- > boun...@lists.osgeo.org] Im Auftrag von thomas bonfort > Gesendet: Dienstag, 31. Dezember 2013 18:46 > An: Rahkonen Jukka > Cc: Mapserver-Users (mapserver-users@lists.osgeo.org) > Betreff: Re: [mapserver-users] Automatic simplification based on > resolution > > Jukka, > IIRC this has already surfaced a few times on the mailing list or the > bugtracker. MapServer already simplifies geometries at the pixel > level > before sending them to the renderers, and from my testing at the time > was more efficient at doing so than using st_simplify(), with the > added bonus that the cellsize (resolution, units per pixel) does not > need to be factored in the actual SQL query, and that the > simplification applies to all data backends. > Doing the simplification inside postgis does however make sense if > the > data transfer from db to mapserver is a bottleneck, and/or > potentially > if reprojection is involved (as less points would need to be fed into > proj). If you can come up with hard numbers to show there is a gain > I'd be interested. > > regards, > thomas > > > > On 31 December 2013 10:31, Rahkonen Jukka <jukka.rahko...@mmmtike.fi> > wrote: > > Hi, > > > > Mapnik has such a feature > http://blog.cartodb.com/post/20163722809/speeding-up-tiles-rendering > > Andrea Aime is experimenting with it with Geoserver and is reaching > a 50% speedup. > > http://osgeo-org.1560.x6.nabble.com/Some-interesting-optmizations- > from-Jonathan-s-load-test-td5095839.html > > Can Mapserver do the same? > > > > -Jukka Rahkonen- > > _______________________________________________ > > mapserver-users mailing list > > mapserver-users@lists.osgeo.org > > http://lists.osgeo.org/mailman/listinfo/mapserver-users > _______________________________________________ > mapserver-users mailing list > mapserver-users@lists.osgeo.org > http://lists.osgeo.org/mailman/listinfo/mapserver-users _______________________________________________ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users