From cneves at lrec.pt Wed Nov 5 01:35:18 2025 From: cneves at lrec.pt (Carlos Neves (LREC)) Date: Wed, 5 Nov 2025 09:35:18 +0000 Subject: [MapServer-users] How to check if file is ready before loading with MAP file? Message-ID: Hi List, I have Mapserver running loading heavy Geotiffs files. I run a periodic background C script to make dynamic geotiffs files but sometimes the Geotiff files are not? ready (they are still in building process)? when Mapserver load it and stops displays maps. In PHP I can check that with "md5_file" function? comparing the two files.? I'm considering if there is any trick to do it with MAP files using a command like: "IF geotiff file not exist or not ready load another" Any ideas would be appreciated. Best Regards, Carlos From j.l.h.hartmann at gmail.com Wed Nov 5 02:31:29 2025 From: j.l.h.hartmann at gmail.com (Jan Hartmann) Date: Wed, 5 Nov 2025 11:31:29 +0100 Subject: [MapServer-users] How to check if file is ready before loading with MAP file? In-Reply-To: References: Message-ID: With MapScript that would be very easy > Op 5 nov 2025 om 10:44 heeft Carlos Neves (LREC) via MapServer-users het volgende geschreven: > > ?Hi List, > > I have Mapserver running loading heavy Geotiffs files. I run a periodic background C script to make dynamic geotiffs files but sometimes the Geotiff files are not ready (they are still in building process) when Mapserver load it and stops displays maps. > > In PHP I can check that with "md5_file" function comparing the two files. I'm considering if there is any trick to do it with MAP files using a command like: "IF geotiff file not exist or not ready load another" > > > Any ideas would be appreciated. > > Best Regards, > > Carlos > > > > > _______________________________________________ > MapServer-users mailing list > MapServer-users at lists.osgeo.org > https://lists.osgeo.org/mailman/listinfo/mapserver-users From jmckenna at gatewaygeomatics.com Wed Nov 5 02:48:29 2025 From: jmckenna at gatewaygeomatics.com (Jeff McKenna) Date: Wed, 5 Nov 2025 06:48:29 -0400 Subject: [MapServer-users] How to check if file is ready before loading with MAP file? In-Reply-To: References: Message-ID: <6de0d554-b65f-408e-864d-d89c3d605048@gatewaygeomatics.com> Hi Carlos, If you want to go down the PHP MapScript way, as Jan mentioned, we already do similar checks as part of the PHPUnit tests ( https://github.com/MapServer/MapServer/tree/main/msautotest/php ). Specifically, we use PHPUnit's assertFileEquals() function to compare 2 files ( see example at https://github.com/MapServer/MapServer/blob/main/msautotest/php/mapObjTest.php ), and you can even check speeds (see example at https://github.com/MapServer/MapServer/blob/main/msautotest/php/reprojectionObjTest.php ) (if you're wondering, we use PHPUnit version 12, from https://phpunit.de/ ) Hope that helps, -jeff -- Jeff McKenna GatewayGeo: Developers of MS4W, & offering MapServer Consulting/Dev co-founder of FOSS4G http://gatewaygeo.com/ On 2025-11-05 5:35 a.m., Carlos Neves (LREC) via MapServer-users wrote: > Hi List, > > I have Mapserver running loading heavy Geotiffs files. I run a periodic > background C script to make dynamic geotiffs files but sometimes the > Geotiff files are not? ready (they are still in building process)? when > Mapserver load it and stops displays maps. > > In PHP I can check that with "md5_file" function? comparing the two > files.? I'm considering if there is any trick to do it with MAP files > using a command like: "IF geotiff file not exist or not ready load another" > > > Any ideas would be appreciated. > > Best Regards, > > Carlos > > > > > _______________________________________________ > MapServer-users mailing list > MapServer-users at lists.osgeo.org > https://lists.osgeo.org/mailman/listinfo/mapserver-users From philippe.ghesquiere at airbus.com Thu Nov 6 00:48:44 2025 From: philippe.ghesquiere at airbus.com (Philippe Ghesquiere) Date: Thu, 6 Nov 2025 09:48:44 +0100 Subject: [MapServer-users] SLD styling : how to advertise for WMS/STYLE parameter Message-ID: Hi all, In our WMS server, I would like to advertise two different styles : - 1st style based on mapfile definition : 'default' - 2nd style based on SLD definition : 'sldStyle' I would like to offer clients a way to select which style they want to apply, using the WMS "STYLE" parameter : http://localhost/qgisserverxxx?SERVICE=WMS&REQUEST=GetMap&STYLE=sldStyle I have tried to use CLASSGROUP, NAME and GROUP keywords. My main file looks like : LAYER ... CLASSGROUP "MyVectors" ... # Mapfile definition CLASS NAME 'Name1' GROUP 'default' STYLE ... END LABEL ... END END # CLASS #SLD definition STYLEITEM "sld://SldDefinition.sld END My question is : How do I declare different styling groups within SLD definition ? The CLASS / NAME keyword is not appropriate. In the Mapserver documentation, I found two SLD keywords which could give a style name : - // - // Which one should I use ? landsat sldStyle <====== this one ? sldStyle <==== or this one ? ... Thanks for your help Philippe The information in this e-mail is confidential. The contents may not be disclosed or used by anyone other than the addressee. Access to this e-mail by anyone else is unauthorised. If you are not the intended recipient, please notify Airbus immediately and delete this e-mail. Airbus cannot accept any responsibility for the accuracy or completeness of this e-mail as it has been sent over public networks. If you have any concerns over the content of this message or its Accuracy or Integrity, please contact Airbus immediately. All outgoing e-mails from Airbus are checked using regularly updated virus scanning software but you should take whatever measures you deem to be appropriate to ensure that this message and any attachments are virus free. -------------- next part -------------- An HTML attachment was scrubbed... URL: