From j.l.h.hartmann at gmail.com Fri Dec 1 11:02:31 2023 From: j.l.h.hartmann at gmail.com (Jan Hartmann) Date: Fri, 1 Dec 2023 20:02:31 +0100 Subject: [MapServer-users] multiple shapepaths Message-ID: Hi, Is it possible to use multiple paths in a shapepath? ./data1:./data2 does not work Jan From sdlime at gmail.com Fri Dec 1 21:28:00 2023 From: sdlime at gmail.com (Steve Lime) Date: Fri, 1 Dec 2023 23:28:00 -0600 Subject: [MapServer-users] multiple shapepaths In-Reply-To: References: Message-ID: 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 > -------------- next part -------------- An HTML attachment was scrubbed... URL: From sdlime at gmail.com Sat Dec 2 10:29:11 2023 From: sdlime at gmail.com (Steve Lime) Date: Sat, 2 Dec 2023 12:29:11 -0600 Subject: [MapServer-users] multiple shapepaths In-Reply-To: References: Message-ID: 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 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 >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From j.l.h.hartmann at gmail.com Sat Dec 2 10:32:19 2023 From: j.l.h.hartmann at gmail.com (Jan Hartmann) Date: Sat, 2 Dec 2023 19:32:19 +0100 Subject: [MapServer-users] multiple shapepaths In-Reply-To: References: Message-ID: 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 wrote: > > Nope, just the one value. > > On Fri, Dec 1, 2023 at 1:02?PM Jan Hartmann via MapServer-users > 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 > -------------- next part -------------- An HTML attachment was scrubbed... URL: From joerg.thomsen at wheregroup.com Mon Dec 4 01:10:30 2023 From: joerg.thomsen at wheregroup.com (=?UTF-8?Q?J=C3=B6rg_Thomsen_=28WhereGroup=29?=) Date: Mon, 4 Dec 2023 10:10:30 +0100 Subject: [MapServer-users] multiple shapepaths In-Reply-To: References: Message-ID: <6d0b6a96-895e-4874-9687-e4fa219ade51@wheregroup.com> 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 wrote: >> >> Nope, just the one value. >> >> On Fri, Dec 1, 2023 at 1:02?PM Jan Hartmann via MapServer-users >> 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 -- Viele Gr??e, J?rg Thomsen ********************************** Where2B Konferenz 2023 14. Dezember 2023 in Bonn und Online https://where2b-conference.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.thomsen at 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 From j.l.h.hartmann at gmail.com Tue Dec 5 05:21:51 2023 From: j.l.h.hartmann at gmail.com (Jan Hartmann) Date: Tue, 5 Dec 2023 14:21:51 +0100 Subject: [MapServer-users] multiple shapepaths In-Reply-To: <6d0b6a96-895e-4874-9687-e4fa219ade51@wheregroup.com> References: <6d0b6a96-895e-4874-9687-e4fa219ade51@wheregroup.com> Message-ID: <761234b4-36ae-47fc-aa21-477d70b74ff2@gmail.com> 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 wrote: >>> >>> ??? Nope, just the one value. >>> >>> ??? On Fri, Dec 1, 2023 at 1:02?PM Jan Hartmann via MapServer-users >>> ??? 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 > From sdlime at gmail.com Tue Dec 5 06:43:40 2023 From: sdlime at gmail.com (Steve Lime) Date: Tue, 5 Dec 2023 08:43:40 -0600 Subject: [MapServer-users] multiple shapepaths In-Reply-To: <761234b4-36ae-47fc-aa21-477d70b74ff2@gmail.com> References: <6d0b6a96-895e-4874-9687-e4fa219ade51@wheregroup.com> <761234b4-36ae-47fc-aa21-477d70b74ff2@gmail.com> Message-ID: 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 wrote: > >>> > >>> Nope, just the one value. > >>> > >>> On Fri, Dec 1, 2023 at 1:02?PM Jan Hartmann via MapServer-users > >>> 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: From j.l.h.hartmann at gmail.com Tue Dec 5 23:13:45 2023 From: j.l.h.hartmann at gmail.com (j.l.h.hartmann at gmail.com) Date: Wed, 6 Dec 2023 08:13:45 +0100 Subject: [MapServer-users] multiple shapepaths In-Reply-To: References: Message-ID: <2D4A7852-F469-4ABA-8D38-5F8BA4791C30@gmail.com> An HTML attachment was scrubbed... URL: From bob.basques at ci.stpaul.mn.us Wed Dec 6 05:50:11 2023 From: bob.basques at ci.stpaul.mn.us (Bob Basques) Date: Wed, 6 Dec 2023 13:50:11 +0000 Subject: [MapServer-users] OSGeo Twin Cities Local Chapter Monthly Meeting (aka TCMUG) Message-ID: All, Had a great meeting last evening at the Lift Bridge Brewery in Stillwatewr. Smaller group, but good discussion, and some new(er) faces as well. Next month?s meeting will be at Urban Growler in St. Paul. As always, if anyone wants to show off what they have been working on, just send me a note, and I?ll set up the virtual online presentation. You are not required to attend in person if you want to do a virtual presentation. Date: Dec 13th, 4:30 ? 6:00 Place: Urban Growler in St. Paul, Mn. See you there. Bobb Get me in Teams PW19-S295-C024 -------------- next part -------------- An HTML attachment was scrubbed... URL: From j.l.h.hartmann at gmail.com Wed Dec 6 06:39:49 2023 From: j.l.h.hartmann at gmail.com (Jan Hartmann) Date: Wed, 6 Dec 2023 15:39:49 +0100 Subject: [MapServer-users] multiple shapepaths In-Reply-To: References: <2D4A7852-F469-4ABA-8D38-5F8BA4791C30@gmail.com> Message-ID: <10b21033-1ed2-4107-8b19-591db97e69af@gmail.com> No, this would make the file system on my server an even worse spaghetti mess than when I move the files physically under one root. I want to leave everything as distributed as possible. Cheers, Rich, Steve and all, Jan On 06/12/2023 14:21, Richard Greenwood wrote: > How about just symlink in the file system? > > On Wed, Dec 6, 2023 at 12:14?AM Jan Hartmann via MapServer-users > wrote: > > 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 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 >> 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 >> wrote: >> >>> >> >>> ??? Nope, just the one value. >> >>> >> >>> ??? On Fri, Dec 1, 2023 at 1:02?PM Jan Hartmann via >> MapServer-users >> >>> ??? 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 >> > _______________________________________________ > MapServer-users mailing list > MapServer-users at lists.osgeo.org > https://lists.osgeo.org/mailman/listinfo/mapserver-users > > > > -- > Richard W. Greenwood > www.greenwoodmap.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From steve.lime at state.mn.us Wed Dec 6 11:58:58 2023 From: steve.lime at state.mn.us (Lime, Steve D (MNIT)) Date: Wed, 6 Dec 2023 19:58:58 +0000 Subject: [MapServer-users] multiple shapepaths In-Reply-To: <2D4A7852-F469-4ABA-8D38-5F8BA4791C30@gmail.com> References: <2D4A7852-F469-4ABA-8D38-5F8BA4791C30@gmail.com> Message-ID: 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 On Behalf Of Jan Hartmann via MapServer-users Sent: Wednesday, December 6, 2023 1:14 AM To: Steve Lime 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 > 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 > 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 > wrote: >>> >>> Nope, just the one value. >>> >>> On Fri, Dec 1, 2023 at 1:02?PM Jan Hartmann via MapServer-users >>> > 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: From jukka.rahkonen at maanmittauslaitos.fi Wed Dec 6 12:23:49 2023 From: jukka.rahkonen at maanmittauslaitos.fi (Rahkonen Jukka) Date: Wed, 6 Dec 2023 20:23:49 +0000 Subject: [MapServer-users] multiple shapepaths In-Reply-To: References: <2D4A7852-F469-4ABA-8D38-5F8BA4791C30@gmail.com> Message-ID: 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 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 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 > On Behalf Of Jan Hartmann via MapServer-users Sent: Wednesday, December 6, 2023 1:14 AM To: Steve Lime > 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 > 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 > 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 > wrote: >>> >>> Nope, just the one value. >>> >>> On Fri, Dec 1, 2023 at 1:02?PM Jan Hartmann via MapServer-users >>> > 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: From j.l.h.hartmann at gmail.com Wed Dec 6 12:28:25 2023 From: j.l.h.hartmann at gmail.com (Jan Hartmann) Date: Wed, 6 Dec 2023 21:28:25 +0100 Subject: [MapServer-users] multiple shapepaths In-Reply-To: References: Message-ID: <3CFF6767-D54A-485C-AED2-8432D1672BC4@gmail.com> An HTML attachment was scrubbed... URL: From grabermtw at gmail.com Fri Dec 8 11:46:50 2023 From: grabermtw at gmail.com (Matthew Graber) Date: Fri, 8 Dec 2023 11:46:50 -0800 Subject: [MapServer-users] Speeding up msDrawMap() for shapefiles Message-ID: Hi, I'm trying to speed up the time required for msDrawMap() to execute for rendering shapefiles. Currently, according to the mapserver logs, it's taking 2.5-3.5 seconds, sometimes up to 5 seconds for it to execute: [Wed Dec 6 18:43:47 2023].699791 CGI Request 53 on process 2641 [Wed Dec 6 18:43:47 2023].717216 msDrawMap(): rendering using outputformat named png (AGG/PNG). [Wed Dec 6 18:43:52 2023].299580 msDrawMap(): Layer 1010 (Shapefile_Layer), 4.582s [Wed Dec 6 18:43:52 2023].299792 msDrawMap(): Drawing Label Cache, 0.000s [Wed Dec 6 18:43:52 2023].299803 msDrawMap() total time: 4.584s [Wed Dec 6 18:43:52 2023].310853 msSaveImage(stdout) total time: 0.011s [Wed Dec 6 18:43:52 2023].310883 mapserv request processing time (msLoadMap not incl.): 4.611s The mapfile is currently set up using "CONNECTIONTYPE OGR" and "CONNECTION" to access the shapefiles from an S3 bucket as follows: CONNECTIONTYPE OGR CONNECTION '/vsis3/s3_bucket_path/my_shapefile%.shp' I noticed at https://mapserver.org/input/vector/shapefiles.html that it says "Shapefile access is built directly into MapServer. It is also available through OGR, but direct access without OGR is recommended and discussed here." So I tried removing "CONNECTIONTYPE OGR" and changing "CONNECTION" to "DATA" as follows: DATA '/vsis3/s3_bucket_path/my_shapefile%.shp' I haven't been able to observe any definitive speed improvements by doing this yet, although I can't say for sure that there aren't any. Based on https://mapserver.org/optimization/vector.html, I also tried using the shptree command to create a spatial index and the coshp command to sort the shapefile and index. Even after doing that, I still see load msDrawMap() times of up to 5 seconds. Does anyone know of any other optimizations that could be made here? Or if not, would using shptree and coshp on the shapefile and then accessing it in the mapfile using "DATA" to take it from S3 be the optimal way to set things up? Thanks! Matt -------------- next part -------------- An HTML attachment was scrubbed... URL: From jukka.rahkonen at maanmittauslaitos.fi Fri Dec 8 11:57:56 2023 From: jukka.rahkonen at maanmittauslaitos.fi (Rahkonen Jukka) Date: Fri, 8 Dec 2023 19:57:56 +0000 Subject: [MapServer-users] Speeding up msDrawMap() for shapefiles In-Reply-To: References: Message-ID: Hi, You should test the same shapefiles locally for understanding where the time gets spent. Normal time with simple styles is perhaps up to 300 ms. The optimization hints were written long before there were S3 or Amazon (the company). Unfortunately I don't know how to optimize access to S3. -Jukka Rahkonen- L?hett?j?: MapServer-users Puolesta Matthew Graber via MapServer-users L?hetetty: perjantai 8. joulukuuta 2023 21.47 Vastaanottaja: mapserver-users at lists.osgeo.org Aihe: [MapServer-users] Speeding up msDrawMap() for shapefiles Hi, I'm trying to speed up the time required for msDrawMap() to execute for rendering shapefiles. Currently, according to the mapserver logs, it's taking 2.5-3.5 seconds, sometimes up to 5 seconds for it to execute: [Wed Dec 6 18:43:47 2023].699791 CGI Request 53 on process 2641 [Wed Dec 6 18:43:47 2023].717216 msDrawMap(): rendering using outputformat named png (AGG/PNG). [Wed Dec 6 18:43:52 2023].299580 msDrawMap(): Layer 1010 (Shapefile_Layer), 4.582s [Wed Dec 6 18:43:52 2023].299792 msDrawMap(): Drawing Label Cache, 0.000s [Wed Dec 6 18:43:52 2023].299803 msDrawMap() total time: 4.584s [Wed Dec 6 18:43:52 2023].310853 msSaveImage(stdout) total time: 0.011s [Wed Dec 6 18:43:52 2023].310883 mapserv request processing time (msLoadMap not incl.): 4.611s The mapfile is currently set up using "CONNECTIONTYPE OGR" and "CONNECTION" to access the shapefiles from an S3 bucket as follows: CONNECTIONTYPE OGR CONNECTION '/vsis3/s3_bucket_path/my_shapefile%.shp' I noticed at https://mapserver.org/input/vector/shapefiles.html that it says "Shapefile access is built directly into MapServer. It is also available through OGR, but direct access without OGR is recommended and discussed here." So I tried removing "CONNECTIONTYPE OGR" and changing "CONNECTION" to "DATA" as follows: DATA '/vsis3/s3_bucket_path/my_shapefile%.shp' I haven't been able to observe any definitive speed improvements by doing this yet, although I can't say for sure that there aren't any. Based on https://mapserver.org/optimization/vector.html, I also tried using the shptree command to create a spatial index and the coshp command to sort the shapefile and index. Even after doing that, I still see load msDrawMap() times of up to 5 seconds. Does anyone know of any other optimizations that could be made here? Or if not, would using shptree and coshp on the shapefile and then accessing it in the mapfile using "DATA" to take it from S3 be the optimal way to set things up? Thanks! Matt -------------- next part -------------- An HTML attachment was scrubbed... URL: From bob.basques at ci.stpaul.mn.us Tue Dec 12 21:52:39 2023 From: bob.basques at ci.stpaul.mn.us (Bob Basques) Date: Wed, 13 Dec 2023 05:52:39 +0000 Subject: [MapServer-users] [REMINDER]: OSGeo Twin Cities Local Chapter Monthly Meeting (aka TCMUG) In-Reply-To: References: Message-ID: ________________________________ From: Bob Basques Sent: Wednesday, December 6, 2023 7:50 AM To: tcmug ; geomoose-users at lists.osgeo.org ; mapserver-users at lists.osgeo.org Subject: OSGeo Twin Cities Local Chapter Monthly Meeting (aka TCMUG) All, Had a great meeting last evening at the Lift Bridge Brewery in Stillwatewr. Smaller group, but good discussion, and some new(er) faces as well. Next month?s meeting will be at Urban Growler in St. Paul. As always, if anyone wants to show off what they have been working on, just send me a note, and I?ll set up the virtual online presentation. You are not required to attend in person if you want to do a virtual presentation. Date: Dec 13th, 4:30 ? 6:00 Place: Urban Growler in St. Paul, Mn. See you there. Bobb Get me in Teams PW19-S295-C024 -------------- next part -------------- An HTML attachment was scrubbed... URL: From j.l.h.hartmann at gmail.com Wed Dec 13 09:39:06 2023 From: j.l.h.hartmann at gmail.com (Jan Hartmann) Date: Wed, 13 Dec 2023 18:39:06 +0100 Subject: [MapServer-users] multiple shapepaths In-Reply-To: References: <2D4A7852-F469-4ABA-8D38-5F8BA4791C30@gmail.com> Message-ID: 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 > *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 > *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 *On > Behalf Of *Jan Hartmann via MapServer-users > *Sent:* Wednesday, December 6, 2023 1:14 AM > *To:* Steve Lime > *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 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 > 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 > wrote: > >>> > >>> ??? Nope, just the one value. > >>> > >>> ??? On Fri, Dec 1, 2023 at 1:02?PM Jan Hartmann via > MapServer-users > >>> ??? 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: From pschweitzer at usgs.gov Thu Dec 14 13:32:00 2023 From: pschweitzer at usgs.gov (Schweitzer, Peter N) Date: Thu, 14 Dec 2023 21:32:00 +0000 Subject: [MapServer-users] Can I call mapserver with GetLegendGraphic request using curl? Message-ID: I have map interfaces that use a dozen or so legend graphics, but it requires separate calls to mapserver for every user. I would prefer to cache these images (PNG) rather than make mapserver recalculate the same legend graphic many times for each user session. But when I do a curl, I keep getting the "requires a TEMPLATE" message. The images work within my JS (OpenLayers 5.3), but not through a stand-alone web request. Example: https://mrdata.usgs.gov/general/map-global.html 27 calls to mapserv to get legend images that don't change. Is there a way I can get these images and cache them on the server so that mapserver doesn't have to chew up processor cycles and time for them every time? Thanks for any help you may be able to offer. Peter Peter N. Schweitzer (U.S. Geological Survey, Reston, VA 20192) (703) 648-6533 email: pschweitzer at usgs.gov https://www.usgs.gov/staff-profiles/peter-n-schweitzer https://orcid.org/0000-0002-9532-6681 -------------- next part -------------- An HTML attachment was scrubbed... URL: From sdlime at gmail.com Fri Dec 15 12:45:02 2023 From: sdlime at gmail.com (Steve Lime) Date: Fri, 15 Dec 2023 14:45:02 -0600 Subject: [MapServer-users] Can I call mapserver with GetLegendGraphic request using curl? In-Reply-To: References: Message-ID: I do this all the time to create static versions of assets. Typically I just use a bash script and wget but I can't think of a reason offhand why curl wouldn't work just fine. What does a curl call look like? --Steve On Thu, Dec 14, 2023 at 3:32?PM Schweitzer, Peter N via MapServer-users < mapserver-users at lists.osgeo.org> wrote: > I have map interfaces that use a dozen or so legend graphics, but it > requires separate calls to mapserver for every user. I would prefer to > cache these images (PNG) rather than make mapserver recalculate the same > legend graphic many times for each user session. But when I do a curl, I > keep getting the "requires a TEMPLATE" message. The images work within my > JS (OpenLayers 5.3), but not through a stand-alone web request. > > Example: https://mrdata.usgs.gov/general/map-global.html 27 calls to > mapserv to get legend images that don't change. > > Is there a way I can get these images and cache them on the server so that > mapserver doesn't have to chew up processor cycles and time for them every > time? > > Thanks for any help you may be able to offer. > > Peter > > Peter N. Schweitzer (U.S. Geological Survey, Reston, VA 20192) > (703) 648-6533 email: pschweitzer at usgs.gov > https://www.usgs.gov/staff-profiles/peter-n-schweitzer > https://orcid.org/0000-0002-9532-6681 > _______________________________________________ > 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: From grabermtw at gmail.com Mon Dec 18 12:38:47 2023 From: grabermtw at gmail.com (Matthew Graber) Date: Mon, 18 Dec 2023 12:38:47 -0800 Subject: [MapServer-users] Speeding up msDrawMap() for shapefiles In-Reply-To: References: Message-ID: Hi Jukka, Thanks for the advice. I was able to confirm through local testing that using "DATA" is consistently faster than using the OGR connection (was getting over 500 ms for OGR vs just over 300 ms for DATA). My results are also suggesting that performing the shapefile optimizations may make my request several hundredths of a second faster, I'm a little less sure on that one. But regardless, it appears that the bulk of the problem with the slow S3 connection is likely S3's overhead, so I don't think there's anything more I can do with MapServer to speed it up. Thanks again, Matt On Fri, Dec 8, 2023 at 11:58?AM Rahkonen Jukka < jukka.rahkonen at maanmittauslaitos.fi> wrote: > Hi, > > > > You should test the same shapefiles locally for understanding where the > time gets spent. Normal time with simple styles is perhaps up to 300 ms. > The optimization hints were written long before there were S3 or Amazon > (the company). > > Unfortunately I don?t know how to optimize access to S3. > > > > -Jukka Rahkonen- > > > > *L?hett?j?:* MapServer-users *Puolesta > *Matthew Graber via MapServer-users > *L?hetetty:* perjantai 8. joulukuuta 2023 21.47 > *Vastaanottaja:* mapserver-users at lists.osgeo.org > *Aihe:* [MapServer-users] Speeding up msDrawMap() for shapefiles > > > > Hi, > > > > I'm trying to speed up the time required for msDrawMap() to execute for > rendering shapefiles. Currently, according to the mapserver logs, it's > taking 2.5-3.5 seconds, sometimes up to 5 seconds for it to execute: > > > > [Wed Dec 6 18:43:47 2023].699791 CGI Request 53 on process 2641 > [Wed Dec 6 18:43:47 2023].717216 msDrawMap(): rendering using > outputformat named png (AGG/PNG). > [Wed Dec 6 18:43:52 2023].299580 msDrawMap(): Layer 1010 > (Shapefile_Layer), 4.582s > [Wed Dec 6 18:43:52 2023].299792 msDrawMap(): Drawing Label Cache, 0.000s > [Wed Dec 6 18:43:52 2023].299803 msDrawMap() total time: 4.584s > [Wed Dec 6 18:43:52 2023].310853 msSaveImage(stdout) total time: 0.011s > > [Wed Dec 6 18:43:52 2023].310883 mapserv request processing time > (msLoadMap not incl.): 4.611s > > > > The mapfile is currently set up using "CONNECTIONTYPE OGR" and > "CONNECTION" to access the shapefiles from an S3 bucket as follows: > > > > CONNECTIONTYPE OGR > CONNECTION '/vsis3/s3_bucket_path/my_shapefile%.shp' > > > > I noticed at https://mapserver.org/input/vector/shapefiles.html that it > says "Shapefile access is built directly into MapServer. It is also > available through OGR, but direct access without OGR is recommended and > discussed here." > > So I tried removing "CONNECTIONTYPE OGR" and changing "CONNECTION" to > "DATA" as follows: > > > > DATA '/vsis3/s3_bucket_path/my_shapefile%.shp' > > > > I haven't been able to observe any definitive speed improvements by doing > this yet, although I can't say for sure that there aren't any. > > > > Based on https://mapserver.org/optimization/vector.html, I also tried > using the shptree command to create a spatial index and the coshp command > to sort the shapefile and index. Even after doing that, I still see load > msDrawMap() times of up to 5 seconds. > > > > Does anyone know of any other optimizations that could be made here? Or if > not, would using shptree and coshp on the shapefile and then accessing it > in the mapfile using "DATA" to take it from S3 be the optimal way to set > things up? > > > > Thanks! > > Matt > -------------- next part -------------- An HTML attachment was scrubbed... URL: From sdlime at gmail.com Mon Dec 18 13:37:06 2023 From: sdlime at gmail.com (Steve Lime) Date: Mon, 18 Dec 2023 15:37:06 -0600 Subject: [MapServer-users] Speeding up msDrawMap() for shapefiles In-Reply-To: References: Message-ID: Did you have a look at https://blog.cleverelephant.ca/2022/04/coshp.html? On Mon, Dec 18, 2023 at 2:39?PM Matthew Graber via MapServer-users < mapserver-users at lists.osgeo.org> wrote: > Hi Jukka, > > Thanks for the advice. I was able to confirm through local testing that > using "DATA" is consistently faster than using the OGR connection (was > getting over 500 ms for OGR vs just over 300 ms for DATA). My results are > also suggesting that performing the shapefile optimizations may make my > request several hundredths of a second faster, I'm a little less sure on > that one. But regardless, it appears that the bulk of the problem with the > slow S3 connection is likely S3's overhead, so I don't think there's > anything more I can do with MapServer to speed it up. > > Thanks again, > Matt > > On Fri, Dec 8, 2023 at 11:58?AM Rahkonen Jukka < > jukka.rahkonen at maanmittauslaitos.fi> wrote: > >> Hi, >> >> >> >> You should test the same shapefiles locally for understanding where the >> time gets spent. Normal time with simple styles is perhaps up to 300 ms. >> The optimization hints were written long before there were S3 or Amazon >> (the company). >> >> Unfortunately I don?t know how to optimize access to S3. >> >> >> >> -Jukka Rahkonen- >> >> >> >> *L?hett?j?:* MapServer-users *Puolesta >> *Matthew Graber via MapServer-users >> *L?hetetty:* perjantai 8. joulukuuta 2023 21.47 >> *Vastaanottaja:* mapserver-users at lists.osgeo.org >> *Aihe:* [MapServer-users] Speeding up msDrawMap() for shapefiles >> >> >> >> Hi, >> >> >> >> I'm trying to speed up the time required for msDrawMap() to execute for >> rendering shapefiles. Currently, according to the mapserver logs, it's >> taking 2.5-3.5 seconds, sometimes up to 5 seconds for it to execute: >> >> >> >> [Wed Dec 6 18:43:47 2023].699791 CGI Request 53 on process 2641 >> [Wed Dec 6 18:43:47 2023].717216 msDrawMap(): rendering using >> outputformat named png (AGG/PNG). >> [Wed Dec 6 18:43:52 2023].299580 msDrawMap(): Layer 1010 >> (Shapefile_Layer), 4.582s >> [Wed Dec 6 18:43:52 2023].299792 msDrawMap(): Drawing Label Cache, 0.000s >> [Wed Dec 6 18:43:52 2023].299803 msDrawMap() total time: 4.584s >> [Wed Dec 6 18:43:52 2023].310853 msSaveImage(stdout) total time: 0.011s >> >> [Wed Dec 6 18:43:52 2023].310883 mapserv request processing time >> (msLoadMap not incl.): 4.611s >> >> >> >> The mapfile is currently set up using "CONNECTIONTYPE OGR" and >> "CONNECTION" to access the shapefiles from an S3 bucket as follows: >> >> >> >> CONNECTIONTYPE OGR >> CONNECTION '/vsis3/s3_bucket_path/my_shapefile%.shp' >> >> >> >> I noticed at https://mapserver.org/input/vector/shapefiles.html that it >> says "Shapefile access is built directly into MapServer. It is also >> available through OGR, but direct access without OGR is recommended and >> discussed here." >> >> So I tried removing "CONNECTIONTYPE OGR" and changing "CONNECTION" to >> "DATA" as follows: >> >> >> >> DATA '/vsis3/s3_bucket_path/my_shapefile%.shp' >> >> >> >> I haven't been able to observe any definitive speed improvements by doing >> this yet, although I can't say for sure that there aren't any. >> >> >> >> Based on https://mapserver.org/optimization/vector.html, I also tried >> using the shptree command to create a spatial index and the coshp command >> to sort the shapefile and index. Even after doing that, I still see load >> msDrawMap() times of up to 5 seconds. >> >> >> >> Does anyone know of any other optimizations that could be made here? Or >> if not, would using shptree and coshp on the shapefile and then accessing >> it in the mapfile using "DATA" to take it from S3 be the optimal way to set >> things up? >> >> >> >> Thanks! >> >> Matt >> > _______________________________________________ > 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: From grabermtw at gmail.com Mon Dec 18 14:39:17 2023 From: grabermtw at gmail.com (Matthew Graber) Date: Mon, 18 Dec 2023 14:39:17 -0800 Subject: [MapServer-users] Speeding up msDrawMap() for shapefiles In-Reply-To: References: Message-ID: I think that for my case, it probably comes down to the S3 access times in general. Going to investigate more of what can be done to improve that side of the situation. Thanks everyone for all the input though! On Mon, Dec 18, 2023 at 2:35?PM Matthew Graber wrote: > I hadn't found that, thanks! It looks like it's largely suggesting what > I've already investigated though, using `shptree` to create the .qix > spatial index and `coshp` to sort the shapefile. > > On Mon, Dec 18, 2023 at 1:37?PM Steve Lime wrote: > >> Did you have a look at https://blog.cleverelephant.ca/2022/04/coshp.html? >> >> On Mon, Dec 18, 2023 at 2:39?PM Matthew Graber via MapServer-users < >> mapserver-users at lists.osgeo.org> wrote: >> >>> Hi Jukka, >>> >>> Thanks for the advice. I was able to confirm through local testing that >>> using "DATA" is consistently faster than using the OGR connection (was >>> getting over 500 ms for OGR vs just over 300 ms for DATA). My results are >>> also suggesting that performing the shapefile optimizations may make my >>> request several hundredths of a second faster, I'm a little less sure on >>> that one. But regardless, it appears that the bulk of the problem with the >>> slow S3 connection is likely S3's overhead, so I don't think there's >>> anything more I can do with MapServer to speed it up. >>> >>> Thanks again, >>> Matt >>> >>> On Fri, Dec 8, 2023 at 11:58?AM Rahkonen Jukka < >>> jukka.rahkonen at maanmittauslaitos.fi> wrote: >>> >>>> Hi, >>>> >>>> >>>> >>>> You should test the same shapefiles locally for understanding where the >>>> time gets spent. Normal time with simple styles is perhaps up to 300 ms. >>>> The optimization hints were written long before there were S3 or Amazon >>>> (the company). >>>> >>>> Unfortunately I don?t know how to optimize access to S3. >>>> >>>> >>>> >>>> -Jukka Rahkonen- >>>> >>>> >>>> >>>> *L?hett?j?:* MapServer-users *Puolesta >>>> *Matthew Graber via MapServer-users >>>> *L?hetetty:* perjantai 8. joulukuuta 2023 21.47 >>>> *Vastaanottaja:* mapserver-users at lists.osgeo.org >>>> *Aihe:* [MapServer-users] Speeding up msDrawMap() for shapefiles >>>> >>>> >>>> >>>> Hi, >>>> >>>> >>>> >>>> I'm trying to speed up the time required for msDrawMap() to execute for >>>> rendering shapefiles. Currently, according to the mapserver logs, it's >>>> taking 2.5-3.5 seconds, sometimes up to 5 seconds for it to execute: >>>> >>>> >>>> >>>> [Wed Dec 6 18:43:47 2023].699791 CGI Request 53 on process 2641 >>>> [Wed Dec 6 18:43:47 2023].717216 msDrawMap(): rendering using >>>> outputformat named png (AGG/PNG). >>>> [Wed Dec 6 18:43:52 2023].299580 msDrawMap(): Layer 1010 >>>> (Shapefile_Layer), 4.582s >>>> [Wed Dec 6 18:43:52 2023].299792 msDrawMap(): Drawing Label Cache, >>>> 0.000s >>>> [Wed Dec 6 18:43:52 2023].299803 msDrawMap() total time: 4.584s >>>> [Wed Dec 6 18:43:52 2023].310853 msSaveImage(stdout) total time: 0.011s >>>> >>>> [Wed Dec 6 18:43:52 2023].310883 mapserv request processing time >>>> (msLoadMap not incl.): 4.611s >>>> >>>> >>>> >>>> The mapfile is currently set up using "CONNECTIONTYPE OGR" and >>>> "CONNECTION" to access the shapefiles from an S3 bucket as follows: >>>> >>>> >>>> >>>> CONNECTIONTYPE OGR >>>> CONNECTION '/vsis3/s3_bucket_path/my_shapefile%.shp' >>>> >>>> >>>> >>>> I noticed at https://mapserver.org/input/vector/shapefiles.html that >>>> it says "Shapefile access is built directly into MapServer. It is also >>>> available through OGR, but direct access without OGR is recommended and >>>> discussed here." >>>> >>>> So I tried removing "CONNECTIONTYPE OGR" and changing "CONNECTION" to >>>> "DATA" as follows: >>>> >>>> >>>> >>>> DATA '/vsis3/s3_bucket_path/my_shapefile%.shp' >>>> >>>> >>>> >>>> I haven't been able to observe any definitive speed improvements by >>>> doing this yet, although I can't say for sure that there aren't any. >>>> >>>> >>>> >>>> Based on https://mapserver.org/optimization/vector.html, I also tried >>>> using the shptree command to create a spatial index and the coshp command >>>> to sort the shapefile and index. Even after doing that, I still see load >>>> msDrawMap() times of up to 5 seconds. >>>> >>>> >>>> >>>> Does anyone know of any other optimizations that could be made here? Or >>>> if not, would using shptree and coshp on the shapefile and then accessing >>>> it in the mapfile using "DATA" to take it from S3 be the optimal way to set >>>> things up? >>>> >>>> >>>> >>>> Thanks! >>>> >>>> Matt >>>> >>> _______________________________________________ >>> 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: From mniemyjski at cloudferro.com Tue Dec 19 05:21:27 2023 From: mniemyjski at cloudferro.com (Marcin Niemyjski) Date: Tue, 19 Dec 2023 13:21:27 +0000 Subject: [MapServer-users] Runtime substitution on MAP CONFIG environmental variables Message-ID: Hello, is it possible to perform such operation using parameters stored in request URL MAP NAME "Results of crop prediction" CONFIG "AWS_S3_ENDPOINT" "some.ednpoint.com" CONFIG "AWS_ACCESS_KEY_ID" "%s3_access%" CONFIG "AWS_SECRET_ACCESS_KEY" "%s3_secret%" ... so, I can select which pair of S3 keys i would like to use. If it is, where should validation block be stored? Best, Marcin [https://res.cdn.office.net/assets/bookwithme/misc/CalendarPerson20px.png] Book time to meet with me -------------- next part -------------- An HTML attachment was scrubbed... URL: From gorouter at protonmail.com Thu Dec 21 05:03:45 2023 From: gorouter at protonmail.com (gorouter) Date: Thu, 21 Dec 2023 13:03:45 +0000 Subject: [MapServer-users] Shapefile of Points Message-ID: Hello. Here asking for a little help. 1. I need to display a point geometry shapefile in mapserver. Could someone show an example of how to create a point symbol to use on a layer. I can't succeed with the examples in the mapserver help. 2. I intend to create 32 point symbols by varying the color, then based on these, create quantiles to assign a symbol according to a value from the performance column that is in the shapefile. I have a suspicion that I should use mapscript to assign the symbols to each data range from php, for example, if the range is between 0-1.99, strong red symbol, 2.00-3.99 light red symbol... I'm doing this in qgis, and each shapefile has a different set of data in range, this makes me think that I should calculate the quantiles from the shapefile data and then assign the color symbols using php and mapscript to create the .map file -------------- next part -------------- An HTML attachment was scrubbed... URL: From joerg.thomsen at wheregroup.com Thu Dec 21 05:26:17 2023 From: joerg.thomsen at wheregroup.com (=?UTF-8?Q?J=C3=B6rg_Thomsen_=28WhereGroup=29?=) Date: Thu, 21 Dec 2023 14:26:17 +0100 Subject: [MapServer-users] Shapefile of Points In-Reply-To: References: Message-ID: Hi, here are a lot of examples for symbol-definitions and using them in the mapfile: https://mapserver.org/mapfile/symbology/construction.html > I intend to create 32 point symbols by varying the color, you'll need only one symbol-definition. assign the color in the mapfiles style-section. > I have a suspicion that I should use mapscript to assign the symbols to > each data range from php, for example, if the range is between 0-1.99, > strong red symbol, 2.00-3.99 light red symbol... this is done bei the EXPRESSION within the class-section see https://mapserver.org/mapfile/class.html > I'm doing this in qgis, and each shapefile has a different set of data > in range, this makes me think that I should calculate the quantiles from > the shapefile data and then assign the color symbols using php and > mapscript to create the .map file you can do the classification in qgis and use the extension 'GeoCat Bridge' to create the layer-sections of your mapfile. -- 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.thomsen at 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 From sdlime at gmail.com Tue Dec 26 14:22:32 2023 From: sdlime at gmail.com (Steve Lime) Date: Tue, 26 Dec 2023 16:22:32 -0600 Subject: [MapServer-users] Runtime substitution on MAP CONFIG environmental variables In-Reply-To: References: Message-ID: The validation block would go in the WEB object. However, the runtime subs don't operate with config options. There was a ticket related to this message opened already (see https://github.com/MapServer/MapServer/issues/6994), presumably based on this thread. I'm curious what other devs think about the idea. --Steve On Tue, Dec 19, 2023 at 7:21?AM Marcin Niemyjski via MapServer-users < mapserver-users at lists.osgeo.org> wrote: > Hello, > > is it possible to perform such operation using parameters stored in > request URL > MAP > NAME "Results of crop prediction" > > CONFIG "AWS_S3_ENDPOINT" "some.ednpoint.com" > CONFIG "AWS_ACCESS_KEY_ID" "%s3_access%" > CONFIG "AWS_SECRET_ACCESS_KEY" "%s3_secret%" > ... > > so, I can select which pair of S3 keys i would like to use. > > If it is, where should validation block be stored? > > Best, > Marcin > > Book > time to meet with me > > _______________________________________________ > 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: