Re: [mapserver-users] [Feature Request] Ability to extract capture group contents from regex validation

2021-07-27 Thread Trond Michelsen
This sounds like a good idea to me, but I would suggest to use named
capture groups. In perl, this uses this syntax: (?pattern). So,
in this example, it could be:

"datetime" "^(?[0-9]{4})[-_](?[0-9]{2})[-_](?[0-9]{2})$" # <- 
3 capture groups

And the result could then be used in substitution as: %year%, %month%
and %day%. Maybe with an added prefix, but I'd prefer without, tbh.

On Tue, Jul 27, 2021 at 06:12:44AM +, Sommer, Ashley (L&W, Dutton Park) 
wrote:
> Hi All,
> This is slightly related to my previous thread today, but more general.
> 
> I want to gauge interested in this idea.
> I want to be able to use Runtime Substitution mechanisms to do something like 
> this:
> 
> MAP
>   ...
>   VALIDATION
> "datetime" "^([0-9]{4})[-_]([0-9]{2})[-_]([0-9]{2})$" # <- 3 capture 
> groups
>   END
> 
>   LAYER
> DATA "/mnt/dataset/%datetime_1%/%datetime_2%/%datetime_3%.tif"
> ...
>   END
>   ...
> END
> 
> Where the query with &datetime=2018-01-29 is split into parts using capture 
> groups 1, 2, and 3 from the validation regex, and stored as new runtime 
> substitution variables: %datetime_1%, %datetime_2%, and %datetime_3%.
> Then using these values, substitute them into the DATA string (or any other 
> valid substitution point).
> Substituted:
> DATA "/mnt/dataset/2018/01/29.tif"
> 
> The regex mechanism to validate the incoming parameter value is already in 
> place, and it seems like just one more little step is needed to save the 
> captured groups into new runtime substitution variables.
> 
> - Ashley Sommer

> ___
> mapserver-users mailing list
> mapserver-users@lists.osgeo.org
> https://lists.osgeo.org/mailman/listinfo/mapserver-users


-- 
Trond Michelsen
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/mapserver-users


Re: [mapserver-users] Extracting Year, Month, Day from WMS time query

2021-07-27 Thread Trond Michelsen
On Tue, Jul 27, 2021 at 03:57:10AM +, Sommer, Ashley (L&W, Dutton Park) 
wrote:
> I've read the documentation around WMS_Time and Runtime Substitution, but I 
> can't quite work out if this is even possible.
> Note, I understand I could probably do this at the apache level, by 
> transforming the query with a rewrite eg:
> "&TIME=2018-08-01" -> "&TIME=2018-08-01&YEAR=2018&MONTH=08&DAY=01"
> But I'd prefer to do it at the Mapfile level.

Hi.

I'm doing exactly this. Although, I'm not using mod_rewrite, instead I
have a mod_perl module as a URI Translation handler, but it's
essentially doing exactly the same thing as a regular rewrite.

This works reasonably well, but I wouldn't mind if this functionality
was baked into the mapfile. Especially since this could then be easily
applied to other temporal dimensions than just TIME. 

-- 
Trond Michelsen
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/mapserver-users


[mapserver-users] Next MapServer project steering committe meeting: Thursday 13:00UTC

2021-07-27 Thread Jeff McKenna
Hi everyone!

This is not usual, but here it goes...

We all know that MapServer has a vibrant user community (and sometimes 
development is not as visible or discussed as in other projects), so 
(unofficially) I'd like to mention here that the MapServer Project Steering 
Committee ("PSC", that means the 10+ individuals who help make decisions 
regarding the management of MapServer releases and code changes) will be 
meeting this coming Thursday on IRC chat.  You are also encouraged to join the 
meeting (there is an agenda item near the end called "community feedback", 
where you can give input on what's important or missing in the upcoming 8.0 
release, etc).   Join and share!  That's what FOSS is all about.   Thanks!

- time:
- 13:00 UTC (8am Minny, 3pm Paris) 
https://www.timeanddate.com/worldclock/fixedtime.html?year=2021&month=07&day=29&hour=13&min=0&sec=0&msg=MapServer+PSC+Meeting
- agenda: https://github.com/MapServer/MapServer/wiki/PSC-Meeting-2021-07-29
- location: the meeting will be held in the #mapserver channel at 
https://web.libera.chat/#mapserver


-jeff


--
Jeff McKenna
GatewayGeo: Developers of MS4W, MapServer Consulting and Training
co-founder of FOSS4G
http://gatewaygeo.com/








___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/mapserver-users


[mapserver-users] Please add your site (or OGC services) to the MapServer Gallery

2021-07-27 Thread Jeff McKenna
Hi everyone!

A few years ago a new MapServer user reminded us that we need working examples
of applications (and MapServer-driven WMS/WFS/OWS services) listed on
our map gallery.  Please take a minute to add your site and specs
(respecting the syntax and alphabetical order) at:
https://github.com/mapserver/mapserver/wiki/MapServer-Site-Gallery

It has become a great resource!  Please take a moment to make sure that your 
MapServer-driven site or OGC services are listed there, especially as we are 
getting closer to the big MapServer 8.0 release.  So help show off the powers 
of MapServer!!

Thank you everyone :)

-jeff


--
Jeff McKenna
GatewayGeo: Developers of MS4W, MapServer Consulting and Training
co-founder of FOSS4G
http://gatewaygeo.com/





___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/mapserver-users