<html><head><meta http-equiv="content-type" content="text/html; charset=utf-8"></head><body dir="auto"><div dir="ltr"></div><div dir="ltr">Yes, setting a runtime variable is equivalent to an adaptable shapepath. I hadn’t realised that they could be set in thr MapFile. Can they be set in PHP Mapscript as:</div><div dir="ltr"><br></div><div dir="ltr">$oMap->web->validation->path1 = <path>; ?</div><div dir="ltr"><br><blockquote type="cite">Op 6 dec 2023 om 20:59 heeft Lime, Steve D (MNIT) <steve.lime@state.mn.us> het volgende geschreven:<br><br></blockquote></div><blockquote type="cite"><div dir="ltr">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<style>@font-face { font-family: "Cambria Math"; }
@font-face { font-family: Calibri; }
p.MsoNormal, li.MsoNormal, div.MsoNormal { margin: 0in; font-size: 11pt; font-family: Calibri, sans-serif; }
a:link, span.MsoHyperlink { color: blue; text-decoration: underline; }
span.EmailStyle20 { font-family: Calibri, sans-serif; color: windowtext; }
.MsoChpDefault { font-size: 10pt; }
@page WordSection1 { size: 8.5in 11in; margin: 1in; }
div.WordSection1 { page: WordSection1; }</style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
<div class="WordSection1">
<p class="MsoNormal">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?<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<div>
<div style="border:none;border-top:solid #E1E1E1 1.0pt;padding:3.0pt 0in 0in 0in">
<p class="MsoNormal"><b>From:</b> MapServer-users <mapserver-users-bounces@lists.osgeo.org>
<b>On Behalf Of </b>Jan Hartmann via MapServer-users<br>
<b>Sent:</b> Wednesday, December 6, 2023 1:14 AM<br>
<b>To:</b> Steve Lime <sdlime@gmail.com><br>
<b>Cc:</b> mapserver-users@lists.osgeo.org<br>
<b>Subject:</b> Re: [MapServer-users] multiple shapepaths<o:p></o:p></p>
</div>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<div>
<div>
<p class="MsoNormal">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.<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">Jan<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><br>
<br>
<o:p></o:p></p>
<blockquote style="margin-top:5.0pt;margin-bottom:5.0pt">
<p class="MsoNormal" style="margin-bottom:12.0pt">Op 5 dec 2023 om 15:43 heeft Steve Lime <<a href="mailto:sdlime@gmail.com">sdlime@gmail.com</a>> het volgende geschreven:<o:p></o:p></p>
</blockquote>
</div>
<blockquote style="margin-top:5.0pt;margin-bottom:5.0pt">
<div>
<p class="MsoNormal"> <o:p></o:p></p>
<div>
<p class="MsoNormal">It won’t work. A configuration is loaded in entirety first, and then applied as necessary.<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
<div>
<div>
<p class="MsoNormal">On Tue, Dec 5, 2023 at 7:21 AM Jan Hartmann via MapServer-users <<a href="mailto:mapserver-users@lists.osgeo.org">mapserver-users@lists.osgeo.org</a>> wrote:<o:p></o:p></p>
</div>
<blockquote style="border:none;border-left:solid #CCCCCC 1.0pt;padding:0in 0in 0in 6.0pt;margin-left:4.8pt;margin-right:0in">
<p class="MsoNormal">Not sure. I cannot get it working anyway. Any ideas, Steve?<br>
<br>
On 04/12/2023 10:10, Jörg Thomsen (WhereGroup) via MapServer-users wrote:<br>
> Hi,<br>
><br>
> I am not sure, but perhaps overwriting it, would work?<br>
><br>
> MAP<br>
><br>
> shapepath 'blah'<br>
><br>
> Layer 1<br>
> Layer 2<br>
><br>
> shapepath 'blubb'<br>
><br>
> Layer 3<br>
> Layer 4<br>
><br>
> Jörg<br>
><br>
><br>
><br>
> Am 02.12.23 um 19:32 schrieb Jan Hartmann via MapServer-users:<br>
>> Yes, that is what I sought, didn't know it was possible. Thanks!<br>
>><br>
>> Jan<br>
>><br>
>> On 02/12/2023 19:29, Steve Lime wrote:<br>
>>> One other thought, you can use multiple paths via runtime subs to <br>
>>> approximate what I think you’re looking for, so:<br>
>>><br>
>>> WEB<br>
>>> VALIDATION<br>
>>> path1_default “/opt/path1”<br>
>>> path1 “^\/opt\/path1$”<br>
>>> path2_default “/opt/path2”<br>
>>> path2 “^\/opt\/path2$”<br>
>>> END<br>
>>> END<br>
>>><br>
>>> Then in DATA values you’d use %path1% or %path2%. This is another <br>
>>> use case for variables that was suggested recently. We could, <br>
>>> perhaps, define a way to mark something as immutable via url so the <br>
>>> regex could be simplified and only the default would ever be used <br>
>>> (e.g. “path2” “immutable”).<br>
>>><br>
>>> —Steve<br>
>>><br>
>>> On Fri, Dec 1, 2023 at 11:28 PM Steve Lime <<a href="mailto:sdlime@gmail.com" target="_blank">sdlime@gmail.com</a>> wrote:<br>
>>><br>
>>> Nope, just the one value.<br>
>>><br>
>>> On Fri, Dec 1, 2023 at 1:02 PM Jan Hartmann via MapServer-users<br>
>>> <<a href="mailto:mapserver-users@lists.osgeo.org" target="_blank">mapserver-users@lists.osgeo.org</a>> wrote:<br>
>>><br>
>>> Hi,<br>
>>><br>
>>> Is it possible to use multiple paths in a shapepath?<br>
>>> ./data1:./data2<br>
>>> does not work<br>
>>><br>
>>> Jan<br>
>>> _______________________________________________<br>
>>> MapServer-users mailing list<br>
>>> <a href="mailto:MapServer-users@lists.osgeo.org" target="_blank">MapServer-users@lists.osgeo.org</a><br>
>>> <a href="https://lists.osgeo.org/mailman/listinfo/mapserver-users" target="_blank">
https://lists.osgeo.org/mailman/listinfo/mapserver-users</a><br>
>>><br>
>><br>
>><br>
>> _______________________________________________<br>
>> MapServer-users mailing list<br>
>> <a href="mailto:MapServer-users@lists.osgeo.org" target="_blank">MapServer-users@lists.osgeo.org</a><br>
>> <a href="https://lists.osgeo.org/mailman/listinfo/mapserver-users" target="_blank">
https://lists.osgeo.org/mailman/listinfo/mapserver-users</a><br>
><br>
<br>
_______________________________________________<br>
MapServer-users mailing list<br>
<a href="mailto:MapServer-users@lists.osgeo.org" target="_blank">MapServer-users@lists.osgeo.org</a><br>
<a href="https://lists.osgeo.org/mailman/listinfo/mapserver-users" target="_blank">https://lists.osgeo.org/mailman/listinfo/mapserver-users</a><o:p></o:p></p>
</blockquote>
</div>
</div>
</div>
</blockquote>
</div>
</div>
</div></blockquote></body></html>