[MapServer-users] mapcache: time dimension default value and psql list_query
Hi mapserver users list I have a mapserver backend with mapcache to handle the tile queries and psql as a db. It's working but I have some details I'm trying to improve. 1: The time dimension has a default value. The client I server data to require this. I have 1 week of data available adding more data every 5 minute ( and deleting old data). Therefor the hard coded default value quickly become out of range. ie: time="true" unit="ISO8601"> Is there a way to make the default value be the newest value from my psql? (an emergency solution will be to make some kind of script that continuously update this value somehow, but I hoped to avoid that.) 2: I think I understand that list all timestamps values from the psql. This will be visible in the mapcache getcapabilities as a list of timestamps, 2016 stamps with data every 5 minutes for one week. Like units="ISO8601">2023-03-23T00:00:00Z, 2023-03-30T13:30:00Z Is there a way to make a start/end/step kind of list? eg 2023-03-23T00:00:00Z/2023-03-30T13:30:00Z/PT5M Thanks Trygve Aspenes ___ MapServer-users mailing list MapServer-users@lists.osgeo.org https://lists.osgeo.org/mailman/listinfo/mapserver-users
Re: [MapServer-users] Changing mapfile values via CGI parameters
Hi, it's been removed. see: https://mapserver.org/cgi/controls.html#using-mapserver-version-8 Previous versions of the MapServer CGI program allowed certain > parameters to be changed via a URL using a cumbersome synta Here's a bit longer explanation Steve Lime wrote a few month ago: Weitergeleitete Nachricht Betreff:Re: [MapServer-users] mapserver 8 - CGI map_object substitutions broken? Datum: Thu, 6 Oct 2022 14:49:32 -0500 Von:Steve Lime An: Tim Kempisty Kopie (CC): mapserver-users@lists.osgeo.org Hi Tim: I was wondering if I'd see any messages on that topic. Short story is that the functionality was removed in MS8. I never liked the all-or-nothing aspect of it and was working on a method to control which objects would be allowed to be updated. The solutions I came up with were convoluted and were going to add a lot of complexity to the codebase for little value. That functionality is poorly documented and by itself overly complicates the code. So after a note to mapserver-users trying to judge how much it was used - with limited replies - it was decided to remove it. I'm dealing with my own upgrade issues as a result, but it's worth it in the end IMHO. If necessary, it's better to revisit with another method - ideally something along the lines of runsubs. The challenge is specifying when to apply them and how to validate values. Strings are easy, but numeric/color values aren't so we'd need to do something like add runtime bindings (similar to attribute bindings) so you'd write SIZE %mysize% instead. One advantage being you could reuse the variable across layers. So, what are the options right now? It sort of depends on your needs. Do you need to only support a couple of sizes for a class or do you truly need *any* size? Options include: * multiple mapfiles - probably using includes to limit redundancy * class groups * if you're using a db backend I think attribute bindings could work paired with runsubs DATA "shape FROM (select *, %textsize% AS textsize FROM ...) VALIDATION "textsize_default" "13" "textsize" "^8|10|12|14$" END CLASS LABEL SIZE [textsize] # I think attribute binding works here END END * MapScript - load the mapfile, do the changes you need, render the map Happy to discuss further and perhaps other folks have ideas. Am 30.03.23 um 14:55 schrieb Benedek Petrovicz: Hi! I just upgraded MapServer from 7.7.0 to 8.0.0 and some CGI parameters just stopped working. I'm trying to change the label size on a specific layer with the following parameter: *map.layer[county].class[0].label[0]=SIZE+24* In 7.7.0 it's working perfectly. In 8.0.0 it's not changing anything. I couldn't find any notes about dropping this functionality in 8.0.0, but I might have missed something. What am I missing here? Thank you! Benedek ___ MapServer-users mailing list MapServer-users@lists.osgeo.org https://lists.osgeo.org/mailman/listinfo/mapserver-users -- Viele Grüße, Jörg Thomsen - Aufwind durch Wissen! Web-Seminare und Online-Schulungen bei der www.foss-academy.com - Jörg Thomsen WhereGroup GmbH Bundesallee 23 10717 Berlin Germany Tel: +49 (0)30 / 5130 278 74 Fax: +49 (0)30 / 5130 278 11 joerg.thom...@wheregroup.com www.wheregroup.com Geschäftsführer: Olaf Knopp, Peter Stamm Amtsgericht Bonn, HRB 9885 --- Folgen Sie der WhereGroup auf twitter: http://twitter.com/WhereGroup_com ___ MapServer-users mailing list MapServer-users@lists.osgeo.org https://lists.osgeo.org/mailman/listinfo/mapserver-users
[MapServer-users] Changing mapfile values via CGI parameters
Hi! I just upgraded MapServer from 7.7.0 to 8.0.0 and some CGI parameters just stopped working. I'm trying to change the label size on a specific layer with the following parameter: *map.layer[county].class[0].label[0]=SIZE+24* In 7.7.0 it's working perfectly. In 8.0.0 it's not changing anything. I couldn't find any notes about dropping this functionality in 8.0.0, but I might have missed something. What am I missing here? Thank you! Benedek ___ MapServer-users mailing list MapServer-users@lists.osgeo.org https://lists.osgeo.org/mailman/listinfo/mapserver-users
Re: [MapServer-users] Is there a way to make OPACITY depends of SCALE?
Hi, I think that would only be possible with several layers in a GROUP at the moment... Greetings Sven Am 30.03.2023 um 11:53 schrieb Carlos Neves (LREC): Hi List, Is there a way to change OPACITY by scale? The goal is to show Orthophotomaps under risk areas. LAYER # Rock Fall Risk Model NAME "rockfall" COMPOSITE OPACITY 50 END DATA "geotiffs/risk_m.tiff" # GeoTiff RockFall Risk File STATUS default TYPE RASTER METADATA "wms_title" "rockfall" END TEMPLATE "rockfall_query.html" # Rockfall Query file CLASS NAME "RockFall Risk" EXPRESSION ([pixel] > 0 ) #MAXSCALEDENOM 1 #MINSCALEDENOM 2000 STYLE DATARANGE 1 3 COLORRANGE 255 255 0 255 0 0 END #STYLE END #Class END # Rock Fall layer ends here risk map example: Best Regards, Carlos ___ MapServer-users mailing list MapServer-users@lists.osgeo.org https://lists.osgeo.org/mailman/listinfo/mapserver-users ___ MapServer-users mailing list MapServer-users@lists.osgeo.org https://lists.osgeo.org/mailman/listinfo/mapserver-users
Re: [MapServer-users] Is there a way to make OPACITY depends of SCALE?
Carlos, Yes, you can use SCALETOKEN. https://mapserver.org/mapfile/layer.html Michael Smith US Army Corps > On Mar 30, 2023, at 5:53 AM, Carlos Neves (LREC) wrote: > > > Hi List, > > Is there a way to change OPACITY by scale? The goal is to show > Orthophotomaps under risk areas. > > LAYER # Rock Fall Risk Model > NAME "rockfall" > COMPOSITE > OPACITY 50 > END > DATA "geotiffs/risk_m.tiff" # GeoTiff RockFall Risk File > STATUS default > TYPE RASTER > > METADATA >"wms_title" "rockfall" > END > TEMPLATE "rockfall_query.html" # Rockfall Query file > CLASS > NAME "RockFall Risk" > EXPRESSION ([pixel] > 0 ) > #MAXSCALEDENOM 1 > #MINSCALEDENOM 2000 > STYLE > DATARANGE 1 3 > COLORRANGE 255 255 0 255 0 0 > END #STYLE > END #Class > > > END # Rock Fall layer ends here > > > risk map example: > > > > Best Regards, > > Carlos > > ___ > MapServer-users mailing list > MapServer-users@lists.osgeo.org > https://lists.osgeo.org/mailman/listinfo/mapserver-users ___ MapServer-users mailing list MapServer-users@lists.osgeo.org https://lists.osgeo.org/mailman/listinfo/mapserver-users
[MapServer-users] Is there a way to make OPACITY depends of SCALE?
Hi List, Is there a way to change OPACITY by scale? The goal is to show Orthophotomaps under risk areas. LAYER # Rock Fall Risk Model NAME "rockfall" COMPOSITE OPACITY 50 END DATA "geotiffs/risk_m.tiff" # GeoTiff RockFall Risk File STATUS default TYPE RASTER METADATA "wms_title" "rockfall" END TEMPLATE "rockfall_query.html" # Rockfall Query file CLASS NAME "RockFall Risk" EXPRESSION ([pixel] > 0 ) #MAXSCALEDENOM 1 #MINSCALEDENOM 2000 STYLE DATARANGE 1 3 COLORRANGE 255 255 0 255 0 0 END #STYLE END #Class END # Rock Fall layer ends here risk map example: Best Regards, Carlos ___ MapServer-users mailing list MapServer-users@lists.osgeo.org https://lists.osgeo.org/mailman/listinfo/mapserver-users