[MapServer-users] multiple shapepaths

Jan Hartmann j.l.h.hartmann at gmail.com
Wed Dec 13 09:39:06 PST 2023


No, this is too complex. And Steve's runtime-substutions with %path% in 
de URL probably does not work. I don't see how that could be done in 
PHP-MapScript.

On 06/12/2023 21:23, Rahkonen Jukka wrote:
>
> Hi,
>
> Or write the DATA with full-path into an INCLUDE file if there are 
> loads of mapfiles using the same paths. Then there would be much less 
> editing when the paths change.
>
> -Jukka Rahkonen-
>
> *Lähettäjä:* MapServer-users <mapserver-users-bounces at lists.osgeo.org> 
> *Puolesta *Lime, Steve D (MNIT) via MapServer-users
> *Lähetetty:* keskiviikko 6. joulukuuta 2023 21.59
> *Vastaanottaja:* j.l.h.hartmann at gmail.com; Steve Lime <sdlime at gmail.com>
> *Kopio:* mapserver-users at lists.osgeo.org
> *Aihe:* Re: [MapServer-users] multiple shapepaths
>
> IMHO, if you do a SHAPEPATH at the layer level then you might as well 
> just add the full-path to the DATA element. You’re not really gaining 
> anything with the additional complexity. Did the idea of using runtime 
> variables not pan out?
>
> *From:*MapServer-users <mapserver-users-bounces at lists.osgeo.org> *On 
> Behalf Of *Jan Hartmann via MapServer-users
> *Sent:* Wednesday, December 6, 2023 1:14 AM
> *To:* Steve Lime <sdlime at gmail.com>
> *Cc:* mapserver-users at lists.osgeo.org
> *Subject:* Re: [MapServer-users] multiple shapepaths
>
> How about a shapepath at the layer level? I am combining 20 years of 
> working with old maps in three (or four :-)) different countries 
> (Netherlands, Germany and Flemish and Walloon Belgium), all in their 
> own formats, projections, directories an servers. It would help to 
> keep my applications (and my mind) clear if I could use the 
> appropriate shapepaths. And as to portability, it is essential to use 
> relative paths. Just try to move a website to a new server with a 
> differently named filesystem, if all paths are hard coded.
>
> Jan
>
>     Op 5 dec 2023 om 15:43 heeft Steve Lime <sdlime at gmail.com> het
>     volgende geschreven:
>
>     
>
>     It won’t work. A configuration is loaded in entirety first, and
>     then applied as necessary.
>
>     On Tue, Dec 5, 2023 at 7:21 AM Jan Hartmann via MapServer-users
>     <mapserver-users at lists.osgeo.org> wrote:
>
>         Not sure. I cannot get it working anyway. Any ideas, Steve?
>
>         On 04/12/2023 10:10, Jörg Thomsen (WhereGroup) via
>         MapServer-users wrote:
>         > Hi,
>         >
>         > I am not sure, but perhaps overwriting it, would work?
>         >
>         > MAP
>         >
>         >   shapepath 'blah'
>         >
>         >   Layer 1
>         >   Layer 2
>         >
>         >   shapepath 'blubb'
>         >
>         >   Layer 3
>         >   Layer 4
>         >
>         > Jörg
>         >
>         >
>         >
>         > Am 02.12.23 um 19:32 schrieb Jan Hartmann via MapServer-users:
>         >> Yes, that is what I sought, didn't know it was possible.
>         Thanks!
>         >>
>         >> Jan
>         >>
>         >> On 02/12/2023 19:29, Steve Lime wrote:
>         >>> One other thought, you can use multiple paths via runtime
>         subs to
>         >>> approximate what I think you’re looking for, so:
>         >>>
>         >>> WEB
>         >>>   VALIDATION
>         >>>     path1_default “/opt/path1”
>         >>>     path1 “^\/opt\/path1$”
>         >>>   path2_default “/opt/path2”
>         >>>   path2 “^\/opt\/path2$”
>         >>>   END
>         >>> END
>         >>>
>         >>> Then in DATA values you’d use %path1% or %path2%. This is
>         another
>         >>> use case for variables that was suggested recently. We could,
>         >>> perhaps, define a way to mark something as immutable via
>         url so the
>         >>> regex could be simplified and only the default would ever
>         be used
>         >>> (e.g. “path2” “immutable”).
>         >>>
>         >>> —Steve
>         >>>
>         >>> On Fri, Dec 1, 2023 at 11:28 PM Steve Lime
>         <sdlime at gmail.com> wrote:
>         >>>
>         >>>     Nope, just the one value.
>         >>>
>         >>>     On Fri, Dec 1, 2023 at 1:02 PM Jan Hartmann via
>         MapServer-users
>         >>>     <mapserver-users at lists.osgeo.org> wrote:
>         >>>
>         >>>         Hi,
>         >>>
>         >>>         Is it possible to use multiple paths in a shapepath?
>         >>>         ./data1:./data2
>         >>>         does not work
>         >>>
>         >>>         Jan
>         >>> _______________________________________________
>         >>>         MapServer-users mailing list
>         >>> MapServer-users at lists.osgeo.org
>         >>> https://lists.osgeo.org/mailman/listinfo/mapserver-users
>         >>>
>         >>
>         >>
>         >> _______________________________________________
>         >> MapServer-users mailing list
>         >> MapServer-users at lists.osgeo.org
>         >> https://lists.osgeo.org/mailman/listinfo/mapserver-users
>         >
>
>         _______________________________________________
>         MapServer-users mailing list
>         MapServer-users at lists.osgeo.org
>         https://lists.osgeo.org/mailman/listinfo/mapserver-users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/mapserver-users/attachments/20231213/38361803/attachment-0001.htm>


More information about the MapServer-users mailing list