From F.Arts at GISArts.nl Wed Jun 1 01:56:40 2022 From: F.Arts at GISArts.nl (Fons Arts) Date: Wed, 1 Jun 2022 10:56:40 +0200 Subject: [mapserver-users] Stacked Labels In-Reply-To: <489deae1cb6b47d68f18af6fdd853d72@co.lyon.mn.us> References: <489deae1cb6b47d68f18af6fdd853d72@co.lyon.mn.us> Message-ID: <55dcf634-6726-32c9-1e95-11190eb58592@GISArts.nl> Hi Mark, You can use? the Label wrap, https://mapserver.org/mapfile/label.html Something like ?? ???? ??? TEXT '[adres] \[bedrijfstype]\Fijnstofemissie kg_jr [fijnstofemissie_kg_jr]\Geuremissie [geuremissie_ou_s] ou_s\nh3 emissie [nh3_emissie]\Aantal NGE [nh3_emissie]' ?? ???? ??? WRAP "\n" gr Fons Op 31/05/2022 om 23:30 schreef Mark Volz: > > Hello, > > I would like to label several stacked ?tax parcels that share the > exact same footprint.? Each parcel includes the Parcel Number, Owner, > and Property Address.? Is there any way to label each of the parcels?? > ?Position AUTO is only displaying one of the labels. > > Thanks! > > Sincerely, > > *Mark Volz, GISP*** > > *Lyon County GIS Coordinator* > > Ph:? (507) 532-8218 > > > _______________________________________________ > 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 bob.basques at ci.stpaul.mn.us Wed Jun 1 12:37:57 2022 From: bob.basques at ci.stpaul.mn.us (Basques, Bob (CI-StPaul)) Date: Wed, 1 Jun 2022 19:37:57 +0000 Subject: [mapserver-users] Looking for presenter at Twin Cities OSGeo Local Chapter Meeting Message-ID: All, Looking for a volunteer presenter for the June 8th OSGeo Virtual Local Chapter Meeting. Can be on anything GeoSpatial. I'll handle the coordination and recording of the session. When: June 8th, 4:30 - 6:00 pm CDT Location (Virtual): https://meet.jit.si/osgeo_tcmug Bobb -------------- next part -------------- An HTML attachment was scrubbed... URL: From pe_lord at protonmail.com Thu Jun 2 07:51:08 2022 From: pe_lord at protonmail.com (PE Lord) Date: Thu, 02 Jun 2022 14:51:08 +0000 Subject: [mapserver-users] WMS field type errors on FES filter Message-ID: Hi there! It's the same issue from my previous thread (https://lists.osgeo.org/pipermail/mapserver-users/2022-May/082641.html) The difference is that the issue is now with WMS with FILTER query parameters. I've set the layer metadata with gml_types "auto" and I encounter the same issue. This seem to be an issue with wms/filter field type definition. Here my log: msPostGISLayerWhichShapes(): Error (ERROR: operator does not exist: character = integer LINE 4: ...7842 321768.066989752))',3798) and (("dirct_gen_code" = 43)) Ex: In my DB (postgresql), I have tableA withdirct_gen_code.dirct_gen_code is declared as a character(2) but the content of rows are numbers... i.e. 43 ...? SERVICE=WMS& VERSION=1.3.0& REQUEST=GetMap& FORMAT=image/png& TRANSPARENT=true& LAYERS=tableA& DPI=96& MAP_RESOLUTION=96& FORMAT_OPTIONS=dpi:96& FILTER= dirct_gen_code 43 & CRS=EPSG:3857& STYLES=& WIDTH=1297& HEIGHT=970& BBOX=-7907987.59608382%2C5928571.109639037%2C-7901791.419478454%2C5933205.104478827 I don't have any exposed service for test purposes... Thanks Pierre -------------- next part -------------- An HTML attachment was scrubbed... URL: From richard.greenwood at gmail.com Fri Jun 3 06:45:51 2022 From: richard.greenwood at gmail.com (Richard Greenwood) Date: Fri, 3 Jun 2022 07:45:51 -0600 Subject: [mapserver-users] getting the scale in a map file at runtime Message-ID: Can I get the current scale for use in a map file at runtime. Specifically, I'd like to use it in a geotransform something like: GEOMTRANSFORM (generalize([shape], [scale])) or more likely for use in an expression: GEOMTRANSFORM (generalize([shape], [scale] / 100)) Thanks -- Richard W. Greenwood www.greenwoodmap.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From joerg.thomsen at wheregroup.com Fri Jun 3 07:00:14 2022 From: joerg.thomsen at wheregroup.com (=?UTF-8?Q?J=c3=b6rg_Thomsen_=28WhereGroup=29?=) Date: Fri, 3 Jun 2022 16:00:14 +0200 Subject: [mapserver-users] getting the scale in a map file at runtime In-Reply-To: References: Message-ID: <5216d0de-7c29-fed0-6bbf-1414e26a0846@wheregroup.com> Hi, what about: https://mapserver.org/mapfile/template.html#image-geometry -> scaledenom Doesn't work? J?rg Am 03.06.22 um 15:45 schrieb Richard Greenwood: > Can I get the current scale for use in a map file at runtime. > Specifically, I'd like to use it in a geotransform something like: > ? ?GEOMTRANSFORM (generalize([shape], [scale])) > or more likely for use in an expression: > ? ?GEOMTRANSFORM (generalize([shape], [scale] / 100)) > Thanks > -- > Richard W. Greenwood > www.greenwoodmap.com > > _______________________________________________ > MapServer-users mailing list > MapServer-users at lists.osgeo.org > https://lists.osgeo.org/mailman/listinfo/mapserver-users -- Viele Gr??e, J?rg Thomsen --------------------------------------------- Aufwind durch Wissen! Jetzt neu: 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 richard.greenwood at gmail.com Fri Jun 3 07:21:02 2022 From: richard.greenwood at gmail.com (Richard Greenwood) Date: Fri, 3 Jun 2022 08:21:02 -0600 Subject: [mapserver-users] getting the scale in a map file at runtime In-Reply-To: <5216d0de-7c29-fed0-6bbf-1414e26a0846@wheregroup.com> References: <5216d0de-7c29-fed0-6bbf-1414e26a0846@wheregroup.com> Message-ID: On Fri, Jun 3, 2022 at 8:00 AM J?rg Thomsen (WhereGroup) < joerg.thomsen at wheregroup.com> wrote: > Hi, > > what about: > https://mapserver.org/mapfile/template.html#image-geometry > -> scaledenom > > Doesn't work? > Thanks, but no, it does not work. I'm trying to access the scale in a map file, not in a template. Using square brackets [variable] is interpreted as a field name in the data, not as a runtime variable. For example: CLASS STYLE GEOMTRANSFORM (generalize([shape], [scaledenom])) COLOR "#2AB1F7" END END returns the error: DBASE file error. Item 'scaledenom' not found. > > J?rg > > > Am 03.06.22 um 15:45 schrieb Richard Greenwood: > > Can I get the current scale for use in a map file at runtime. > > Specifically, I'd like to use it in a geotransform something like: > > GEOMTRANSFORM (generalize([shape], [scale])) > > or more likely for use in an expression: > > GEOMTRANSFORM (generalize([shape], [scale] / 100)) > > Thanks > > -- > > Richard W. Greenwood > > www.greenwoodmap.com > > > > _______________________________________________ > > MapServer-users mailing list > > MapServer-users at lists.osgeo.org > > https://lists.osgeo.org/mailman/listinfo/mapserver-users > > > -- > Viele Gr??e, > J?rg Thomsen > > --------------------------------------------- > Aufwind durch Wissen! > Jetzt neu: 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 > _______________________________________________ > 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 joerg.thomsen at wheregroup.com Fri Jun 3 07:43:39 2022 From: joerg.thomsen at wheregroup.com (=?UTF-8?Q?J=c3=b6rg_Thomsen_=28WhereGroup=29?=) Date: Fri, 3 Jun 2022 16:43:39 +0200 Subject: [mapserver-users] getting the scale in a map file at runtime In-Reply-To: References: <5216d0de-7c29-fed0-6bbf-1414e26a0846@wheregroup.com> Message-ID: <7347ea11-15f1-4605-1aec-a306f71ca65e@wheregroup.com> Richard, sorry, yes, sure... Perhaps you can use scaletoken? It's not the same as you are searching for, but you could define a set of tolerance-values for different scales. J?rg Am 03.06.22 um 16:21 schrieb Richard Greenwood: > > > On Fri, Jun 3, 2022 at 8:00 AM J?rg Thomsen (WhereGroup) > > wrote: > > Hi, > > what about: > https://mapserver.org/mapfile/template.html#image-geometry > > -> scaledenom > > Doesn't work? > > > Thanks, but no,?it does not work. I'm trying to access the scale in a > map file, not in a template. Using square brackets [variable] is > interpreted?as a field name in the data, not as a runtime variable. For > example: > ? CLASS > ? ? STYLE > ? ? ? GEOMTRANSFORM (generalize([shape], [scaledenom])) > ? ? ? COLOR "#2AB1F7" > ? ? END > ? END > returns?the error: > DBASE file error. Item 'scaledenom' not found. > > > J?rg > > > Am 03.06.22 um 15:45 schrieb Richard Greenwood: > > Can I get the current scale for use in a map file at runtime. > > Specifically, I'd like to use it in a geotransform something like: > >? ? ?GEOMTRANSFORM (generalize([shape], [scale])) > > or more likely for use in an expression: > >? ? ?GEOMTRANSFORM (generalize([shape], [scale] / 100)) > > Thanks > > -- > > Richard W. Greenwood > > www.greenwoodmap.com > > > > > > _______________________________________________ > > MapServer-users mailing list > > MapServer-users at lists.osgeo.org > > > https://lists.osgeo.org/mailman/listinfo/mapserver-users > > > > -- > Viele Gr??e, > J?rg Thomsen > > --------------------------------------------- > Aufwind durch Wissen! > Jetzt neu: 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 > _______________________________________________ > MapServer-users mailing list > MapServer-users at lists.osgeo.org > https://lists.osgeo.org/mailman/listinfo/mapserver-users > > > > > -- > Richard W. Greenwood > www.greenwoodmap.com -- Viele Gr??e, J?rg Thomsen --------------------------------------------- Aufwind durch Wissen! Jetzt neu: 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 richard.greenwood at gmail.com Fri Jun 3 08:00:57 2022 From: richard.greenwood at gmail.com (Richard Greenwood) Date: Fri, 3 Jun 2022 09:00:57 -0600 Subject: [mapserver-users] getting the scale in a map file at runtime In-Reply-To: <7347ea11-15f1-4605-1aec-a306f71ca65e@wheregroup.com> References: <5216d0de-7c29-fed0-6bbf-1414e26a0846@wheregroup.com> <7347ea11-15f1-4605-1aec-a306f71ca65e@wheregroup.com> Message-ID: On Fri, Jun 3, 2022 at 8:43 AM J?rg Thomsen (WhereGroup) < joerg.thomsen at wheregroup.com> wrote: > Richard, > sorry, yes, sure... > > Perhaps you can use scaletoken? It's not the same as you are searching > for, but you could define a set of tolerance-values for different scales. > Yes - I had not thought of that. It might be a better way than what I was trying to do. Thank you! Am 03.06.22 um 16:21 schrieb Richard Greenwood: > > > > > > On Fri, Jun 3, 2022 at 8:00 AM J?rg Thomsen (WhereGroup) > > > > wrote: > > > > Hi, > > > > what about: > > https://mapserver.org/mapfile/template.html#image-geometry > > > > -> scaledenom > > > > Doesn't work? > > > > > > Thanks, but no, it does not work. I'm trying to access the scale in a > > map file, not in a template. Using square brackets [variable] is > > interpreted as a field name in the data, not as a runtime variable. For > > example: > > CLASS > > STYLE > > GEOMTRANSFORM (generalize([shape], [scaledenom])) > > COLOR "#2AB1F7" > > END > > END > > returns the error: > > DBASE file error. Item 'scaledenom' not found. > > > > > > J?rg > > > > > > Am 03.06.22 um 15:45 schrieb Richard Greenwood: > > > Can I get the current scale for use in a map file at runtime. > > > Specifically, I'd like to use it in a geotransform something like: > > > GEOMTRANSFORM (generalize([shape], [scale])) > > > or more likely for use in an expression: > > > GEOMTRANSFORM (generalize([shape], [scale] / 100)) > > > Thanks > > > -- > > > Richard W. Greenwood > > > www.greenwoodmap.com > > > > > > > > > _______________________________________________ > > > MapServer-users mailing list > > > MapServer-users at lists.osgeo.org > > > > > https://lists.osgeo.org/mailman/listinfo/mapserver-users > > > > > > > > -- > > Viele Gr??e, > > J?rg Thomsen > > > > --------------------------------------------- > > Aufwind durch Wissen! > > Jetzt neu: 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 > > > _______________________________________________ > > MapServer-users mailing list > > MapServer-users at lists.osgeo.org MapServer-users at lists.osgeo.org> > > https://lists.osgeo.org/mailman/listinfo/mapserver-users > > > > > > > > > > -- > > Richard W. Greenwood > > www.greenwoodmap.com > > > -- > Viele Gr??e, > J?rg Thomsen > > --------------------------------------------- > Aufwind durch Wissen! > Jetzt neu: 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 > -- Richard W. Greenwood www.greenwoodmap.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From public at postholer.com Sat Jun 4 08:29:25 2022 From: public at postholer.com (Scott) Date: Sat, 4 Jun 2022 08:29:25 -0700 Subject: [mapserver-users] getting the scale in a map file at runtime In-Reply-To: References: <5216d0de-7c29-fed0-6bbf-1414e26a0846@wheregroup.com> <7347ea11-15f1-4605-1aec-a306f71ca65e@wheregroup.com> Message-ID: If you're using an SQL query in your map file and it's a WMS/WFS (maybe others) service, you can determine scale from !BOX!, %WIDTH%, %HEIGHT%. To add to your question, I'd be curious to know does a resource exist that lists all '[var]' resources available to a map file at run time? On 6/3/22 08:00, Richard Greenwood wrote: > On Fri, Jun 3, 2022 at 8:43 AM J?rg Thomsen (WhereGroup) > > wrote: > > Richard, > sorry, yes, sure... > > Perhaps you can use scaletoken? It's not the same as you are searching > for, but you could define a set of tolerance-values for different > scales. > > > Yes - I had not thought of that. It might be a better way than what I > was trying to do. Thank you! > > > Am 03.06.22 um 16:21 schrieb Richard Greenwood: > > > > > > On Fri, Jun 3, 2022 at 8:00 AM J?rg Thomsen (WhereGroup) > > > >> wrote: > > > >? ? ?Hi, > > > >? ? ?what about: > > https://mapserver.org/mapfile/template.html#image-geometry > > >? ? ? > > >? ? ?-> scaledenom > > > >? ? ?Doesn't work? > > > > > > Thanks, but no,?it does not work. I'm trying to access the scale > in a > > map file, not in a template. Using square brackets [variable] is > > interpreted?as a field name in the data, not as a runtime > variable. For > > example: > >? ? CLASS > >? ? ? STYLE > >? ? ? ? GEOMTRANSFORM (generalize([shape], [scaledenom])) > >? ? ? ? COLOR "#2AB1F7" > >? ? ? END > >? ? END > > returns?the error: > > DBASE file error. Item 'scaledenom' not found. > > > > > >? ? ?J?rg > > > > > >? ? ?Am 03.06.22 um 15:45 schrieb Richard Greenwood: > >? ? ? > Can I get the current scale for use in a map file at runtime. > >? ? ? > Specifically, I'd like to use it in a geotransform > something like: > >? ? ? >? ? ?GEOMTRANSFORM (generalize([shape], [scale])) > >? ? ? > or more likely for use in an expression: > >? ? ? >? ? ?GEOMTRANSFORM (generalize([shape], [scale] / 100)) > >? ? ? > Thanks > >? ? ? > -- > >? ? ? > Richard W. Greenwood > >? ? ? > www.greenwoodmap.com > > > >? ? ? > >> > >? ? ? > > >? ? ? > _______________________________________________ > >? ? ? > MapServer-users mailing list > >? ? ? > MapServer-users at lists.osgeo.org > > >? ? ? > > >? ? ? > https://lists.osgeo.org/mailman/listinfo/mapserver-users > > >? ? ? > > > > > > >? ? ?-- > >? ? ?Viele Gr??e, > >? ? ?J?rg Thomsen > > > >? ? ?--------------------------------------------- > >? ? ?Aufwind durch Wissen! > >? ? ?Jetzt neu: 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 > > > > >? ? ?_______________________________________________ > >? ? ?MapServer-users mailing list > > MapServer-users at lists.osgeo.org > > > > > https://lists.osgeo.org/mailman/listinfo/mapserver-users > > >? ? ? > > > > > > > > > -- > > Richard W. Greenwood > > www.greenwoodmap.com > > > > > -- > Viele Gr??e, > J?rg Thomsen > > --------------------------------------------- > Aufwind durch Wissen! > Jetzt neu: 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 > > > > -- > Richard W. Greenwood > www.greenwoodmap.com > > _______________________________________________ > MapServer-users mailing list > MapServer-users at lists.osgeo.org > https://lists.osgeo.org/mailman/listinfo/mapserver-users From sdlime at gmail.com Wed Jun 8 08:50:31 2022 From: sdlime at gmail.com (Steve Lime) Date: Wed, 8 Jun 2022 10:50:31 -0500 Subject: [mapserver-users] MapScript Projection Performance Message-ID: Hi all: I have a Perl script that runs against a shapefile to project a geometry centroid from UTM to Lat/Lon. Code looks something like this: my $proj_26915 = new mapscript::projectionObj('epsg:26915'); my $proj_4326 = new mapscript::projectionObj('epsg:4326'); while (my $shape = $layer->nextShape()) { my $point = $shape->getCentroid(); $point->project($proj_26915, $proj_4326); # do something with $point } I get the following representative timings with ~250 polygon geometries in the shapefile. MapServer 7.4 + Proj 6.2.1 = 0m0.180s MapServer 7.6 + Proj 6.2.1 = 0m7.000s MapServer 8.0 (main) + Proj 7.2.1 = 0m4.300s Huge difference and things kinda become unusable. Things improve a bit with newer versions but the performance hit is substantial. I thought at first that it was the projection initialization that was taking all the time but it's actually the "$point->project($proj_26915, $proj_4326);" statement. Perhaps I'm doing something wrong? --Steve -------------- next part -------------- An HTML attachment was scrubbed... URL: From even.rouault at spatialys.com Wed Jun 8 09:09:22 2022 From: even.rouault at spatialys.com (Even Rouault) Date: Wed, 8 Jun 2022 18:09:22 +0200 Subject: [mapserver-users] MapScript Projection Performance In-Reply-To: References: Message-ID: <3e6c7308-5b18-a318-2f40-5cfc167dd8fe@spatialys.com> Steve, are you sure you don't still run into the projection initialization, or actually the cost to get the reprojector object from the (in, out) projection tuple from the cache maintained by createNormalizedPJ() ? If the following functions were mapped to SWIG ? MS_DLL_EXPORT reprojectionObj* msProjectCreateReprojector(projectionObj* in, projectionObj* out); ? MS_DLL_EXPORT int msProjectPointEx(reprojectionObj* reprojector, pointObj *point); that could be interesting to check if they speed up things. You might also try to check if using EPSG:4269 instead of EPSG:4326 wouldn't speed up things, to eliminate the datum change from the equation (if you have PROJ grids available, they might be used to do the NAD83 -> WGS84 shift) Even Le 08/06/2022 ? 17:50, Steve Lime a ?crit?: > Hi all: I have a Perl script that runs against a shapefile to project > a geometry centroid from UTM to Lat/Lon. Code looks something like this: > > my $proj_26915 = new mapscript::projectionObj('epsg:26915'); > my $proj_4326 = new mapscript::projectionObj('epsg:4326'); > > while (my $shape = $layer->nextShape()) { > ? ??my $point = $shape->getCentroid(); > ? ??$point->project($proj_26915, $proj_4326); > ? ? # do something with $point > } > > I get the following representative timings with ~250 polygon > geometries in the shapefile. > > ? MapServer 7.4?+ Proj 6.2.1 =?0m0.180s > ? MapServer 7.6?+ Proj 6.2.1 =?0m7.000s > ? MapServer 8.0 (main) + Proj 7.2.1 =?0m4.300s > > Huge difference and things kinda become unusable. Things improve a bit > with newer versions but the performance hit is substantial. I > thought?at first that it was the projection initialization that was > taking all the time but it's actually the > "$point->project($proj_26915, $proj_4326);" statement. > > Perhaps I'm doing?something wrong? > > --Steve > > _______________________________________________ > MapServer-users mailing list > MapServer-users at lists.osgeo.org > https://lists.osgeo.org/mailman/listinfo/mapserver-users -- http://www.spatialys.com My software is free, but my time generally not. From jason2017jay at gmail.com Wed Jun 8 11:19:36 2022 From: jason2017jay at gmail.com (Jeremy JK) Date: Wed, 8 Jun 2022 14:19:36 -0400 Subject: [mapserver-users] Screen is square blank square window Message-ID: Hello all, When I call on mapserver I see nothing in the browser window only a grey square against a black background Thanks for your help this is my mapserver petition: http://localhost:8080/cgi-bin/mapserv?map=/opt/mapfile/mdm61vectorCaribe.map&LAYERS=cbarbados_administrativeboundaries&FORMAT=image%2Fpng&MAXRESOLUTION=4891.969809375&MINZOOMLEVEL=5&ZOOMOFFSET=5&TATO=0&LAYERNAME=&SERVICE=WMS&VERSION=1.1.1&REQUEST=GetMap&STYLES=&FIRM=059&SRS=EPSG%3A900913&BBOX=-12281420.399711,-1098306.4872519,-4405349.0063027,4850328.8011857&WIDTH=805&HEIGHT=608 This is the log file 52, -6635790.2658974118530750 1476490.8980501613114029, -6635788.7212414033710957 1476485.6568205237854272, -6635788.5621886961162090 1476485.1171328218188137, -6635786.9534297138452530 1476479.6583917171228677, -6635783.4353540828451514 1476467.1054714780766517, -6635779.1915921270847321 1476450.7408135060686618, -6635777.6594455474987626 1476444.0638863830827177, -6635776.2385215582326055 1476434.2757148493546993, -6635775.0103269824758172 1476422.8186795604415238, -6635773.4231182178482413 1476408.2214688013773412, -6635772.0777894463390112 1476396.2395822617691010, -6635770.4671615911647677 1476382.4886730741709471, -6635768.7171466927975416 1476359.7367921238765121, -6635766.8391131982207298 1476343.5201003090478480)) [Wed Jun 8 14:18:21 2022].812616 msPostGISLayerNextShape called. [Wed Jun 8 14:18:21 2022].812648 msPostGISLayerFreeItemInfo called. [Wed Jun 8 14:18:21 2022].812659 msPostGISLayerClose called: the_geom from caribe.barbados_administrativeboundaries using unique gid using srid=900913 [Wed Jun 8 14:18:21 2022].812736 msConnPoolRelease(cbarbados_administrativeboundaries,user=postgres password=StrongAdminP at ssw0rd dbname=postgis_db host=127.0.0.1 port=5432,0x5648bf2b6100) [Wed Jun 8 14:18:21 2022].812752 msDrawMap(): Layer 20 (cbarbados_administrativeboundaries), 0.783s [Wed Jun 8 14:18:21 2022].834235 msPostGISLayerIsOpen called. [Wed Jun 8 14:18:21 2022].843507 msConnPoolClose(user=postgres password=StrongAdminP at ssw0rd dbname=postgis_db host=127.0.0.1 port=5432,0x5648bf2b6100) -------------- next part -------------- An HTML attachment was scrubbed... URL: From jmckenna at gatewaygeomatics.com Wed Jun 8 11:34:54 2022 From: jmckenna at gatewaygeomatics.com (Jeff McKenna) Date: Wed, 8 Jun 2022 15:34:54 -0300 Subject: [mapserver-users] Screen is square blank square window In-Reply-To: References: Message-ID: <9504507f-1907-8975-2418-91891d705008@gatewaygeomatics.com> Hi Jeremy, I would start always with making sure that your mapfile generates a valid map image, through the commandline with shp2img (or map2img with MapServer 8), see https://mapserver.org/utilities/shp2img.html Such as: shp2img -m mdm61vectorCaribe.map -o ttt.png -all_debug 3 Make sure your boundaries layer appears nicely in your map image, and then once you have that ready, move onto your application request or WMS GetMap testing, etc. PS. be careful with your EPSG:900913 use, as this is long deprecated (in most FOSS4G software now) as EPSG:3857 is recommended instead. Read more about this at https://mapserver.org/mapfile/projection.html But don't worry about the fun projection issues yet, start with shp2img/map2img first. -jeff -- Jeff McKenna GatewayGeo: Developers of MS4W, MapServer Consulting and Training co-founder of FOSS4G http://gatewaygeo.com/ On 2022-06-08 3:19 p.m., Jeremy JK wrote: > Hello all, > When I call on mapserver I see nothing in the browser?window > only a grey square against a black background > Thanks for your help > > this is my mapserver petition: > > http://localhost:8080/cgi-bin/mapserv?map=/opt/mapfile/mdm61vectorCaribe.map&LAYERS=cbarbados_administrativeboundaries&FORMAT=image%2Fpng&MAXRESOLUTION=4891.969809375&MINZOOMLEVEL=5&ZOOMOFFSET=5&TATO=0&LAYERNAME=&SERVICE=WMS&VERSION=1.1.1&REQUEST=GetMap&STYLES=&FIRM=059&SRS=EPSG%3A900913&BBOX=-12281420.399711,-1098306.4872519,-4405349.0063027,4850328.8011857&WIDTH=805&HEIGHT=608 > > > This is the log file > 52, -6635790.2658974118530750 1476490.8980501613114029, > -6635788.7212414033710957 1476485.6568205237854272, > -6635788.5621886961162090 1476485.1171328218188137, > -6635786.9534297138452530 1476479.6583917171228677, > -6635783.4353540828451514 1476467.1054714780766517, > -6635779.1915921270847321 1476450.7408135060686618, > -6635777.6594455474987626 1476444.0638863830827177, > -6635776.2385215582326055 1476434.2757148493546993, > -6635775.0103269824758172 1476422.8186795604415238, > -6635773.4231182178482413 1476408.2214688013773412, > -6635772.0777894463390112 1476396.2395822617691010, > -6635770.4671615911647677 1476382.4886730741709471, > -6635768.7171466927975416 1476359.7367921238765121, > -6635766.8391131982207298 1476343.5201003090478480)) > [Wed Jun ?8 14:18:21 2022].812616 msPostGISLayerNextShape called. > [Wed Jun ?8 14:18:21 2022].812648 msPostGISLayerFreeItemInfo called. > [Wed Jun ?8 14:18:21 2022].812659 msPostGISLayerClose called: the_geom > from caribe.barbados_administrativeboundaries using unique gid using > srid=900913 > [Wed Jun ?8 14:18:21 2022].812736 > msConnPoolRelease(cbarbados_administrativeboundaries,user=postgres > password=StrongAdminP at ssw0rd dbname=postgis_db host=127.0.0.1 > port=5432,0x5648bf2b6100) > [Wed Jun ?8 14:18:21 2022].812752 msDrawMap(): Layer 20 > (cbarbados_administrativeboundaries), 0.783s > [Wed Jun ?8 14:18:21 2022].834235 msPostGISLayerIsOpen called. > [Wed Jun ?8 14:18:21 2022].843507 msConnPoolClose(user=postgres > password=StrongAdminP at ssw0rd dbname=postgis_db host=127.0.0.1 > port=5432,0x5648bf2b6100) > > > > > _______________________________________________ > MapServer-users mailing list > MapServer-users at lists.osgeo.org > https://lists.osgeo.org/mailman/listinfo/mapserver-users From sdlime at gmail.com Wed Jun 8 12:40:34 2022 From: sdlime at gmail.com (Steve Lime) Date: Wed, 8 Jun 2022 14:40:34 -0500 Subject: [mapserver-users] MapScript Projection Performance In-Reply-To: <3e6c7308-5b18-a318-2f40-5cfc167dd8fe@spatialys.com> References: <3e6c7308-5b18-a318-2f40-5cfc167dd8fe@spatialys.com> Message-ID: Thanks for the response Even. Switching to 4329 drops a few milliseconds, no major improvement. If I still create the projection objects but don't actually project the point object then the execution time drops back to 0m0.180s or thereabouts. Creating the projection objects is just running msLoadProjectionString() under the hood. Must not be doing that much - no reprojector is being created. $point->project() is running msProjectPoint() under the hood. I'm guessing the reprojector is being constructed every time that's called. Note that I don't see a performance hit with 7.6 or 8.0 (main) with CGI when doing loads of reprojection. So, following on your idea we'd need changes to the swig interface: 1. reprojector.i - with a constructor to take in/out projection objects 2. overloaded project methods added to line.i, point.i, rect.i and shape.i I'll try that. --Steve On Wed, Jun 8, 2022 at 11:09 AM Even Rouault wrote: > Steve, > > are you sure you don't still run into the projection initialization, or > actually the cost to get the reprojector object from the (in, out) > projection tuple from the cache maintained by createNormalizedPJ() ? > > If the following functions were mapped to SWIG > > MS_DLL_EXPORT reprojectionObj* > msProjectCreateReprojector(projectionObj* in, projectionObj* out); > > MS_DLL_EXPORT int msProjectPointEx(reprojectionObj* reprojector, > pointObj *point); > > that could be interesting to check if they speed up things. > > You might also try to check if using EPSG:4269 instead of EPSG:4326 > wouldn't speed up things, to eliminate the datum change from the > equation (if you have PROJ grids available, they might be used to do the > NAD83 -> WGS84 shift) > > Even > > Le 08/06/2022 ? 17:50, Steve Lime a ?crit : > > Hi all: I have a Perl script that runs against a shapefile to project > > a geometry centroid from UTM to Lat/Lon. Code looks something like this: > > > > my $proj_26915 = new mapscript::projectionObj('epsg:26915'); > > my $proj_4326 = new mapscript::projectionObj('epsg:4326'); > > > > while (my $shape = $layer->nextShape()) { > > my $point = $shape->getCentroid(); > > $point->project($proj_26915, $proj_4326); > > # do something with $point > > } > > > > I get the following representative timings with ~250 polygon > > geometries in the shapefile. > > > > MapServer 7.4 + Proj 6.2.1 = 0m0.180s > > MapServer 7.6 + Proj 6.2.1 = 0m7.000s > > MapServer 8.0 (main) + Proj 7.2.1 = 0m4.300s > > > > Huge difference and things kinda become unusable. Things improve a bit > > with newer versions but the performance hit is substantial. I > > thought at first that it was the projection initialization that was > > taking all the time but it's actually the > > "$point->project($proj_26915, $proj_4326);" statement. > > > > Perhaps I'm doing something wrong? > > > > --Steve > > > > _______________________________________________ > > MapServer-users mailing list > > MapServer-users at lists.osgeo.org > > https://lists.osgeo.org/mailman/listinfo/mapserver-users > > -- > http://www.spatialys.com > My software is free, but my time generally not. > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From sdlime at gmail.com Wed Jun 8 13:00:49 2022 From: sdlime at gmail.com (Steve Lime) Date: Wed, 8 Jun 2022 15:00:49 -0500 Subject: [mapserver-users] Screen is square blank square window In-Reply-To: References: Message-ID: What version/distribution are you using? This sound familiar to another issue I remember but I couldn't find it looking quickly in github. I thought that was specific to a particular Windows binary distribution. --Steve On Wed, Jun 8, 2022 at 1:20 PM Jeremy JK wrote: > Hello all, > When I call on mapserver I see nothing in the browser window > only a grey square against a black background > Thanks for your help > > this is my mapserver petition: > > > http://localhost:8080/cgi-bin/mapserv?map=/opt/mapfile/mdm61vectorCaribe.map&LAYERS=cbarbados_administrativeboundaries&FORMAT=image%2Fpng&MAXRESOLUTION=4891.969809375&MINZOOMLEVEL=5&ZOOMOFFSET=5&TATO=0&LAYERNAME=&SERVICE=WMS&VERSION=1.1.1&REQUEST=GetMap&STYLES=&FIRM=059&SRS=EPSG%3A900913&BBOX=-12281420.399711,-1098306.4872519,-4405349.0063027,4850328.8011857&WIDTH=805&HEIGHT=608 > > This is the log file > 52, -6635790.2658974118530750 1476490.8980501613114029, > -6635788.7212414033710957 1476485.6568205237854272, > -6635788.5621886961162090 1476485.1171328218188137, > -6635786.9534297138452530 1476479.6583917171228677, > -6635783.4353540828451514 1476467.1054714780766517, > -6635779.1915921270847321 1476450.7408135060686618, > -6635777.6594455474987626 1476444.0638863830827177, > -6635776.2385215582326055 1476434.2757148493546993, > -6635775.0103269824758172 1476422.8186795604415238, > -6635773.4231182178482413 1476408.2214688013773412, > -6635772.0777894463390112 1476396.2395822617691010, > -6635770.4671615911647677 1476382.4886730741709471, > -6635768.7171466927975416 1476359.7367921238765121, > -6635766.8391131982207298 1476343.5201003090478480)) > [Wed Jun 8 14:18:21 2022].812616 msPostGISLayerNextShape called. > [Wed Jun 8 14:18:21 2022].812648 msPostGISLayerFreeItemInfo called. > [Wed Jun 8 14:18:21 2022].812659 msPostGISLayerClose called: the_geom > from caribe.barbados_administrativeboundaries using unique gid using > srid=900913 > [Wed Jun 8 14:18:21 2022].812736 > msConnPoolRelease(cbarbados_administrativeboundaries,user=postgres > password=StrongAdminP at ssw0rd dbname=postgis_db host=127.0.0.1 > port=5432,0x5648bf2b6100) > [Wed Jun 8 14:18:21 2022].812752 msDrawMap(): Layer 20 > (cbarbados_administrativeboundaries), 0.783s > [Wed Jun 8 14:18:21 2022].834235 msPostGISLayerIsOpen called. > [Wed Jun 8 14:18:21 2022].843507 msConnPoolClose(user=postgres > password=StrongAdminP at ssw0rd dbname=postgis_db host=127.0.0.1 > port=5432,0x5648bf2b6100) > > > > _______________________________________________ > 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 John.Huotari at RCIS.com Wed Jun 8 15:07:50 2022 From: John.Huotari at RCIS.com (John Huotari) Date: Wed, 8 Jun 2022 22:07:50 +0000 Subject: [mapserver-users] External WMS issue Message-ID: I'm having trouble hitting a WMS referenced from within my .map file. Instead of the image from the WMS being drawn as a layer in my map, I instead get an error logged of "request failed with curl error code 60 (SSL certificate problem: unable to get local issuer certificate) for https://basemap.nationalmap.gov/arcgis/services/USGSTopo/MapServer/WmsServer?LAYERS=0&REQUEST=GetMap&SERVICE=WMS&..." The confusing thing to me is that the exact same .map file works just fine to produce a map image containing the referenced layer when I run mapserver -nh at a command prompt. i.e. mapserv -nh "QUERY_STRING=map=test.map&..." > test.png I've configured a CURL_CA_BUNDLE environment variable pointing to a curl-ca-bundle.crt file and I think the fact that I can reach that external WMS when running the mapserv command at a command prompt would indicate it's configured correctly. Any thoughts on what could cause the failure I'm seeing though MapServer running on Windows though IIS as a FastCGI app while succeeding when running the same .map file at a command prompt? Or any thoughts on what I might try to troubleshoot further? .map file contents are below MAP NAME "MAP" CONFIG "MS_ERRORFILE" "e:/LogFiles/ms_error3.txt" CONFIG "PROJ_LIB" "E:/ms/projlib/" DEBUG 5 EXTENT -20037508.342789244 -20037508.342789244 20037508.342789244 20037508.342789244 SIZE 256 256 SYMBOLSET "E:\ms\basedata\symbols.txt" FONTSET "E:\ms\basedata\fonts.txt" IMAGECOLOR 255 255 255 TRANSPARENT ON DEFRESOLUTION 72 RESOLUTION 72 UNITS meters PROJECTION "init=epsg:3857" END WEB METADATA "wms_enable_request" "*" END END LAYER STATUS DEFAULT TYPE RASTER NAME "WMS_DRG" DEBUG 5 CONNECTIONTYPE WMS CONNECTION "https://basemap.nationalmap.gov/arcgis/services/USGSTopo/MapServer/WmsServer?" PROJECTION "init=epsg:3857" END METADATA "wms_srs" "EPSG:3857" "wms_name" "0" "wms_server_version" "1.1.1" "wms_format" "image/png" END END END ******************* PLEASE NOTE ******************* This message, along with any attachments, is for the designated recipient(s) only and may contain privileged, proprietary, or otherwise confidential information. If this message has reached you in error, kindly destroy it without review and notify the sender immediately. Any other use of such misdirected e-mail by you is prohibited. Where allowed by local law, electronic communications with Zurich and its affiliates, including e-mail and instant messaging (including content), may be scanned for the purposes of information security and assessment of internal compliance with company policy. From jmckenna at gatewaygeomatics.com Thu Jun 9 03:12:43 2022 From: jmckenna at gatewaygeomatics.com (Jeff McKenna) Date: Thu, 9 Jun 2022 07:12:43 -0300 Subject: [mapserver-users] External WMS issue In-Reply-To: References: Message-ID: Hi John, There is a long-standing issue on Windows systems where environment variables are not able to be accessed, by the FOSS4G software stack. To work around this for MS4W users, I set that CURL_CA_BUNDLE manually all throughout the MS4W stack, instead of through an environment variable. (the upcoming MapServer 8 release will include a config file where we can also set this instead) I also set CURL_CA_BUNDLE in MS4W's Apache http server. All of those manual sets have basically eliminated the hundreds of reports I'd get weekly of that variable not being read, from MS4W users. Hope that helps (this issue is not discussed often publicly, but trust me, it unfortunately exists). -jeff -- Jeff McKenna GatewayGeo: Developers of MS4W, MapServer Consulting and Training co-founder of FOSS4G http://gatewaygeo.com/ On 2022-06-08 7:07 p.m., John Huotari via MapServer-users wrote: > I'm having trouble hitting a WMS referenced from within my .map file. Instead of the image from the WMS being drawn as a layer in my map, I instead get an error logged of "request failed with curl error code 60 (SSL certificate problem: unable to get local issuer certificate) for https://basemap.nationalmap.gov/arcgis/services/USGSTopo/MapServer/WmsServer?LAYERS=0&REQUEST=GetMap&SERVICE=WMS&..." > > The confusing thing to me is that the exact same .map file works just fine to produce a map image containing the referenced layer when I run mapserver -nh at a command prompt. i.e. mapserv -nh "QUERY_STRING=map=test.map&..." > test.png > > I've configured a CURL_CA_BUNDLE environment variable pointing to a curl-ca-bundle.crt file and I think the fact that I can reach that external WMS when running the mapserv command at a command prompt would indicate it's configured correctly. Any thoughts on what could cause the failure I'm seeing though MapServer running on Windows though IIS as a FastCGI app while succeeding when running the same .map file at a command prompt? Or any thoughts on what I might try to troubleshoot further? > > .map file contents are below > > MAP > NAME "MAP" > CONFIG "MS_ERRORFILE" "e:/LogFiles/ms_error3.txt" > CONFIG "PROJ_LIB" "E:/ms/projlib/" > DEBUG 5 > EXTENT -20037508.342789244 -20037508.342789244 20037508.342789244 20037508.342789244 > SIZE 256 256 > SYMBOLSET "E:\ms\basedata\symbols.txt" > FONTSET "E:\ms\basedata\fonts.txt" > IMAGECOLOR 255 255 255 > TRANSPARENT ON > DEFRESOLUTION 72 > RESOLUTION 72 > UNITS meters > PROJECTION "init=epsg:3857" END > WEB > METADATA > "wms_enable_request" "*" > END > END > LAYER > STATUS DEFAULT TYPE RASTER NAME "WMS_DRG" > DEBUG 5 > CONNECTIONTYPE WMS CONNECTION "https://basemap.nationalmap.gov/arcgis/services/USGSTopo/MapServer/WmsServer?" > PROJECTION "init=epsg:3857" END > METADATA > "wms_srs" "EPSG:3857" > "wms_name" "0" > "wms_server_version" "1.1.1" > "wms_format" "image/png" > END > END > END > > ******************* PLEASE NOTE ******************* > This message, along with any attachments, is for the designated recipient(s) only and may contain privileged, proprietary, or otherwise confidential information. If this message has reached you in error, kindly destroy it without review and notify the sender immediately. Any other use of such misdirected e-mail by you is prohibited. Where allowed by local law, electronic communications with Zurich and its affiliates, including e-mail and instant messaging (including content), may be scanned for the purposes of information security and assessment of internal compliance with company policy. > _______________________________________________ > MapServer-users mailing list > MapServer-users at lists.osgeo.org > https://lists.osgeo.org/mailman/listinfo/mapserver-users > From jmckenna at gatewaygeomatics.com Thu Jun 9 03:17:10 2022 From: jmckenna at gatewaygeomatics.com (Jeff McKenna) Date: Thu, 9 Jun 2022 07:17:10 -0300 Subject: [mapserver-users] External WMS issue In-Reply-To: References: Message-ID: <36be9ff0-d2d6-fb24-bc05-de0d07a6e397@gatewaygeomatics.com> I have also tried to document my steps, in the official document at https://mapserver.org/ogc/wxs_secure.html -jeff -- Jeff McKenna GatewayGeo: Developers of MS4W, MapServer Consulting and Training co-founder of FOSS4G http://gatewaygeo.com/ On 2022-06-08 7:07 p.m., John Huotari via MapServer-users wrote: > I'm having trouble hitting a WMS referenced from within my .map file. Instead of the image from the WMS being drawn as a layer in my map, I instead get an error logged of "request failed with curl error code 60 (SSL certificate problem: unable to get local issuer certificate) for https://basemap.nationalmap.gov/arcgis/services/USGSTopo/MapServer/WmsServer?LAYERS=0&REQUEST=GetMap&SERVICE=WMS&..." > > The confusing thing to me is that the exact same .map file works just fine to produce a map image containing the referenced layer when I run mapserver -nh at a command prompt. i.e. mapserv -nh "QUERY_STRING=map=test.map&..." > test.png > > I've configured a CURL_CA_BUNDLE environment variable pointing to a curl-ca-bundle.crt file and I think the fact that I can reach that external WMS when running the mapserv command at a command prompt would indicate it's configured correctly. Any thoughts on what could cause the failure I'm seeing though MapServer running on Windows though IIS as a FastCGI app while succeeding when running the same .map file at a command prompt? Or any thoughts on what I might try to troubleshoot further? > > .map file contents are below > > MAP > NAME "MAP" > CONFIG "MS_ERRORFILE" "e:/LogFiles/ms_error3.txt" > CONFIG "PROJ_LIB" "E:/ms/projlib/" > DEBUG 5 > EXTENT -20037508.342789244 -20037508.342789244 20037508.342789244 20037508.342789244 > SIZE 256 256 > SYMBOLSET "E:\ms\basedata\symbols.txt" > FONTSET "E:\ms\basedata\fonts.txt" > IMAGECOLOR 255 255 255 > TRANSPARENT ON > DEFRESOLUTION 72 > RESOLUTION 72 > UNITS meters > PROJECTION "init=epsg:3857" END > WEB > METADATA > "wms_enable_request" "*" > END > END > LAYER > STATUS DEFAULT TYPE RASTER NAME "WMS_DRG" > DEBUG 5 > CONNECTIONTYPE WMS CONNECTION "https://basemap.nationalmap.gov/arcgis/services/USGSTopo/MapServer/WmsServer?" > PROJECTION "init=epsg:3857" END > METADATA > "wms_srs" "EPSG:3857" > "wms_name" "0" > "wms_server_version" "1.1.1" > "wms_format" "image/png" > END > END > END > > ******************* PLEASE NOTE ******************* > This message, along with any attachments, is for the designated recipient(s) only and may contain privileged, proprietary, or otherwise confidential information. If this message has reached you in error, kindly destroy it without review and notify the sender immediately. Any other use of such misdirected e-mail by you is prohibited. Where allowed by local law, electronic communications with Zurich and its affiliates, including e-mail and instant messaging (including content), may be scanned for the purposes of information security and assessment of internal compliance with company policy. > _______________________________________________ > MapServer-users mailing list > MapServer-users at lists.osgeo.org > https://lists.osgeo.org/mailman/listinfo/mapserver-users > From sdlime at gmail.com Thu Jun 9 07:39:10 2022 From: sdlime at gmail.com (Steve Lime) Date: Thu, 9 Jun 2022 09:39:10 -0500 Subject: [mapserver-users] MapScript Projection Performance In-Reply-To: References: <3e6c7308-5b18-a318-2f40-5cfc167dd8fe@spatialys.com> Message-ID: The changes to MapScript help dramatically - at least using main. I end up with code like: my $proj_26915 = new mapscript::projectionObj('epsg:26915'); my $proj_4326 = new mapscript::projectionObj('epsg:4326'); my $reprojector = new mapscript::reprojectionObj( $proj_26915, $proj_4329); while (my $shape = $layer->nextShape()) { my $point = $shape->getCentroid(); $point->project($reprojector); # do something with $point } Execution time drops from ~4.3 sec to ~0.2 sec. Only change to the mapproject.* source was moving the structure definition for a reprojectionObj into the header file so Swig can get at it. I'll prepare a pull request... --Steve On Wed, Jun 8, 2022 at 2:40 PM Steve Lime wrote: > Thanks for the response Even. > > Switching to 4329 drops a few milliseconds, no major improvement. > > If I still create the projection objects but don't actually project the > point object then the execution time drops back to 0m0.180s or thereabouts. > Creating the projection objects is just running msLoadProjectionString() > under the hood. Must not be doing that much - no reprojector is being > created. > > $point->project() is running msProjectPoint() under the hood. I'm guessing > the reprojector is being constructed every time that's called. > > Note that I don't see a performance hit with 7.6 or 8.0 (main) with CGI > when doing loads of reprojection. > > So, following on your idea we'd need changes to the swig interface: > > 1. reprojector.i - with a constructor to take in/out projection objects > 2. overloaded project methods added to line.i, point.i, rect.i and > shape.i > > I'll try that. > > --Steve > > On Wed, Jun 8, 2022 at 11:09 AM Even Rouault > wrote: > >> Steve, >> >> are you sure you don't still run into the projection initialization, or >> actually the cost to get the reprojector object from the (in, out) >> projection tuple from the cache maintained by createNormalizedPJ() ? >> >> If the following functions were mapped to SWIG >> >> MS_DLL_EXPORT reprojectionObj* >> msProjectCreateReprojector(projectionObj* in, projectionObj* out); >> >> MS_DLL_EXPORT int msProjectPointEx(reprojectionObj* reprojector, >> pointObj *point); >> >> that could be interesting to check if they speed up things. >> >> You might also try to check if using EPSG:4269 instead of EPSG:4326 >> wouldn't speed up things, to eliminate the datum change from the >> equation (if you have PROJ grids available, they might be used to do the >> NAD83 -> WGS84 shift) >> >> Even >> >> Le 08/06/2022 ? 17:50, Steve Lime a ?crit : >> > Hi all: I have a Perl script that runs against a shapefile to project >> > a geometry centroid from UTM to Lat/Lon. Code looks something like this: >> > >> > my $proj_26915 = new mapscript::projectionObj('epsg:26915'); >> > my $proj_4326 = new mapscript::projectionObj('epsg:4326'); >> > >> > while (my $shape = $layer->nextShape()) { >> > my $point = $shape->getCentroid(); >> > $point->project($proj_26915, $proj_4326); >> > # do something with $point >> > } >> > >> > I get the following representative timings with ~250 polygon >> > geometries in the shapefile. >> > >> > MapServer 7.4 + Proj 6.2.1 = 0m0.180s >> > MapServer 7.6 + Proj 6.2.1 = 0m7.000s >> > MapServer 8.0 (main) + Proj 7.2.1 = 0m4.300s >> > >> > Huge difference and things kinda become unusable. Things improve a bit >> > with newer versions but the performance hit is substantial. I >> > thought at first that it was the projection initialization that was >> > taking all the time but it's actually the >> > "$point->project($proj_26915, $proj_4326);" statement. >> > >> > Perhaps I'm doing something wrong? >> > >> > --Steve >> > >> > _______________________________________________ >> > MapServer-users mailing list >> > MapServer-users at lists.osgeo.org >> > https://lists.osgeo.org/mailman/listinfo/mapserver-users >> >> -- >> http://www.spatialys.com >> My software is free, but my time generally not. >> >> -------------- next part -------------- An HTML attachment was scrubbed... URL: From paul.lewis at igeotec.com Mon Jun 13 02:28:02 2022 From: paul.lewis at igeotec.com (Paul Lewis) Date: Mon, 13 Jun 2022 10:28:02 +0100 Subject: [mapserver-users] Correct Mod Rewrite rule Message-ID: <1e080c6f-facf-056e-2387-92d4ff20a91c@igeotec.com> I Want to change this: *https:///cgi-bin/mapserv?map=/usr/share/mapserv/mapfile.map&service=wms&version=1.3.0&request=GetCapabilities* To this: *https:///wms?service=WMS&version=1.3.0&request=GetCapabilities* So I've enabled apache2 mod-rewrite and created a .htaccess file with the following rule as per Mapserver docs: *RewriteEngine on** **RewriteRule wms?(.*) /cgi-bin/mapserv?map=/usr/share/mapserv/mapfile.map&$1** * I've also adapted this rule to numerous variations to try and get it working but to no avail. The first link returns xml as expected. The second link returns this error: *mapserv(): Web application error. Traditional BROWSE mode requires a TEMPLATE in the WEB section, but none was provided.* I've an error log running for the rewrite with an example trace as follows: *[Thu Jun 09 18:54:22.033848 2022] [rewrite:trace3] [pid 40275:tid 140188000974592] mod_rewrite.c(483): [client :62351] - - [/sid#7f80151c0340][rid#7f80147130a0/initial] [perdir /var/www/html/] strip per-dir prefix: /var/www/html/wms -> wms** **[Thu Jun 09 18:54:22.033855 2022] [rewrite:trace3] [pid 40275:tid 140188000974592] mod_rewrite.c(483): [client :62351] - - [/sid#7f80151c0340][rid#7f80147130a0/initial] [perdir /var/www/html/] applying pattern 'wms?(.*)' to uri 'wms'** **[Thu Jun 09 18:54:22.033864 2022] [rewrite:trace2] [pid 40275:tid 140188000974592] mod_rewrite.c(483): [client :62351] - - [/sid#7f80151c0340][rid#7f80147130a0/initial] [perdir /var/www/html/] rewrite 'wms' -> '/cgi-bin/mapserv?map=/usr/share/mapserv/gni_wms.map&'** **[Thu Jun 09 18:54:22.033870 2022] [rewrite:trace3] [pid 40275:tid 140188000974592] mod_rewrite.c(483): [client :62351] - - [/sid#7f80151c0340][rid#7f80147130a0/initial] split uri=/cgi-bin/mapserv?map=/usr/share/mapserv/gni_wms.map& -> uri=/cgi-bin/mapserv, args=map=/usr/share/mapserv/gni_wms.map** **[Thu Jun 09 18:54:22.033877 2022] [rewrite:trace2] [pid 40275:tid 140188000974592] mod_rewrite.c(483): [client :62351] - - [/sid#7f80151c0340][rid#7f80147130a0/initial] [perdir /var/www/html/] trying to replace context docroot /var/www/html with context prefix** **[Thu Jun 09 18:54:22.033883 2022] [rewrite:trace1] [pid 40275:tid 140188000974592] mod_rewrite.c(483): [client :62351] - - [/sid#7f80151c0340][rid#7f80147130a0/initial] [perdir /var/www/html/] internal redirect with /cgi-bin/mapserv [INTERNAL REDIRECT]** * Am I correct in thinking that the redirect is not handling the GET params? Which means my rule is wrong and is hence passing the wrong request string to mapserver thus causing the error? Paul -------------- next part -------------- An HTML attachment was scrubbed... URL: From trondmm-mapserver+2017 at crusaders.no Mon Jun 13 03:40:22 2022 From: trondmm-mapserver+2017 at crusaders.no (Trond Michelsen) Date: Mon, 13 Jun 2022 12:40:22 +0200 Subject: [mapserver-users] Correct Mod Rewrite rule In-Reply-To: <1e080c6f-facf-056e-2387-92d4ff20a91c@igeotec.com> References: <1e080c6f-facf-056e-2387-92d4ff20a91c@igeotec.com> Message-ID: <20220613104022.GA26540@crusaders.no> You have to add the Rewrite-flag QSA (query string append). Otherwise, the query string from the incoming request is lost. There's also no need to try to match the query string in your pattern. So, try this instead: RewriteRule wms /cgi-bin/mapserv?map=/usr/share/mapserv/mapfile.map [QSA] On Mon, Jun 13, 2022 at 10:28:02AM +0100, Paul Lewis wrote: > I Want to change this: > > > *https:///cgi-bin/mapserv?map=/usr/share/mapserv/mapfile.map&service=wms&version=1.3.0&request=GetCapabilities* > > To this: > > *https:///wms?service=WMS&version=1.3.0&request=GetCapabilities* > > So I've enabled apache2 mod-rewrite and created a .htaccess file > with the following rule as per Mapserver docs: > > *RewriteEngine on** > **RewriteRule wms?(.*) > /cgi-bin/mapserv?map=/usr/share/mapserv/mapfile.map&$1** > * > I've also adapted this rule to numerous variations to try and get it > working but to no avail. > The first link returns xml as expected. > The second link returns this error: > > *mapserv(): Web application error. Traditional BROWSE mode requires > a TEMPLATE in the WEB section, but none was provided.* > > I've an error log running for the rewrite with an example trace as follows: > > > *[Thu Jun 09 18:54:22.033848 2022] [rewrite:trace3] [pid 40275:tid > 140188000974592] mod_rewrite.c(483): [client :62351] > - - [ server>/sid#7f80151c0340][rid#7f80147130a0/initial] [perdir > /var/www/html/] strip per-dir prefix: /var/www/html/wms -> wms** > **[Thu Jun 09 18:54:22.033855 2022] [rewrite:trace3] [pid 40275:tid > 140188000974592] mod_rewrite.c(483): [client :62351] > - - [ server>/sid#7f80151c0340][rid#7f80147130a0/initial] [perdir > /var/www/html/] applying pattern 'wms?(.*)' to uri 'wms'** > **[Thu Jun 09 18:54:22.033864 2022] [rewrite:trace2] [pid 40275:tid > 140188000974592] mod_rewrite.c(483): [client :62351] > - - [ server>/sid#7f80151c0340][rid#7f80147130a0/initial] [perdir > /var/www/html/] rewrite 'wms' -> > '/cgi-bin/mapserv?map=/usr/share/mapserv/gni_wms.map&'** > **[Thu Jun 09 18:54:22.033870 2022] [rewrite:trace3] [pid 40275:tid > 140188000974592] mod_rewrite.c(483): [client :62351] > - - [ server>/sid#7f80151c0340][rid#7f80147130a0/initial] split > uri=/cgi-bin/mapserv?map=/usr/share/mapserv/gni_wms.map& -> > uri=/cgi-bin/mapserv, args=map=/usr/share/mapserv/gni_wms.map** > **[Thu Jun 09 18:54:22.033877 2022] [rewrite:trace2] [pid 40275:tid > 140188000974592] mod_rewrite.c(483): [client :62351] > - - [ server>/sid#7f80151c0340][rid#7f80147130a0/initial] [perdir > /var/www/html/] trying to replace context docroot /var/www/html with > context prefix** > **[Thu Jun 09 18:54:22.033883 2022] [rewrite:trace1] [pid 40275:tid > 140188000974592] mod_rewrite.c(483): [client :62351] > - - [ server>/sid#7f80151c0340][rid#7f80147130a0/initial] [perdir > /var/www/html/] internal redirect with /cgi-bin/mapserv [INTERNAL > REDIRECT]** > * > > > Am I correct in thinking that the redirect is not handling the GET params? > > Which means my rule is wrong and is hence passing the wrong request > string to mapserver thus causing the error? > > > Paul > _______________________________________________ > MapServer-users mailing list > MapServer-users at lists.osgeo.org > https://lists.osgeo.org/mailman/listinfo/mapserver-users -- Trond Michelsen From paul.lewis at igeotec.com Mon Jun 13 05:08:43 2022 From: paul.lewis at igeotec.com (Paul Lewis) Date: Mon, 13 Jun 2022 13:08:43 +0100 Subject: [mapserver-users] Correct Mod Rewrite rule In-Reply-To: <20220613104022.GA26540@crusaders.no> References: <1e080c6f-facf-056e-2387-92d4ff20a91c@igeotec.com> <20220613104022.GA26540@crusaders.no> Message-ID: Brilliant thank you, that has it sorted perfectly... Paul On 13/06/2022 11:40, Trond Michelsen wrote: > You have to add the Rewrite-flag QSA (query string append). Otherwise, > the query string from the incoming request is lost. There's also no > need to try to match the query string in your pattern. > > So, try this instead: > > RewriteRule wms /cgi-bin/mapserv?map=/usr/share/mapserv/mapfile.map [QSA] > > On Mon, Jun 13, 2022 at 10:28:02AM +0100, Paul Lewis wrote: >> I Want to change this: >> >> >> *https:///cgi-bin/mapserv?map=/usr/share/mapserv/mapfile.map&service=wms&version=1.3.0&request=GetCapabilities* >> >> To this: >> >> *https:///wms?service=WMS&version=1.3.0&request=GetCapabilities* >> >> So I've enabled apache2 mod-rewrite and created a .htaccess file >> with the following rule as per Mapserver docs: >> >> *RewriteEngine on** >> **RewriteRule wms?(.*) >> /cgi-bin/mapserv?map=/usr/share/mapserv/mapfile.map&$1** >> * >> I've also adapted this rule to numerous variations to try and get it >> working but to no avail. >> The first link returns xml as expected. >> The second link returns this error: >> >> *mapserv(): Web application error. Traditional BROWSE mode requires >> a TEMPLATE in the WEB section, but none was provided.* >> >> I've an error log running for the rewrite with an example trace as follows: >> >> >> *[Thu Jun 09 18:54:22.033848 2022] [rewrite:trace3] [pid 40275:tid >> 140188000974592] mod_rewrite.c(483): [client :62351] >> - - [> server>/sid#7f80151c0340][rid#7f80147130a0/initial] [perdir >> /var/www/html/] strip per-dir prefix: /var/www/html/wms -> wms** >> **[Thu Jun 09 18:54:22.033855 2022] [rewrite:trace3] [pid 40275:tid >> 140188000974592] mod_rewrite.c(483): [client :62351] >> - - [> server>/sid#7f80151c0340][rid#7f80147130a0/initial] [perdir >> /var/www/html/] applying pattern 'wms?(.*)' to uri 'wms'** >> **[Thu Jun 09 18:54:22.033864 2022] [rewrite:trace2] [pid 40275:tid >> 140188000974592] mod_rewrite.c(483): [client :62351] >> - - [> server>/sid#7f80151c0340][rid#7f80147130a0/initial] [perdir >> /var/www/html/] rewrite 'wms' -> >> '/cgi-bin/mapserv?map=/usr/share/mapserv/gni_wms.map&'** >> **[Thu Jun 09 18:54:22.033870 2022] [rewrite:trace3] [pid 40275:tid >> 140188000974592] mod_rewrite.c(483): [client :62351] >> - - [> server>/sid#7f80151c0340][rid#7f80147130a0/initial] split >> uri=/cgi-bin/mapserv?map=/usr/share/mapserv/gni_wms.map& -> >> uri=/cgi-bin/mapserv, args=map=/usr/share/mapserv/gni_wms.map** >> **[Thu Jun 09 18:54:22.033877 2022] [rewrite:trace2] [pid 40275:tid >> 140188000974592] mod_rewrite.c(483): [client :62351] >> - - [> server>/sid#7f80151c0340][rid#7f80147130a0/initial] [perdir >> /var/www/html/] trying to replace context docroot /var/www/html with >> context prefix** >> **[Thu Jun 09 18:54:22.033883 2022] [rewrite:trace1] [pid 40275:tid >> 140188000974592] mod_rewrite.c(483): [client :62351] >> - - [> server>/sid#7f80151c0340][rid#7f80147130a0/initial] [perdir >> /var/www/html/] internal redirect with /cgi-bin/mapserv [INTERNAL >> REDIRECT]** >> * >> >> >> Am I correct in thinking that the redirect is not handling the GET params? >> >> Which means my rule is wrong and is hence passing the wrong request >> string to mapserver thus causing the error? >> >> >> Paul >> _______________________________________________ >> MapServer-users mailing list >> MapServer-users at lists.osgeo.org >> https://lists.osgeo.org/mailman/listinfo/mapserver-users > -- ------------------------------------------------------------------------ *Paul Lewis PhD.* *Chief Systems Architect* iGeotech Technologies Limited (http://www.igeotec.com/) Ubipix (http://www.ubipix.com/) iGeotec Ltd., Block 8, Blackrock Business Park, Carysfort Avenue, Blackrock, Co. Dublin, A94 W209, Ireland. Tel: +353 1 437 6921 Mob: +353 85 7217978 -------------- next part -------------- An HTML attachment was scrubbed... URL: From jason2017jay at gmail.com Mon Jun 13 06:26:35 2022 From: jason2017jay at gmail.com (Jeremy JK) Date: Mon, 13 Jun 2022 09:26:35 -0400 Subject: [mapserver-users] CGI or FastCGI Message-ID: Hello, Which one is better to use for mapserver set up CGI or FastCGI? How to set up apache configuration for cgi only? Most interweb tutorials shows fcgi only. Thanks for your help. Regards -------------- next part -------------- An HTML attachment was scrubbed... URL: From MarkVolz at co.lyon.mn.us Mon Jun 13 08:27:35 2022 From: MarkVolz at co.lyon.mn.us (Mark Volz) Date: Mon, 13 Jun 2022 15:27:35 +0000 Subject: [mapserver-users] Stacked Labels Message-ID: Fons, Thank you for your reply. I am using wrapped labels. However the underlying issue is that two separate tax condo parcels have the same footprint (for different floors) and therefore use the exact same label position for the tax parcel. It is my understanding that when POSITION is set to AUTO that MapServer will first try CC, UC, LC, CL, then CR as possible positions and give up labeling if none of those positions work. Unfortunately it appears that MapServer is not trying to use alternate label positions for the second tax parcel. In summary I would like to know if MapServer can try to use alternate label positions for a feature within the same class, and if so how can I tell it to try different labels? Thank You Sincerely, Mark Volz, GISP -----Original Message----- From: MapServer-users On Behalf Of mapserver-users-request at lists.osgeo.org Sent: Wednesday, June 1, 2022 2:00 PM To: mapserver-users at lists.osgeo.org Subject: MapServer-users Digest, Vol 173, Issue 1 Caution: This email was sent from an external account. If you were expecting an internal email you would not see this notice. Please exercise caution before clicking on any links. Report any suspicious email to the Help Desk. Question Everything: Were you expecting this email? ________________________________ Send MapServer-users mailing list submissions to mapserver-users at lists.osgeo.org To subscribe or unsubscribe via the World Wide Web, visit https://linkprotect.cudasvc.com/url?a=https%3a%2f%2flists.osgeo.org%2fmailman%2flistinfo%2fmapserver-users&c=E,1,Yi2ipBn_UYVENfKLeOAeaVfm-I5RunwbOmXWrHjFQThCWG4uGj_Ve06qjbGRXEmpR0Oi_jP2_OiQgFoER5lIg6qcrHll1h_XWVfZ7OteFA,,&typo=1 or, via email, send a message with subject or body 'help' to mapserver-users-request at lists.osgeo.org You can reach the person managing the list at mapserver-users-owner at lists.osgeo.org When replying, please edit your Subject line so it is more specific than "Re: Contents of MapServer-users digest..." Today's Topics: 1. Stacked Labels (Mark Volz) 2. Re: Stacked Labels (Fons Arts) ---------------------------------------------------------------------- Message: 1 Date: Tue, 31 May 2022 21:30:22 +0000 From: Mark Volz To: "mapserver-users at lists.osgeo.org" Subject: [mapserver-users] Stacked Labels Message-ID: <489deae1cb6b47d68f18af6fdd853d72 at co.lyon.mn.us> Content-Type: text/plain; charset="us-ascii" Hello, I would like to label several stacked tax parcels that share the exact same footprint. Each parcel includes the Parcel Number, Owner, and Property Address. Is there any way to label each of the parcels? Position AUTO is only displaying one of the labels. Thanks! Sincerely, Mark Volz, GISP Lyon County GIS Coordinator Ph: (507) 532-8218 -------------- next part -------------- An HTML attachment was scrubbed... URL: ------------------------------ Message: 2 Date: Wed, 1 Jun 2022 10:56:40 +0200 From: Fons Arts To: Mark Volz , "mapserver-users at lists.osgeo.org" Subject: Re: [mapserver-users] Stacked Labels Message-ID: <55dcf634-6726-32c9-1e95-11190eb58592 at GISArts.nl> Content-Type: text/plain; charset="utf-8"; Format="flowed" Hi Mark, You can use? the Label wrap, https://linkprotect.cudasvc.com/url?a=https%3a%2f%2fmapserver.org%2fmapfile%2flabel.html&c=E,1,fHrQv9G_4pNWzzNCHgfwWbdAqLB7890_ALQKf6-5D6K6qyNS_oPu6BnF0oyUA7y0dft14MYiC8M2e0nDgtnJ4YUC1tBnIxD0mkAGVFwX2L-wYA,,&typo=1 Something like ?? ???? ??? TEXT '[adres] \[bedrijfstype]\Fijnstofemissie kg_jr [fijnstofemissie_kg_jr]\Geuremissie [geuremissie_ou_s] ou_s\nh3 emissie [nh3_emissie]\Aantal NGE [nh3_emissie]' ?? ???? ??? WRAP "\n" gr Fons Op 31/05/2022 om 23:30 schreef Mark Volz: > > Hello, > > I would like to label several stacked ?tax parcels that share the > exact same footprint.? Each parcel includes the Parcel Number, Owner, > and Property Address.? Is there any way to label each of the parcels?? > ?Position AUTO is only displaying one of the labels. > > Thanks! > > Sincerely, > > *Mark Volz, GISP*** > > *Lyon County GIS Coordinator* > > Ph:? (507) 532-8218 > > > _______________________________________________ > MapServer-users mailing list > MapServer-users at lists.osgeo.org > https://linkprotect.cudasvc.com/url?a=https%3a%2f%2flists.osgeo.org%2f > mailman%2flistinfo%2fmapserver-users&c=E,1,ekqNyw_7OiTJCLvkQkL6Iufr6yj > 26uppnfo5xE9Zheych9lVvsl8YS9jq1gZsgk2JBLTgtB7JnQxQmyJr1TpLM8XUeQ44aNoU > xJZTKqA3sfKXmZpQ_yHdqXjaQ,,&typo=1 -------------- next part -------------- An HTML attachment was scrubbed... URL: ------------------------------ Subject: Digest Footer _______________________________________________ MapServer-users mailing list MapServer-users at lists.osgeo.org https://linkprotect.cudasvc.com/url?a=https%3a%2f%2flists.osgeo.org%2fmailman%2flistinfo%2fmapserver-users&c=E,1,jXVft_S3P3jFPLeCvS9R9IM2vXm_46SlKSQY3Bsa-9ck1ctoDWmq15tmV_b6o_NLHmkbRXdxiuuXnS1Ol4ri4i02QtQ14vvhYhr6DGa7gq1okNNRipTsRlQp5aI,&typo=1 ------------------------------ End of MapServer-users Digest, Vol 173, Issue 1 *********************************************** From richard.greenwood at gmail.com Mon Jun 13 12:56:32 2022 From: richard.greenwood at gmail.com (Richard Greenwood) Date: Mon, 13 Jun 2022 13:56:32 -0600 Subject: [mapserver-users] CGI or FastCGI In-Reply-To: References: Message-ID: I recommend FastCGI. It's faster because the mapserv process remains in memory between requests. I don't know of any downsides. On Mon, Jun 13, 2022 at 7:26 AM Jeremy JK wrote: > Hello, > Which one is better to use for mapserver set up CGI or FastCGI? > How to set up apache configuration for cgi only? Most interweb tutorials > shows fcgi only. > Thanks for your help. Regards > > _______________________________________________ > 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 F.Arts at GISArts.nl Mon Jun 13 22:39:53 2022 From: F.Arts at GISArts.nl (Fons Arts) Date: Tue, 14 Jun 2022 07:39:53 +0200 Subject: [mapserver-users] Stacked Labels In-Reply-To: References: Message-ID: Hi Mark, Can you share your mapfile, or just the class part of it. then we'll look at that. gr Fons Op 13/06/2022 om 17:27 schreef Mark Volz: > Fons, > > Thank you for your reply. I am using wrapped labels. However the underlying issue is that two separate tax condo parcels have the same footprint (for different floors) and therefore use the exact same label position for the tax parcel. It is my understanding that when POSITION is set to AUTO that MapServer will first try CC, UC, LC, CL, then CR as possible positions and give up labeling if none of those positions work. Unfortunately it appears that MapServer is not trying to use alternate label positions for the second tax parcel. > > > In summary I would like to know if MapServer can try to use alternate label positions for a feature within the same class, and if so how can I tell it to try different labels? > > Thank You > > Sincerely, > Mark Volz, GISP > > -----Original Message----- > From: MapServer-users On Behalf Of mapserver-users-request at lists.osgeo.org > Sent: Wednesday, June 1, 2022 2:00 PM > To: mapserver-users at lists.osgeo.org > Subject: MapServer-users Digest, Vol 173, Issue 1 > > Caution: > > This email was sent from an external account. If you were expecting an internal email you would not see this notice. Please exercise caution before clicking on any links. Report any suspicious email to the Help Desk. > > Question Everything: Were you expecting this email? > > ________________________________ > > Send MapServer-users mailing list submissions to > mapserver-users at lists.osgeo.org > > To subscribe or unsubscribe via the World Wide Web, visit > https://linkprotect.cudasvc.com/url?a=https%3a%2f%2flists.osgeo.org%2fmailman%2flistinfo%2fmapserver-users&c=E,1,Yi2ipBn_UYVENfKLeOAeaVfm-I5RunwbOmXWrHjFQThCWG4uGj_Ve06qjbGRXEmpR0Oi_jP2_OiQgFoER5lIg6qcrHll1h_XWVfZ7OteFA,,&typo=1 > or, via email, send a message with subject or body 'help' to > mapserver-users-request at lists.osgeo.org > > You can reach the person managing the list at > mapserver-users-owner at lists.osgeo.org > > When replying, please edit your Subject line so it is more specific than "Re: Contents of MapServer-users digest..." > > > Today's Topics: > > 1. Stacked Labels (Mark Volz) > 2. Re: Stacked Labels (Fons Arts) > > > ---------------------------------------------------------------------- > > Message: 1 > Date: Tue, 31 May 2022 21:30:22 +0000 > From: Mark Volz > To: "mapserver-users at lists.osgeo.org" > > Subject: [mapserver-users] Stacked Labels > Message-ID: <489deae1cb6b47d68f18af6fdd853d72 at co.lyon.mn.us> > Content-Type: text/plain; charset="us-ascii" > > Hello, > > I would like to label several stacked tax parcels that share the exact same footprint. Each parcel includes the Parcel Number, Owner, and Property Address. Is there any way to label each of the parcels? Position AUTO is only displaying one of the labels. > > Thanks! > > Sincerely, > Mark Volz, GISP > Lyon County GIS Coordinator > Ph: (507) 532-8218 > > -------------- next part -------------- > An HTML attachment was scrubbed... > URL: > > ------------------------------ > > Message: 2 > Date: Wed, 1 Jun 2022 10:56:40 +0200 > From: Fons Arts > To: Mark Volz , > "mapserver-users at lists.osgeo.org" > Subject: Re: [mapserver-users] Stacked Labels > Message-ID: <55dcf634-6726-32c9-1e95-11190eb58592 at GISArts.nl> > Content-Type: text/plain; charset="utf-8"; Format="flowed" > > Hi Mark, > You can use? the Label wrap, https://linkprotect.cudasvc.com/url?a=https%3a%2f%2fmapserver.org%2fmapfile%2flabel.html&c=E,1,fHrQv9G_4pNWzzNCHgfwWbdAqLB7890_ALQKf6-5D6K6qyNS_oPu6BnF0oyUA7y0dft14MYiC8M2e0nDgtnJ4YUC1tBnIxD0mkAGVFwX2L-wYA,,&typo=1 > Something like > > ?? ???? ??? TEXT '[adres] \[bedrijfstype]\Fijnstofemissie kg_jr [fijnstofemissie_kg_jr]\Geuremissie [geuremissie_ou_s] ou_s\nh3 emissie [nh3_emissie]\Aantal NGE [nh3_emissie]' > ?? ???? ??? WRAP "\n" > > gr Fons > > Op 31/05/2022 om 23:30 schreef Mark Volz: >> Hello, >> >> I would like to label several stacked ?tax parcels that share the >> exact same footprint.? Each parcel includes the Parcel Number, Owner, >> and Property Address.? Is there any way to label each of the parcels?? >> ?Position AUTO is only displaying one of the labels. >> >> Thanks! >> >> Sincerely, >> >> *Mark Volz, GISP*** >> >> *Lyon County GIS Coordinator* >> >> Ph:? (507) 532-8218 >> >> >> _______________________________________________ >> MapServer-users mailing list >> MapServer-users at lists.osgeo.org >> https://linkprotect.cudasvc.com/url?a=https%3a%2f%2flists.osgeo.org%2f >> mailman%2flistinfo%2fmapserver-users&c=E,1,ekqNyw_7OiTJCLvkQkL6Iufr6yj >> 26uppnfo5xE9Zheych9lVvsl8YS9jq1gZsgk2JBLTgtB7JnQxQmyJr1TpLM8XUeQ44aNoU >> xJZTKqA3sfKXmZpQ_yHdqXjaQ,,&typo=1 > -------------- next part -------------- > An HTML attachment was scrubbed... > URL: > > ------------------------------ > > Subject: Digest Footer > > _______________________________________________ > MapServer-users mailing list > MapServer-users at lists.osgeo.org > https://linkprotect.cudasvc.com/url?a=https%3a%2f%2flists.osgeo.org%2fmailman%2flistinfo%2fmapserver-users&c=E,1,jXVft_S3P3jFPLeCvS9R9IM2vXm_46SlKSQY3Bsa-9ck1ctoDWmq15tmV_b6o_NLHmkbRXdxiuuXnS1Ol4ri4i02QtQ14vvhYhr6DGa7gq1okNNRipTsRlQp5aI,&typo=1 > > > ------------------------------ > > End of MapServer-users Digest, Vol 173, Issue 1 > *********************************************** > > _______________________________________________ > MapServer-users mailing list > MapServer-users at lists.osgeo.org > https://lists.osgeo.org/mailman/listinfo/mapserver-users From John.Huotari at RCIS.com Wed Jun 15 07:51:39 2022 From: John.Huotari at RCIS.com (John Huotari) Date: Wed, 15 Jun 2022 14:51:39 +0000 Subject: [mapserver-users] External WMS issue Message-ID: Thanks Jeff; that info helped greatly with no longer chasing dead ends. I was hoping I'd be able to say I got it working, but after trying several things including setting the CURL_CA_BUNDLE file as an IIS FastCGI variable, it still isn't working. Our next step will be switching to the MS4W distribution of MapServer; just have to get through our busy season here before we make that switch. Thanks for the info! John -----Original Message----- Date: Thu, 9 Jun 2022 07:12:43 -0300 From: Jeff McKenna To: mapserver-users at lists.osgeo.org Subject: Re: [mapserver-users] External WMS issue Message-ID: Content-Type: text/plain; charset=UTF-8; format=flowed Hi John, There is a long-standing issue on Windows systems where environment variables are not able to be accessed, by the FOSS4G software stack. To work around this for MS4W users, I set that CURL_CA_BUNDLE manually all throughout the MS4W stack, instead of through an environment variable. (the upcoming MapServer 8 release will include a config file where we can also set this instead) I also set CURL_CA_BUNDLE in MS4W's Apache http server. All of those manual sets have basically eliminated the hundreds of reports I'd get weekly of that variable not being read, from MS4W users. Hope that helps (this issue is not discussed often publicly, but trust me, it unfortunately exists). -jeff -- Jeff McKenna GatewayGeo: Developers of MS4W, MapServer Consulting and Training co-founder of FOSS4G http://gatewaygeo.com/__;!!G6MNE2S8Nw!m2E3pCPSkq3ylKyH5eWJpbtQNsvt9xTyIIK4JKyfRB5ko9scuSYLPr6TQHNmYrVHw1Z-sPgh1S_ry0Hi0Ny3VII6ZbEP_RHe$ ******************* PLEASE NOTE ******************* This message, along with any attachments, is for the designated recipient(s) only and may contain privileged, proprietary, or otherwise confidential information. If this message has reached you in error, kindly destroy it without review and notify the sender immediately. Any other use of such misdirected e-mail by you is prohibited. Where allowed by local law, electronic communications with Zurich and its affiliates, including e-mail and instant messaging (including content), may be scanned for the purposes of information security and assessment of internal compliance with company policy. From p3rand0r at gmail.com Thu Jun 16 02:04:36 2022 From: p3rand0r at gmail.com (Andi p3 Domi) Date: Thu, 16 Jun 2022 12:04:36 +0300 Subject: [mapserver-users] Fwd: MapServer 7 arithmetic expressions do not work on STYLE attributes? In-Reply-To: References: Message-ID: I am trying to port my code from MapServer 5 (Oracle) to MapServer 7 (PostgreSQL), but I am encountering an issue when trying to apply arithmetic expressions in the style class. So previously in MapServer 5 I would have something like: DATA "geom from (select pk, geom, size from sizes_of_thing) USING srid 3788 version 11g" CLASS MAXSCALEDENOM 5001 STYLE COLOR [size*2] Which worked perfectly fine: But if I convert it to MapServer 7 and PostgreSQL like: DATA "geom from (select pk, geom, size from sizes_of_thing sot) USING unique pk USING srid=3788" CLASS STYLE COLOR [size*2] Throws an error such as: msPostGISLayerWhichShapes(): Error (ERROR: column "size*2" does not exist By any chance are these expressions not supported anymore in MapServer 7/PostGIS or am I doing something wrong? What I have tried so far is to write something like SIZE [size]*2 SIZE ([size]*2) create an expression like: EXPRESSION ("size2" "[size]*2") And use it in something like: SIZE [size2] create a validation variable such as: VALIDATION "size2" '[size]*2' and then SIZE [size2] But it seems like none of them work. -------------- next part -------------- An HTML attachment was scrubbed... URL: From jukka.rahkonen at maanmittauslaitos.fi Thu Jun 16 02:09:50 2022 From: jukka.rahkonen at maanmittauslaitos.fi (Rahkonen Jukka) Date: Thu, 16 Jun 2022 09:09:50 +0000 Subject: [mapserver-users] Fwd: MapServer 7 arithmetic expressions do not work on STYLE attributes? Message-ID: Hi, Adding a link to the same question asked earlier in gis.stackexchange: https://gis.stackexchange.com/questions/433659/mapserver-7-arithmetic-expressions-do-not-work-on-style-attributes/433664#433664. -Jukka Rahkonen- L?hett?j?: MapServer-users Puolesta Andi p3 Domi L?hetetty: torstai 16. kes?kuuta 2022 12.05 Vastaanottaja: mapserver-users at lists.osgeo.org Aihe: [mapserver-users] Fwd: MapServer 7 arithmetic expressions do not work on STYLE attributes? I am trying to port my code from MapServer 5 (Oracle) to MapServer 7 (PostgreSQL), but I am encountering an issue when trying to apply arithmetic expressions in the style class. So previously in MapServer 5 I would have something like: DATA "geom from (select pk, geom, size from sizes_of_thing) USING srid 3788 version 11g" CLASS MAXSCALEDENOM 5001 STYLE COLOR [size*2] Which worked perfectly fine: But if I convert it to MapServer 7 and PostgreSQL like: DATA "geom from (select pk, geom, size from sizes_of_thing sot) USING unique pk USING srid=3788" CLASS STYLE COLOR [size*2] Throws an error such as: msPostGISLayerWhichShapes(): Error (ERROR: column "size*2" does not exist By any chance are these expressions not supported anymore in MapServer 7/PostGIS or am I doing something wrong? What I have tried so far is to write something like SIZE [size]*2 SIZE ([size]*2) create an expression like: EXPRESSION ("size2" "[size]*2") And use it in something like: SIZE [size2] create a validation variable such as: VALIDATION "size2" '[size]*2' and then SIZE [size2] But it seems like none of them work. -------------- next part -------------- An HTML attachment was scrubbed... URL: From sethg at geographika.co.uk Thu Jun 16 05:47:22 2022 From: sethg at geographika.co.uk (Seth G) Date: Thu, 16 Jun 2022 14:47:22 +0200 Subject: [mapserver-users] Fwd: MapServer 7 arithmetic expressions do not work on STYLE attributes? In-Reply-To: References: Message-ID: <3080468f-281e-495c-90ad-668524e7e3b9@www.fastmail.com> Hi, Couldn't you just add a new field to the DATA clause and use that? `DATA "geom from (select pk, geom, size, (size * 2) as mycolor from sizes_of_thing) USING srid 3788 version 11g" ` `CLASS ` `MAXSCALEDENOM 5001 ` `STYLE ` ` COLOR [`mycolor`]` Or maybe this is a cut-down example. `Seth` `` -- web:https://geographika.net twitter: @geographika On Thu, Jun 16, 2022, at 11:04 AM, Andi p3 Domi wrote: > I am trying to port my code from MapServer 5 (Oracle) to MapServer 7 (PostgreSQL), but I am encountering an issue when trying to apply arithmetic expressions in the style class. So previously in MapServer 5 I would have something like: > > `DATA "geom from (select pk, geom, size from sizes_of_thing) USING srid 3788 version 11g" > CLASS > MAXSCALEDENOM 5001 > STYLE > COLOR [size*2] ` > Which worked perfectly fine: But if I convert it to MapServer 7 and PostgreSQL like: > > `DATA "geom from (select pk, geom, size from sizes_of_thing sot) USING unique pk USING srid=3788" > CLASS > STYLE > COLOR [size*2] ` > Throws an error such as: > > `msPostGISLayerWhichShapes(): Error (ERROR: column "size*2" does not exist ` > By any chance are these expressions not supported anymore in MapServer 7/PostGIS or am I doing something wrong? > > What I have tried so far is to write something like > > `SIZE [size]*2 > SIZE ([size]*2) ` > create an expression like: > > `EXPRESSION ("size2" "[size]*2") ` > And use it in something like: > > `SIZE [size2] ` > create a validation variable such as: > > `VALIDATION > "size2" '[size]*2' ` > and then > > `SIZE [size2] ` > But it seems like none of them work. > > _______________________________________________ > 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 jcbastin at thelis.be Fri Jun 17 01:50:11 2022 From: jcbastin at thelis.be (Jean-Christophe Bastin) Date: Fri, 17 Jun 2022 08:50:11 +0000 Subject: [mapserver-users] Need help/sample on how to use templating please Message-ID: Hello community, I try to find how to format click results of my MapFile. I test my WMS on QGIS. By default, infotool result looks like this : GetFeatureInfo results: Layer 'my_layer' Feature 1234: field_1 = value_1 field_2 = value_2 field_3 = value_3 ... The field names are base version coming from the data source. I'm looking to change them in a more literal way, something like < My super field 1 has the great value 1 >. I found that the way to reach this is templating. I found the documentation : * https://mapserver.org/mapfile/template.html#template * https://mapserver.org/output/template_output.html?highlight=template And I looked for examples but I can't make it work, I was wondering what I'm doing wrong. Here is what I did : I created a file "my_template.tmpl" containing just two lines : MY TEST Then, in a working Mapfile, I added the TEMPLATE to my LAYER (the file "my_template.tmpl" is stored at the same level than my MapFile) : MAP ... LAYER ... TEMPLATE "my_template.tmpl" ... END END If I understand well, when I click to get informations, I should see now "MY TEST" ? But it continues to display the base informations like explained above. I also tried with OUTPUTFORMAT, but it doesn't work better : MAP OUTPUTFORMAT NAME "infotool_template" DRIVER "TEMPLATE" MIMETYPE "text/html" FORMATOPTION "FILE=my_template.tmpl" END ... LAYER ... TEMPLATE "infotool_template" ... END END I guess I do something wrong, but I can't find what. Missing parameter ? Simple/double cotes issue ? Bad names/references ? Or something about the client (QGIS in my case) asking informations ? Any help/advice will be very appreciated. Hope to have some feedback. Many thanks :-) JCB -------------- next part -------------- An HTML attachment was scrubbed... URL: From b.j.kobben at utwente.nl Fri Jun 17 02:02:12 2022 From: b.j.kobben at utwente.nl (Kobben, Barend (UT-ITC)) Date: Fri, 17 Jun 2022 09:02:12 +0000 Subject: [mapserver-users] Need help/sample on how to use templating please Message-ID: It might be as simple as naming the template template.html instead of template.tmpl.... -- Barend K?bben On 17/06/2022, 10:50, "MapServer-users on behalf of Jean-Christophe Bastin" on behalf of jcbastin at thelis.be> wrote: Hello community, I try to find how to format click results of my MapFile. I test my WMS on QGIS. By default, infotool result looks like this : GetFeatureInfo results: Layer 'my_layer' Feature 1234: field_1 = value_1 field_2 = value_2 field_3 = value_3 ? The field names are base version coming from the data source. I'm looking to change them in a more literal way, something like ? My super field 1 has the great value 1 ?. I found that the way to reach this is templating. I found the documentation : * https://mapserver.org/mapfile/template.html#template * https://mapserver.org/output/template_output.html?highlight=template And I looked for examples but I can't make it work, I was wondering what I'm doing wrong. Here is what I did : I created a file "my_template.tmpl" containing just two lines : MY TEST Then, in a working Mapfile, I added the TEMPLATE to my LAYER (the file "my_template.tmpl" is stored at the same level than my MapFile) : MAP ... LAYER ... TEMPLATE "my_template.tmpl" ... END END If I understand well, when I click to get informations, I should see now "MY TEST" ? But it continues to display the base informations like explained above. I also tried with OUTPUTFORMAT, but it doesn't work better : MAP OUTPUTFORMAT NAME "infotool_template" DRIVER "TEMPLATE" MIMETYPE "text/html" FORMATOPTION "FILE=my_template.tmpl" END ... LAYER ... TEMPLATE "infotool_template" ... END END I guess I do something wrong, but I can't find what. Missing parameter ? Simple/double cotes issue ? Bad names/references ? Or something about the client (QGIS in my case) asking informations ? Any help/advice will be very appreciated. Hope to have some feedback. Many thanks :-) JCB -------------- next part -------------- An HTML attachment was scrubbed... URL: From jcbastin at thelis.be Fri Jun 17 02:12:30 2022 From: jcbastin at thelis.be (Jean-Christophe Bastin) Date: Fri, 17 Jun 2022 09:12:30 +0000 Subject: [mapserver-users] Need help/sample on how to use templating please In-Reply-To: References: Message-ID: Hello, Thank you for the answer, but I already tried other extensions. Even with ? .html ?, the result is the same. In fact, I can put anything in TEMPLATE, I always get the base results. JCB De : Kobben, Barend (UT-ITC) Envoy? : vendredi 17 juin 2022 11:02 ? : Jean-Christophe Bastin ; mapserver-users at lists.osgeo.org Objet : Re: [mapserver-users] Need help/sample on how to use templating please It might be as simple as naming the template template.html instead of template.tmpl.... -- Barend K?bben On 17/06/2022, 10:50, "MapServer-users on behalf of Jean-Christophe Bastin" on behalf of jcbastin at thelis.be> wrote: Hello community, I try to find how to format click results of my MapFile. I test my WMS on QGIS. By default, infotool result looks like this : GetFeatureInfo results: Layer 'my_layer' Feature 1234: field_1 = value_1 field_2 = value_2 field_3 = value_3 ? The field names are base version coming from the data source. I'm looking to change them in a more literal way, something like ? My super field 1 has the great value 1 ?. I found that the way to reach this is templating. I found the documentation : * https://mapserver.org/mapfile/template.html#template * https://mapserver.org/output/template_output.html?highlight=template And I looked for examples but I can't make it work, I was wondering what I'm doing wrong. Here is what I did : I created a file "my_template.tmpl" containing just two lines : MY TEST Then, in a working Mapfile, I added the TEMPLATE to my LAYER (the file "my_template.tmpl" is stored at the same level than my MapFile) : MAP ... LAYER ... TEMPLATE "my_template.tmpl" ... END END If I understand well, when I click to get informations, I should see now "MY TEST" ? But it continues to display the base informations like explained above. I also tried with OUTPUTFORMAT, but it doesn't work better : MAP OUTPUTFORMAT NAME "infotool_template" DRIVER "TEMPLATE" MIMETYPE "text/html" FORMATOPTION "FILE=my_template.tmpl" END ... LAYER ... TEMPLATE "infotool_template" ... END END I guess I do something wrong, but I can't find what. Missing parameter ? Simple/double cotes issue ? Bad names/references ? Or something about the client (QGIS in my case) asking informations ? Any help/advice will be very appreciated. Hope to have some feedback. Many thanks :-) JCB -------------- next part -------------- An HTML attachment was scrubbed... URL: From b.j.kobben at utwente.nl Fri Jun 17 02:51:21 2022 From: b.j.kobben at utwente.nl (Kobben, Barend (UT-ITC)) Date: Fri, 17 Jun 2022 09:51:21 +0000 Subject: [mapserver-users] Need help/sample on how to use templating please In-Reply-To: References: Message-ID: This is an exercise for our students, in a different environment, but contain the needed steps - you migth have missed on of them... https://gip.itc.utwente.nl/exercises/docs/OpenLayersWMS/adding_getfeatureinfo_capability -- Barend K?bben On 17/06/2022, 11:12, "Jean-Christophe Bastin" > wrote: Hello, Thank you for the answer, but I already tried other extensions. Even with ? .html ?, the result is the same. In fact, I can put anything in TEMPLATE, I always get the base results. JCB De : Kobben, Barend (UT-ITC) Envoy? : vendredi 17 juin 2022 11:02 ? : Jean-Christophe Bastin ; mapserver-users at lists.osgeo.org Objet : Re: [mapserver-users] Need help/sample on how to use templating please It might be as simple as naming the template template.html instead of template.tmpl.... -- Barend K?bben On 17/06/2022, 10:50, "MapServer-users on behalf of Jean-Christophe Bastin" on behalf of jcbastin at thelis.be> wrote: Hello community, I try to find how to format click results of my MapFile. I test my WMS on QGIS. By default, infotool result looks like this : GetFeatureInfo results: Layer 'my_layer' Feature 1234: field_1 = value_1 field_2 = value_2 field_3 = value_3 ? The field names are base version coming from the data source. I'm looking to change them in a more literal way, something like ? My super field 1 has the great value 1 ?. I found that the way to reach this is templating. I found the documentation : * https://mapserver.org/mapfile/template.html#template * https://mapserver.org/output/template_output.html?highlight=template And I looked for examples but I can't make it work, I was wondering what I'm doing wrong. Here is what I did : I created a file "my_template.tmpl" containing just two lines : MY TEST Then, in a working Mapfile, I added the TEMPLATE to my LAYER (the file "my_template.tmpl" is stored at the same level than my MapFile) : MAP ... LAYER ... TEMPLATE "my_template.tmpl" ... END END If I understand well, when I click to get informations, I should see now "MY TEST" ? But it continues to display the base informations like explained above. I also tried with OUTPUTFORMAT, but it doesn't work better : MAP OUTPUTFORMAT NAME "infotool_template" DRIVER "TEMPLATE" MIMETYPE "text/html" FORMATOPTION "FILE=my_template.tmpl" END ... LAYER ... TEMPLATE "infotool_template" ... END END I guess I do something wrong, but I can't find what. Missing parameter ? Simple/double cotes issue ? Bad names/references ? Or something about the client (QGIS in my case) asking informations ? Any help/advice will be very appreciated. Hope to have some feedback. Many thanks :-) JCB -------------- next part -------------- An HTML attachment was scrubbed... URL: From jcbastin at thelis.be Fri Jun 17 06:23:04 2022 From: jcbastin at thelis.be (Jean-Christophe Bastin) Date: Fri, 17 Jun 2022 13:23:04 +0000 Subject: [mapserver-users] Need help/sample on how to use templating please In-Reply-To: References: Message-ID: Hello, Thank you very much. I was in the good way in the MapFile, but not in the way to test it. I was testing my template using info tool of QGIS, and it was always displaying the base GetFeatureInfo results. I noticed in your execise that you were using OpenLayers and getGetFeatureInfoUrl, so I did a test with an hardcoded url in my browser, and in this way it displays well the template. I don?t know if you use QGIS, but do you have any idea on how to get the template result with it ? Regards, JCB De : Kobben, Barend (UT-ITC) Envoy? : vendredi 17 juin 2022 11:51 ? : Jean-Christophe Bastin ; mapserver-users at lists.osgeo.org Objet : Re: [mapserver-users] Need help/sample on how to use templating please This is an exercise for our students, in a different environment, but contain the needed steps - you migth have missed on of them... https://gip.itc.utwente.nl/exercises/docs/OpenLayersWMS/adding_getfeatureinfo_capability -- Barend K?bben On 17/06/2022, 11:12, "Jean-Christophe Bastin" > wrote: Hello, Thank you for the answer, but I already tried other extensions. Even with ? .html ?, the result is the same. In fact, I can put anything in TEMPLATE, I always get the base results. JCB De : Kobben, Barend (UT-ITC) > Envoy? : vendredi 17 juin 2022 11:02 ? : Jean-Christophe Bastin >; mapserver-users at lists.osgeo.org Objet : Re: [mapserver-users] Need help/sample on how to use templating please It might be as simple as naming the template template.html instead of template.tmpl.... -- Barend K?bben On 17/06/2022, 10:50, "MapServer-users on behalf of Jean-Christophe Bastin" on behalf of jcbastin at thelis.be> wrote: Hello community, I try to find how to format click results of my MapFile. I test my WMS on QGIS. By default, infotool result looks like this : GetFeatureInfo results: Layer 'my_layer' Feature 1234: field_1 = value_1 field_2 = value_2 field_3 = value_3 ? The field names are base version coming from the data source. I'm looking to change them in a more literal way, something like ? My super field 1 has the great value 1 ?. I found that the way to reach this is templating. I found the documentation : * https://mapserver.org/mapfile/template.html#template * https://mapserver.org/output/template_output.html?highlight=template And I looked for examples but I can't make it work, I was wondering what I'm doing wrong. Here is what I did : I created a file "my_template.tmpl" containing just two lines : MY TEST Then, in a working Mapfile, I added the TEMPLATE to my LAYER (the file "my_template.tmpl" is stored at the same level than my MapFile) : MAP ... LAYER ... TEMPLATE "my_template.tmpl" ... END END If I understand well, when I click to get informations, I should see now "MY TEST" ? But it continues to display the base informations like explained above. I also tried with OUTPUTFORMAT, but it doesn't work better : MAP OUTPUTFORMAT NAME "infotool_template" DRIVER "TEMPLATE" MIMETYPE "text/html" FORMATOPTION "FILE=my_template.tmpl" END ... LAYER ... TEMPLATE "infotool_template" ... END END I guess I do something wrong, but I can't find what. Missing parameter ? Simple/double cotes issue ? Bad names/references ? Or something about the client (QGIS in my case) asking informations ? Any help/advice will be very appreciated. Hope to have some feedback. Many thanks :-) JCB -------------- next part -------------- An HTML attachment was scrubbed... URL: From mniemyjski at cloudferro.com Mon Jun 20 06:40:53 2022 From: mniemyjski at cloudferro.com (Marcin Niemyjski) Date: Mon, 20 Jun 2022 13:40:53 +0000 Subject: [mapserver-users] #TransparentBackground #WMS #Mapcache Message-ID: Hello, does anyone know why the transparent WMS is displayed this way (https://pasteboard.co/vM3SKvRZ5krL.png)? The WMS comes from mapcaching, I checked the tiles in another program and sure enough they are transparent. I am also uploading the mapcache.xml file, maybe there is a problem with it. I would like only borders of plots to be visible, and background to remain transparent - like on tiles. I have the same problem in qgis. However, when in the add wms layer menu instead of adding layer I add tileset everything looks great. The problem is that I must add this layer to mapbender. Mapbender can only see layers in WMS, not Tilesets This is how I add it to QGIS: https://pasteboard.co/IU3LV6yB57Kv.png and this is how i need it to look like (like i said when I add it as Tileset it works fine): https://pasteboard.co/ojWVBug6yDLC.png mapcache.xml: EPSG:2180 256 256 170000.0000000000000000 100000.0000000000000000 900000.0000000000000000 900000.0000000000000000 m 8466.6836 4233.3418 2116.6709 1058.33545 529.167725 264.5838625 132.29193125 66.145965625 26.45838625 13.229193125 6.6145965625 2.6458386250000006 1.3229193125000003 0.5291677250000001 0.26458386250000004 0.13229193125000002 0.0661459656250000 image/png DZROL TRUE ****** /var/www/mapbender/tempo DZROL disk PNG_BEST PUWG1992 PNG Thank you for your time and patience, Marcin -------------- next part -------------- An HTML attachment was scrubbed... URL: From bob.basques at ci.stpaul.mn.us Wed Jun 29 09:59:07 2022 From: bob.basques at ci.stpaul.mn.us (Basques, Bob (CI-StPaul)) Date: Wed, 29 Jun 2022 16:59:07 +0000 Subject: [mapserver-users] Need presenter(s) for next local Twin Cities OSGeo local chapter meeting Message-ID: All, Looking for presenter for upcoming virtual, Local OSGeo Chapter meeting. Just send me a Presenter Bio and Title for a presentation on anything Geo, and I?ll handle the rest. When July 13th, 4:30 pm CDT Thanks Bobb -------------- next part -------------- An HTML attachment was scrubbed... URL: