From bob.basques at ci.stpaul.mn.us Wed Jun 3 14:26:37 2020 From: bob.basques at ci.stpaul.mn.us (Basques, Bob (CI-StPaul)) Date: Wed, 3 Jun 2020 21:26:37 +0000 Subject: [mapserver-users] TCMUG Meeting tonight . . . Message-ID: All, Had a good (virtual) meeting in May. Good signup numbers as well, even some out of towners joining in. Michael Battaglia gave a nice presentation on the Great Lakes and Coastal Wetlands. A link to a recording of the presentation can be found on our Local Chapter page below. This month we have Jeff McKenna and Steve Lime who will do a "State of MapServer" presentation. We're going Virtual again for this month. See the connection information below. Here is the connection info: https://meet.jit.si/osgeo_tcmug When: June 10th, 4:30 PM OSGeo, Twin Cities (aka TCMUG), MN, USA Chapter page. bobb -------------- next part -------------- An HTML attachment was scrubbed... URL: From bob.basques at ci.stpaul.mn.us Thu Jun 4 08:53:05 2020 From: bob.basques at ci.stpaul.mn.us (Basques, Bob (CI-StPaul)) Date: Thu, 4 Jun 2020 15:53:05 +0000 Subject: [mapserver-users] OSGeo Twin Cities (aka TCMUG) local chapter Meeting Message-ID: <1BC565A9-2F6D-4E8D-9FE1-81F32C7BA1CF@ci.stpaul.mn.us> Sorry all, just fixing my gaff related to the subject line in the previous Email. ?????????????? All, Had a good (virtual) meeting in May. Good signup numbers as well, even some out of towners joining in. Michael Battaglia gave a nice presentation on the Great Lakes and Coastal Wetlands. A link to a recording of the presentation can be found on our Local Chapter page below. This month we have Jeff McKenna and Steve Lime who will do a ?State of MapServer? presentation. We?re going Virtual again for this month. See the connection information below. Here is the connection info: https://meet.jit.si/osgeo_tcmug When: June 10th, 4:30 PM OSGeo, Twin Cities (aka TCMUG), MN, USA Chapter page. bobb -------------- next part -------------- An HTML attachment was scrubbed... URL: From andreas at qgis.org Fri Jun 5 03:12:02 2020 From: andreas at qgis.org (Andreas Neumann) Date: Fri, 5 Jun 2020 12:12:02 +0200 Subject: [mapserver-users] QGIS / Mapserver WFS filter (bbox/envelope) interoperability issue Message-ID: Hi, My current employer runs QGIS on Windows and we would like to access a WFS server provided by an UMN mapserver provided by another authority in Switzerland (they run UMN Mapserver 7.0x for now). We'd like to use an envelope or box to get filtered features from that WFS. QGIS has a method called ST_MakeEnvelop() for creating a box geometry. When the request is sent to the UMN mapserver, the filter result looks like this: kanton SO wkb_geometry 2612000 1245500 2613500 1246500 The reply from UMN 7.0.x is that this filter is unsupported. UMN would, however, support something like: msGeometry 2612000,1245500 2613500,1246500 So there seems to be an interoperability issue here between QGIS and UMN: QGIS has no method to send the "Box" syntax that UMN would accept and UMN doesn't seem to accept the "Envelope"-style syntax that QGIS would generate when the user is using the ST_MakeEnvelope() function: [image: image.png] So my question: is a newer version of UMN (7.2, 7.4, 7.6) perhaps the "Envelope" style syntax in the WFS filter that QGIS Desktop is sending or should we better try to add a new "bbox" method to the WFS Client of QGIS Desktop? I quickly browsed through the UMN Mapserver changelogs but didn't see any obvious improvement around "Envelope" support in filters. Thanks for your thoughts, Andreas -- Andreas Neumann QGIS.ORG board member (treasurer) -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image.png Type: image/png Size: 12307 bytes Desc: not available URL: From even.rouault at spatialys.com Fri Jun 5 06:09:22 2020 From: even.rouault at spatialys.com (Even Rouault) Date: Fri, 05 Jun 2020 15:09:22 +0200 Subject: [mapserver-users] QGIS / Mapserver WFS filter (bbox/envelope) interoperability issue In-Reply-To: References: Message-ID: <3765905.vqSTXnH1EH@even-i700> > So my question: is a newer version of UMN (7.2, 7.4, 7.6) perhaps the > "Envelope" style syntax in the WFS filter that QGIS Desktop is sending or > should we better try to add a new "bbox" method to the WFS Client of QGIS > Desktop? I quickly browsed through the UMN Mapserver changelogs but didn't > see any obvious improvement around "Envelope" support in filters. Hi Andreas, this is quite unfortunate MapServer doesn't support gml:Envelope as a geometry in the "Intersects" request, whereas we support it inside a filter. The optimistic in me says that shouldn't be too hard to fix. The supported geometries inside "intersects" are at: https://github.com/mapserver/mapserver/blob/master/mapogcfilter.cpp#L1015 It doesn't look however that gml:Box would be legal in GML 3.2 (so with WFS 1.1 or 2.0) as it is a legacy from GML 2 or perhaps even older. MapServer doesn't care much about GML versions and compliance to schema on input side, but other servers might reject a fes:Intersects with a gml:Box Even -- Spatialys - Geospatial professional services http://www.spatialys.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From even.rouault at spatialys.com Fri Jun 5 07:38:52 2020 From: even.rouault at spatialys.com (Even Rouault) Date: Fri, 05 Jun 2020 16:38:52 +0200 Subject: [mapserver-users] QGIS / Mapserver WFS filter (bbox/envelope) interoperability issue In-Reply-To: <3765905.vqSTXnH1EH@even-i700> References: <3765905.vqSTXnH1EH@even-i700> Message-ID: <1766131.tXsUhXSGlx@even-i700> On vendredi 5 juin 2020 15:09:22 CEST Even Rouault wrote: > > So my question: is a newer version of UMN (7.2, 7.4, 7.6) perhaps the > > "Envelope" style syntax in the WFS filter that QGIS Desktop is sending or > > should we better try to add a new "bbox" method to the WFS Client of QGIS > > Desktop? I quickly browsed through the UMN Mapserver changelogs but didn't > > see any obvious improvement around "Envelope" support in filters. > > Hi Andreas, > > this is quite unfortunate MapServer doesn't support gml:Envelope as a > geometry in the "Intersects" request, whereas we support it inside a > filter. The optimistic in me says that shouldn't be too hard to fix. Was indeed simple to fix: https://github.com/mapserver/mapserver/pull/6091 On QGIS client side, you may try with WFS 1.0. I don't think QGIS will emit a gml:Envelope then -- Spatialys - Geospatial professional services http://www.spatialys.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From andreas at qgis.org Fri Jun 5 07:59:50 2020 From: andreas at qgis.org (Andreas Neumann) Date: Fri, 5 Jun 2020 16:59:50 +0200 Subject: [mapserver-users] QGIS / Mapserver WFS filter (bbox/envelope) interoperability issue In-Reply-To: <1766131.tXsUhXSGlx@even-i700> References: <3765905.vqSTXnH1EH@even-i700> <1766131.tXsUhXSGlx@even-i700> Message-ID: Hi Even, Wow - thanks a lot! Also, your other assumption was right - when switching the WFS version to 1.0 in QGIS, the ST_MakeEnvelope() from QGIS Desktop as a WFS client seems to be translated to instead of envelope: Here is the filter request from QGIS, when choosing WFS 1.0: wkb_geometry 2437300,1064250 2872700,1305750 kanton SO wkb_geometry 2612000,1245500 2613500,1246500 Thanks a lot to both Even and James for your help! Andreas On Fri, 5 Jun 2020 at 16:38, Even Rouault wrote: > On vendredi 5 juin 2020 15:09:22 CEST Even Rouault wrote: > > > > So my question: is a newer version of UMN (7.2, 7.4, 7.6) perhaps the > > > > "Envelope" style syntax in the WFS filter that QGIS Desktop is sending > or > > > > should we better try to add a new "bbox" method to the WFS Client of > QGIS > > > > Desktop? I quickly browsed through the UMN Mapserver changelogs but > didn't > > > > see any obvious improvement around "Envelope" support in filters. > > > > > > Hi Andreas, > > > > > > this is quite unfortunate MapServer doesn't support gml:Envelope as a > > > geometry in the "Intersects" request, whereas we support it inside a > > > > filter. The optimistic in me says that shouldn't be too hard to fix. > > > > Was indeed simple to fix: > > https://github.com/mapserver/mapserver/pull/6091 > > > > On QGIS client side, you may try with WFS 1.0. I don't think QGIS will > emit a gml:Envelope then > > > > > > -- > > Spatialys - Geospatial professional services > > http://www.spatialys.com > -- -- Andreas Neumann QGIS.ORG board member (treasurer) -------------- next part -------------- An HTML attachment was scrubbed... URL: From jmckenna at gatewaygeomatics.com Fri Jun 5 09:08:52 2020 From: jmckenna at gatewaygeomatics.com (Jeff McKenna) Date: Fri, 5 Jun 2020 13:08:52 -0300 Subject: [mapserver-users] deployed mapping engine comparison stats Message-ID: Something I noticed this morning: MapServer users might be interested in recently published statistics of deployed mapping engine types (ArcGIS, GeoServer, MapServer/MapCache, QGIS Server, etc.) : https://www.geoseer.net/blog/?p=2020-06-04_geospatial_server_software -jeff -- Jeff McKenna MapServer Consulting and Training Services co-founder of FOSS4G http://gatewaygeo.com/ From sdlime at gmail.com Fri Jun 5 11:41:09 2020 From: sdlime at gmail.com (Steve Lime) Date: Fri, 5 Jun 2020 13:41:09 -0500 Subject: [mapserver-users] deployed mapping engine comparison stats In-Reply-To: References: Message-ID: We're number 3! On Fri, Jun 5, 2020 at 11:09 AM Jeff McKenna wrote: > Something I noticed this morning: MapServer users might be interested in > recently published statistics of deployed mapping engine types (ArcGIS, > GeoServer, MapServer/MapCache, QGIS Server, etc.) : > https://www.geoseer.net/blog/?p=2020-06-04_geospatial_server_software > > > -jeff > > > > > -- > Jeff McKenna > MapServer Consulting and Training Services > co-founder of FOSS4G > http://gatewaygeo.com/ > > > > > > > > > > _______________________________________________ > 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 karl.suiter at gmail.com Fri Jun 5 11:54:59 2020 From: karl.suiter at gmail.com (Karl Suiter) Date: Fri, 5 Jun 2020 14:54:59 -0400 Subject: [mapserver-users] WMS server error. Invalid layer(s) given in the LAYERS parameter. A layer might be disabled for this request Message-ID: Hi All, I have a Mapserver 7.6.0 wms server set up and it's generating images correctly in most circumstances. However, I have a wms mapfile consisting of 252 layer classes defining all of the country polygons in a Natural Earth world shapefile. In some instances, I need to send up to 90 FIPS codes to my mapfile in order to highlight the requested polygons on a map. However, given the large number of lFIPS code and layer classes being parsed by the mapfile, these mapfile requests are timing out or taking a long time to return an image. In order to increase response time, I sub-divided the main mapfile into five sub-set mapfiles containing approximately 50 layer classes, corresponding to a matching number of FIPS codes each. However, when I send all 90 FIPS codes for processing to any of the subset mapfiles, I get the following error "msWMSLoadGetMapParams():WMS server error. Invalid layer(s) given in the LAYERS parameter. A layer might be disabled for this request. Check wms/ows_enable_request settings." I believe that this is due to my requesting layer classes not found in the sub-set mapfile. I've reviewed the Map Server 7.6.0 documentation and can't find a parameter or switch to toggle this type of checking off. Is there any way to turn off layer class checking in order to resolve this issue? Lastly, when I test the same MapServer URL string using my sub-set mapfile (sending all 90 FIPS codes using the LAYER parameter) using a web browser command line, it returns an image consisting of all f the expected polygons (and no WMS error). Thank you for any assistance you can provide to reconcile this issue. Cheers, Karl -------------- next part -------------- An HTML attachment was scrubbed... URL: From szekerest at gmail.com Fri Jun 5 12:28:08 2020 From: szekerest at gmail.com (Tamas Szekeres) Date: Fri, 5 Jun 2020 21:28:08 +0200 Subject: [mapserver-users] deployed mapping engine comparison stats In-Reply-To: References: Message-ID: Very interesting comparison. I wonder how this statistics would look like if MapServer had a built-in web administration interface like the other competing applications. Best regards, Tamas Jeff McKenna ezt ?rta (id?pont: 2020. j?n. 5., P, 18:09): > Something I noticed this morning: MapServer users might be interested in > recently published statistics of deployed mapping engine types (ArcGIS, > GeoServer, MapServer/MapCache, QGIS Server, etc.) : > https://www.geoseer.net/blog/?p=2020-06-04_geospatial_server_software > > > -jeff > > > > > -- > Jeff McKenna > MapServer Consulting and Training Services > co-founder of FOSS4G > http://gatewaygeo.com/ > > > > > > > > > > _______________________________________________ > 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 jonathan-lists at lightpear.com Sat Jun 6 09:38:55 2020 From: jonathan-lists at lightpear.com (Jonathan Moules) Date: Sat, 6 Jun 2020 17:38:55 +0100 Subject: [mapserver-users] deployed mapping engine comparison stats In-Reply-To: References: Message-ID: <0af1ea52-4a84-c74b-e160-6eae858fa325@lightpear.com> Hi Folks, (Disclosure: I'm the person behind that blog post.) > I wonder how?this statistics would look like if MapServer had a built-in web administration interface like the other competing applications. The fact MS is so high without it shows it may not be that important, at least not to the core audience. I think the biggest differentiator in the stats between the top three may be the fact that MapServers don't have any sort of catalog of services or other way to find other services on the box. By which I mean, ArcGIS Server allows you to crawl it and get all of the public services and datasets. GeoServer if there are namespaces (their way of grouping things into services) you can go up a level and see what the root is serving, thus potentially finding more datasets and another service that way (but only one). But MapServer doesn't have a mechanism like that apparently (I asked on this list a couple years ago), which means that it's hard to know if I've found everything on a specific box. That's the biggest catch with the MapServer stat at least. Cheers, Jonathan On 2020-06-05 20:28, Tamas Szekeres wrote: > Very interesting comparison. > I wonder how?this statistics would look like if MapServer had a > built-in web administration interface like the other competing > applications. > > Best regards, > > Tamas > > > Jeff McKenna > ezt ?rta (id?pont: 2020. j?n. > 5., P, 18:09): > > Something I noticed this morning: MapServer users might be > interested in > recently published statistics of deployed mapping engine types > (ArcGIS, > GeoServer, MapServer/MapCache, QGIS Server, etc.) : > https://www.geoseer.net/blog/?p=2020-06-04_geospatial_server_software > > > -jeff > > > > > -- > Jeff McKenna > MapServer Consulting and Training Services > co-founder of FOSS4G > http://gatewaygeo.com/ > > > > > > > > > > _______________________________________________ > mapserver-users mailing list > mapserver-users at lists.osgeo.org > > https://lists.osgeo.org/mailman/listinfo/mapserver-users > > > _______________________________________________ > mapserver-users mailing list > mapserver-users at lists.osgeo.org > https://lists.osgeo.org/mailman/listinfo/mapserver-users -------------- next part -------------- An HTML attachment was scrubbed... URL: From bob.basques at ci.stpaul.mn.us Mon Jun 8 06:43:53 2020 From: bob.basques at ci.stpaul.mn.us (Basques, Bob (CI-StPaul)) Date: Mon, 8 Jun 2020 13:43:53 +0000 Subject: [mapserver-users] [REMINDER]: OSGeo Twin Cities (aka TCMUG) local chapter Meeting Message-ID: All, Had a good (virtual) meeting in May. Good signup numbers as well, even some out of towners joining in. Michael Battaglia gave a nice presentation on the Great Lakes and Coastal Wetlands. A link to a recording of the presentation can be found on our Local Chapter page below. This month we have Jeff McKenna and Steve Lime who will do a ?State of MapServer? presentation. We?re going Virtual again for this month. Here is the connection info: https://meet.jit.si/osgeo_tcmug When: June 10th, 4:30 PM CDT OSGeo, Twin Cities (aka TCMUG), MN, USA Chapter page. bobb -------------- next part -------------- An HTML attachment was scrubbed... URL: From John.Huotari at RCIS.com Mon Jun 8 22:46:13 2020 From: John.Huotari at RCIS.com (John Huotari) Date: Tue, 9 Jun 2020 05:46:13 +0000 Subject: [mapserver-users] SSL curl error when hitting HTTP WMS Message-ID: I'm attempting to hit a WMS using HTTP, not HTTPS, but I run into the following SSL error HTTP: request failed with curl error code 60 (SSL certificate problem: unable to get local issuer certificate) I can get around this error by downloading a CA bundle file and setting the CURL_CA_BUNDLE environment variable to point to it, but why is a CA bundle file necessary when not even using SSL (hitting a WMS using HTTP, not HTTPS)? Does anyone know a workaround that wouldn't require deploying a CA bundle file to my servers and setting an environment variable to point to it? I'm currently using the stable release of MSVC 2017 x64 package downloaded from GISInternals - http://www.gisinternals.com/release.php A sample mapfile looks like this MAP NAME USA1 STATUS ON IMAGETYPE PNG8 RESOLUTION 72 IMAGECOLOR 255 255 255 UNITS METERS PROJECTION "proj=lcc" "lat_1=20" "lat_2=60" "lat_0=40" "lon_0=-112.52116185" "x_0=0" "y_0=0" "ellps=GRS80" "units=m" "datum=NAD83" END SIZE 1500 1500 EXTENT -45292.7219576058 780481.616003812 45290.5126012127 871065.05991903 LAYER NAME "WMS_DRG" TYPE RASTER STATUS ON PROJECTION "proj=longlat" "ellps=GRS80" "datum=NAD83" "no_defs" END CONNECTION "http://basemap.nationalmap.gov/arcgis/services/USGSTopo/MapServer/WmsServer?" CONNECTIONTYPE WMS METADATA "wms_srs" "EPSG:4326" "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. -------------- next part -------------- An HTML attachment was scrubbed... URL: From jmckenna at gatewaygeomatics.com Tue Jun 9 03:10:22 2020 From: jmckenna at gatewaygeomatics.com (Jeff McKenna) Date: Tue, 9 Jun 2020 07:10:22 -0300 Subject: [mapserver-users] SSL curl error when hitting HTTP WMS In-Reply-To: References: Message-ID: The WMS service that you mention redirects all requests to HTTPS: https://basemap.nationalmap.gov/arcgis/services/USGSTopo/MapServer/WmsServer? -jeff -- Jeff McKenna MapServer Consulting and Training Services co-founder of FOSS4G http://gatewaygeo.com/ On 2020-06-09 2:46 a.m., John Huotari wrote: > I?m attempting to hit a WMS using HTTP, not HTTPS, but I run into the > following SSL error > > HTTP: request failed with curl error code 60 (SSL certificate problem: > unable to get local issuer certificate) > > I can get around this error by downloading a CA bundle file and setting > the CURL_CA_BUNDLE environment variable to point to it, but why is a CA > bundle file necessary when not even using SSL (hitting a WMS using HTTP, > not HTTPS)?? Does anyone know a workaround that wouldn?t require > deploying a CA bundle file to my servers and setting an environment > variable to point to it? > > I?m currently using the stable release of MSVC 2017 x64 package > downloaded from GISInternals - http://www.gisinternals.com/release.php > > A sample mapfile looks like this > > MAP > > ? NAME USA1 > > ? STATUS ON > > ? IMAGETYPE PNG8 > > ? RESOLUTION 72 > > ? IMAGECOLOR 255 255 255 > > ? UNITS METERS > > ? PROJECTION "proj=lcc" "lat_1=20" "lat_2=60" "lat_0=40" > "lon_0=-112.52116185" "x_0=0" "y_0=0" "ellps=GRS80" "units=m" > "datum=NAD83" END > > ? SIZE 1500 1500 > > ? EXTENT -45292.7219576058 780481.616003812 45290.5126012127 > 871065.05991903 > > ? LAYER > > ???NAME "WMS_DRG" > > ??? TYPE RASTER > > ??? STATUS ON > > ??? PROJECTION "proj=longlat" "ellps=GRS80" "datum=NAD83" "no_defs" END > > ??? CONNECTION > "http://basemap.nationalmap.gov/arcgis/services/USGSTopo/MapServer/WmsServer?" > > ??? CONNECTIONTYPE WMS > > ??? METADATA > > ????? "wms_srs"? "EPSG:4326" > > ????? "wms_name"? "0" > > ????? "wms_server_version"? "1.1.1" > > ????? "wms_format"? "image/png" > > ??? END > > ? END > > END > From jukka.rahkonen at maanmittauslaitos.fi Tue Jun 9 03:55:47 2020 From: jukka.rahkonen at maanmittauslaitos.fi (Rahkonen Jukka (MML)) Date: Tue, 9 Jun 2020 10:55:47 +0000 Subject: [mapserver-users] SSL curl error when hitting HTTP WMS Message-ID: <1736301d12274765b6a3d2190d2e2f22@C119S212VM042.msvyvi.vaha.local> Hi, The service indeed seems to redirect into https address. GDAL has an "unsafeSSL" option but I believe that Mapserver does not http://osgeo-org.1560.x6.nabble.com/https-url-with-MapServer-as-WMS-client-td5332403.html. Perhaps you could bypass the certificate check by setting a general curl insecure option as in https://www.cyberciti.biz/faq/how-to-curl-ignore-ssl-certificate-warnings-command-option/. However, it feels rather risky to do it at that level. -Jukka Rahkonen- -----Alkuper?inen viesti----- L?hett?j?: mapserver-users Puolesta Jeff McKenna L?hetetty: tiistai 9. kes?kuuta 2020 13.10 Vastaanottaja: mapserver-users at lists.osgeo.org Aihe: Re: [mapserver-users] SSL curl error when hitting HTTP WMS The WMS service that you mention redirects all requests to HTTPS: https://basemap.nationalmap.gov/arcgis/services/USGSTopo/MapServer/WmsServer? -jeff -- Jeff McKenna MapServer Consulting and Training Services co-founder of FOSS4G http://gatewaygeo.com/ On 2020-06-09 2:46 a.m., John Huotari wrote: > I?m attempting to hit a WMS using HTTP, not HTTPS, but I run into the > following SSL error > > HTTP: request failed with curl error code 60 (SSL certificate problem: > unable to get local issuer certificate) > > I can get around this error by downloading a CA bundle file and setting > the CURL_CA_BUNDLE environment variable to point to it, but why is a CA > bundle file necessary when not even using SSL (hitting a WMS using HTTP, > not HTTPS)?? Does anyone know a workaround that wouldn?t require > deploying a CA bundle file to my servers and setting an environment > variable to point to it? > > I?m currently using the stable release of MSVC 2017 x64 package > downloaded from GISInternals - http://www.gisinternals.com/release.php > > A sample mapfile looks like this > > MAP > > ? NAME USA1 > > ? STATUS ON > > ? IMAGETYPE PNG8 > > ? RESOLUTION 72 > > ? IMAGECOLOR 255 255 255 > > ? UNITS METERS > > ? PROJECTION "proj=lcc" "lat_1=20" "lat_2=60" "lat_0=40" > "lon_0=-112.52116185" "x_0=0" "y_0=0" "ellps=GRS80" "units=m" > "datum=NAD83" END > > ? SIZE 1500 1500 > > ? EXTENT -45292.7219576058 780481.616003812 45290.5126012127 > 871065.05991903 > > ? LAYER > > ???NAME "WMS_DRG" > > ??? TYPE RASTER > > ??? STATUS ON > > ??? PROJECTION "proj=longlat" "ellps=GRS80" "datum=NAD83" "no_defs" END > > ??? CONNECTION > "http://basemap.nationalmap.gov/arcgis/services/USGSTopo/MapServer/WmsServer?" > > ??? CONNECTIONTYPE WMS > > ??? METADATA > > ????? "wms_srs"? "EPSG:4326" > > ????? "wms_name"? "0" > > ????? "wms_server_version"? "1.1.1" > > ????? "wms_format"? "image/png" > > ??? END > > ? END > > END > _______________________________________________ mapserver-users mailing list mapserver-users at lists.osgeo.org https://lists.osgeo.org/mailman/listinfo/mapserver-users From stephenwoodbridge37 at gmail.com Tue Jun 9 07:54:56 2020 From: stephenwoodbridge37 at gmail.com (Stephen Woodbridge) Date: Tue, 9 Jun 2020 10:54:56 -0400 Subject: [mapserver-users] SSL curl error when hitting HTTP WMS In-Reply-To: <1736301d12274765b6a3d2190d2e2f22@C119S212VM042.msvyvi.vaha.local> References: <1736301d12274765b6a3d2190d2e2f22@C119S212VM042.msvyvi.vaha.local> Message-ID: Should a bug/enhancement request be opened against this? Maybe there should be an option like: PROCESSING "UNSAFESSL=YES" So mapserver can handle this directly from the mapfile? -Steve W On 6/9/2020 6:55 AM, Rahkonen Jukka (MML) wrote: > Hi, > > The service indeed seems to redirect into https address. > > GDAL has an "unsafeSSL" option but I believe that Mapserver does not http://osgeo-org.1560.x6.nabble.com/https-url-with-MapServer-as-WMS-client-td5332403.html. > > Perhaps you could bypass the certificate check by setting a general curl insecure option as in https://www.cyberciti.biz/faq/how-to-curl-ignore-ssl-certificate-warnings-command-option/. However, it feels rather risky to do it at that level. > > -Jukka Rahkonen- > > -----Alkuper?inen viesti----- > L?hett?j?: mapserver-users Puolesta Jeff McKenna > L?hetetty: tiistai 9. kes?kuuta 2020 13.10 > Vastaanottaja: mapserver-users at lists.osgeo.org > Aihe: Re: [mapserver-users] SSL curl error when hitting HTTP WMS > > The WMS service that you mention redirects all requests to HTTPS: > https://basemap.nationalmap.gov/arcgis/services/USGSTopo/MapServer/WmsServer? > > -jeff > > > > -- > Jeff McKenna > MapServer Consulting and Training Services co-founder of FOSS4G http://gatewaygeo.com/ > > > > On 2020-06-09 2:46 a.m., John Huotari wrote: >> I?m attempting to hit a WMS using HTTP, not HTTPS, but I run into the >> following SSL error >> >> HTTP: request failed with curl error code 60 (SSL certificate problem: >> unable to get local issuer certificate) >> >> I can get around this error by downloading a CA bundle file and setting >> the CURL_CA_BUNDLE environment variable to point to it, but why is a CA >> bundle file necessary when not even using SSL (hitting a WMS using HTTP, >> not HTTPS)?? Does anyone know a workaround that wouldn?t require >> deploying a CA bundle file to my servers and setting an environment >> variable to point to it? >> >> I?m currently using the stable release of MSVC 2017 x64 package >> downloaded from GISInternals - http://www.gisinternals.com/release.php >> >> A sample mapfile looks like this >> >> MAP >> >> ? NAME USA1 >> >> ? STATUS ON >> >> ? IMAGETYPE PNG8 >> >> ? RESOLUTION 72 >> >> ? IMAGECOLOR 255 255 255 >> >> ? UNITS METERS >> >> ? PROJECTION "proj=lcc" "lat_1=20" "lat_2=60" "lat_0=40" >> "lon_0=-112.52116185" "x_0=0" "y_0=0" "ellps=GRS80" "units=m" >> "datum=NAD83" END >> >> ? SIZE 1500 1500 >> >> ? EXTENT -45292.7219576058 780481.616003812 45290.5126012127 >> 871065.05991903 >> >> ? LAYER >> >> ???NAME "WMS_DRG" >> >> ??? TYPE RASTER >> >> ??? STATUS ON >> >> ??? PROJECTION "proj=longlat" "ellps=GRS80" "datum=NAD83" "no_defs" END >> >> ??? CONNECTION >> "http://basemap.nationalmap.gov/arcgis/services/USGSTopo/MapServer/WmsServer?" >> >> ??? CONNECTIONTYPE WMS >> >> ??? METADATA >> >> ????? "wms_srs"? "EPSG:4326" >> >> ????? "wms_name"? "0" >> >> ????? "wms_server_version"? "1.1.1" >> >> ????? "wms_format"? "image/png" >> >> ??? END >> >> ? END >> >> END >> > > > _______________________________________________ > mapserver-users mailing list > mapserver-users at lists.osgeo.org > https://lists.osgeo.org/mailman/listinfo/mapserver-users > _______________________________________________ > mapserver-users mailing list > mapserver-users at lists.osgeo.org > https://lists.osgeo.org/mailman/listinfo/mapserver-users From jmckenna at gatewaygeomatics.com Tue Jun 9 08:26:03 2020 From: jmckenna at gatewaygeomatics.com (Jeff McKenna) Date: Tue, 9 Jun 2020 12:26:03 -0300 Subject: [mapserver-users] SSL curl error when hitting HTTP WMS In-Reply-To: References: Message-ID: <9c3f62c4-2f2e-5f7f-7f4c-901fb1829945@gatewaygeomatics.com> update: I've given some much needed love to the HTTPS document and referenced it throughout the docs now: https://mapserver.org/ogc/wxs_secure.html -jeff On 2020-06-09 7:10 a.m., Jeff McKenna wrote: > The WMS service that you mention redirects all requests to HTTPS: > https://basemap.nationalmap.gov/arcgis/services/USGSTopo/MapServer/WmsServer? > > > -jeff > > > -- Jeff McKenna MapServer Consulting and Training Services co-founder of FOSS4G http://gatewaygeo.com/ From John.Huotari at RCIS.com Tue Jun 9 08:56:54 2020 From: John.Huotari at RCIS.com (John Huotari) Date: Tue, 9 Jun 2020 15:56:54 +0000 Subject: [mapserver-users] SSL curl error when hitting HTTP WMS Message-ID: Thanks for the explanation about the redirect; that makes perfect sense now. It would be great if there were an "unsafeSSL" option like Jukka mentioned GDAL has; figured I should at least ask whether something like that existed. At least I now have confidence that I'm not missing some more convenient solution and that configuring the CA bundle correctly is the best course of action at the moment. That's some great info you put together in the HTTPS document Jeff! ******************* 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 tom.kralidis at canada.ca Tue Jun 9 09:07:31 2020 From: tom.kralidis at canada.ca (Kralidis, Tom (EC)) Date: Tue, 9 Jun 2020 16:07:31 +0000 Subject: [mapserver-users] SSL curl error when hitting HTTP WMS In-Reply-To: <9c3f62c4-2f2e-5f7f-7f4c-901fb1829945@gatewaygeomatics.com> References: <9c3f62c4-2f2e-5f7f-7f4c-901fb1829945@gatewaygeomatics.com> Message-ID: Awesome Jeff: thanks much for this very useful and timely documentation. ..Tom > -----Original Message----- > From: mapserver-users On > Behalf Of Jeff McKenna > Sent: June 9, 2020 11:26 > To: mapserver-users at lists.osgeo.org > Subject: Re: [mapserver-users] SSL curl error when hitting HTTP WMS > > update: I've given some much needed love to the HTTPS document and > referenced it throughout the docs now: > https://mapserver.org/ogc/wxs_secure.html > > -jeff > > > > On 2020-06-09 7:10 a.m., Jeff McKenna wrote: > > The WMS service that you mention redirects all requests to HTTPS: > > > https://basemap.nationalmap.gov/arcgis/services/USGSTopo/MapServer/W > msServer? > > > > > > -jeff > > > > > > > > > -- > Jeff McKenna > MapServer Consulting and Training Services > co-founder of FOSS4G > http://gatewaygeo.com/ > _______________________________________________ > mapserver-users mailing list > mapserver-users at lists.osgeo.org > https://lists.osgeo.org/mailman/listinfo/mapserver-users From bob.basques at ci.stpaul.mn.us Mon Jun 15 14:49:41 2020 From: bob.basques at ci.stpaul.mn.us (Basques, Bob (CI-StPaul)) Date: Mon, 15 Jun 2020 21:49:41 +0000 Subject: [mapserver-users] OSGeo Twin Cities (aka TCMUG) local chapter Meeting Message-ID: All, Had another good (virtual) meeting in June. More out of towners joining in. Jeff Mckenna & Steve Lime gave a presentation on the ?State of MapServer?. A link to a recording of the presentation can be found on our Local Chapter page below. Our Next meeting we?ll have Howard Butler do a presentation on the GDAL and PROJ Barnraising. ?What was the GDAL Barnraising??. This will be a virtual meeting. Here is the connection info: https://meet.jit.si/osgeo_tcmug When: July 8th, 4:30 PM CDT OSGeo, Twin Cities (aka TCMUG), MN, USA Local Chapter Page. bobb -------------- next part -------------- An HTML attachment was scrubbed... URL: From public at postholer.com Tue Jun 16 13:27:46 2020 From: public at postholer.com (Scott) Date: Tue, 16 Jun 2020 13:27:46 -0700 Subject: [mapserver-users] MAXSCALEDENOM using runtime var Message-ID: <99e5c045-1a56-3652-de4f-ef329096949a@postholer.com> Is it possible to set MAX(MIN)SCALEDENOM using a runtime variable? Example: ... MAXSCALEDENOM %maxscaledenom% ... -- www.postholer.com From sdlime at gmail.com Tue Jun 16 13:56:06 2020 From: sdlime at gmail.com (Steve Lime) Date: Tue, 16 Jun 2020 15:56:06 -0500 Subject: [mapserver-users] MAXSCALEDENOM using runtime var In-Reply-To: <99e5c045-1a56-3652-de4f-ef329096949a@postholer.com> References: <99e5c045-1a56-3652-de4f-ef329096949a@postholer.com> Message-ID: Hi Scott: Nope, the various scale denominator properties are not mutable via URL parameters. It's a relatively simple change to make it happen (just modify maplexer.l (look for the keyword of choice) and rebuild) but I'm not sure it's a great idea since you could be opening up some performance headaches for both your mapping box and backend data sources. I mean, a user could essentially affect at what level high density data could be drawn at, so imagine asking for high density roads at a global scale from a remote PostgreSQL/PostGIS source. --Steve On Tue, Jun 16, 2020 at 3:36 PM Scott wrote: > Is it possible to set MAX(MIN)SCALEDENOM using a runtime variable? > > Example: > > ... > MAXSCALEDENOM %maxscaledenom% > ... > > > > -- > www.postholer.com > _______________________________________________ > 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 public at postholer.com Tue Jun 16 14:50:54 2020 From: public at postholer.com (Scott) Date: Tue, 16 Jun 2020 14:50:54 -0700 Subject: [mapserver-users] MAXSCALEDENOM using runtime var In-Reply-To: References: <99e5c045-1a56-3652-de4f-ef329096949a@postholer.com> Message-ID: <69ddfd1d-144a-f5a8-fd36-d85de3df5884@postholer.com> Thanks for the response. My mapserv binary is in a wrapper so I have control over dubious features I may (intentionally) introduce. With that said, if it's not readily available and only available via modification, someone more knowledgeable had good reason. I'll think of a different approach. Thanks again! On 6/16/20 1:56 PM, Steve Lime wrote: > Hi Scott: Nope, the various scale denominator properties are not mutable > via URL parameters. It's a relatively simple change to make it happen > (just modify maplexer.l (look for the keyword of choice) and rebuild) > but I'm not sure it's a great idea since you could be opening up some > performance headaches for both your mapping box and backend data > sources. I mean, a user could essentially affect at what level high > density data could be drawn at, so imagine asking for high density roads > at a global scale from a remote PostgreSQL/PostGIS source. > > --Steve > > On Tue, Jun 16, 2020 at 3:36 PM Scott > wrote: > > Is it possible to set MAX(MIN)SCALEDENOM using a runtime variable? > > Example: > > ... > MAXSCALEDENOM %maxscaledenom% > ... > > > > -- > www.postholer.com > _______________________________________________ > mapserver-users mailing list > mapserver-users at lists.osgeo.org > https://lists.osgeo.org/mailman/listinfo/mapserver-users > From sdlime at gmail.com Tue Jun 16 20:53:46 2020 From: sdlime at gmail.com (Steve Lime) Date: Tue, 16 Jun 2020 22:53:46 -0500 Subject: [mapserver-users] deployed mapping engine comparison stats In-Reply-To: <0af1ea52-4a84-c74b-e160-6eae858fa325@lightpear.com> References: <0af1ea52-4a84-c74b-e160-6eae858fa325@lightpear.com> Message-ID: That's probably a result of what drove MapServer development early on. MapServer itself is just a binary (CGI/FCGI) that can do stuff as simple as making simple inset maps or scalebars to distributing maps and data using OGC services with plenty of variations in between. Each call is discrete and there are no long running processes. A single deployment could serve dozens of wide-ranging purposes and in that situation a catalog makes no sense. Those "purposes" often only make sense with the context of the application that uses them. Closest thing to a catalog would be GetCapability responses. Then of course you have MapScript applications that would be difficult, if not impossible, to identify as being related to MapServer. On Sat, Jun 6, 2020 at 11:56 AM Jonathan Moules < jonathan-lists at lightpear.com> wrote: > Hi Folks, > > (Disclosure: I'm the person behind that blog post.) > > > I wonder how this statistics would look like if MapServer had a built-in > web administration interface like the other competing applications. > > The fact MS is so high without it shows it may not be that important, at > least not to the core audience. > > I think the biggest differentiator in the stats between the top three may > be the fact that MapServers don't have any sort of catalog of services or > other way to find other services on the box. By which I mean, ArcGIS Server > allows you to crawl it and get all of the public services and datasets. > GeoServer if there are namespaces (their way of grouping things into > services) you can go up a level and see what the root is serving, thus > potentially finding more datasets and another service that way (but only > one). But MapServer doesn't have a mechanism like that apparently (I asked > on this list a couple years ago), which means that it's hard to know if > I've found everything on a specific box. That's the biggest catch with the > MapServer stat at least. > > Cheers, > > Jonathan > > > On 2020-06-05 20:28, Tamas Szekeres wrote: > > Very interesting comparison. > I wonder how this statistics would look like if MapServer had a built-in > web administration interface like the other competing applications. > > Best regards, > > Tamas > > > Jeff McKenna ezt ?rta (id?pont: 2020. > j?n. 5., P, 18:09): > >> Something I noticed this morning: MapServer users might be interested in >> recently published statistics of deployed mapping engine types (ArcGIS, >> GeoServer, MapServer/MapCache, QGIS Server, etc.) : >> https://www.geoseer.net/blog/?p=2020-06-04_geospatial_server_software >> >> >> -jeff >> >> >> >> >> -- >> Jeff McKenna >> MapServer Consulting and Training Services >> co-founder of FOSS4G >> http://gatewaygeo.com/ >> >> >> >> >> >> >> >> >> >> _______________________________________________ >> mapserver-users mailing list >> mapserver-users at lists.osgeo.org >> https://lists.osgeo.org/mailman/listinfo/mapserver-users > > > _______________________________________________ > mapserver-users mailing listmapserver-users at lists.osgeo.orghttps://lists.osgeo.org/mailman/listinfo/mapserver-users > > _______________________________________________ > mapserver-users mailing list > mapserver-users at lists.osgeo.org > https://lists.osgeo.org/mailman/listinfo/mapserver-users -------------- next part -------------- An HTML attachment was scrubbed... URL: From brett.winklesky at gmail.com Thu Jun 18 08:09:02 2020 From: brett.winklesky at gmail.com (brett.winklesky at gmail.com) Date: Thu, 18 Jun 2020 09:09:02 -0600 Subject: [mapserver-users] PostGIS Raster Filters In-Reply-To: References: Message-ID: <005301d64582$679a7890$36cf69b0$@gmail.com> Hello- I'm trying to setup a WMS layer that is reading a raster table in PostGIS. I am loading NOAA Global Hydro Estimation data in a single table (tiled) and have a field that contains the datetime for the raster. I followed the examples here: https://postgis.net/docs/RT_FAQ.html#idm29732 In my case I would like to use the "where" statement to filter the raster tiles, but the 'where' statement only seems to work with the 'rid' field (e.g. rid=123). Based on the example in the PostGIS docs, it looks like it should theoretically work. I tried the "FILTER" in the map file, but I assume that only works with vector data since it did nothing. Does anybody know the trick to filter tiled raster data from a PostGIS raster table? Any help is greatly appreciated! Cheers, BW -------------- next part -------------- An HTML attachment was scrubbed... URL: From sdlime at gmail.com Thu Jun 18 20:10:37 2020 From: sdlime at gmail.com (Steve Lime) Date: Thu, 18 Jun 2020 22:10:37 -0500 Subject: [mapserver-users] PostGIS Raster Filters In-Reply-To: <005301d64582$679a7890$36cf69b0$@gmail.com> References: <005301d64582$679a7890$36cf69b0$@gmail.com> Message-ID: Can you access/filter the data outside MapServer with only GDAL? Might be easier to battle one piece of software rather than two. On Thu, Jun 18, 2020 at 10:09 AM wrote: > Hello- > > > > I?m trying to setup a WMS layer that is reading a raster table in > PostGIS. I am loading NOAA Global Hydro Estimation data in a single table > (tiled) and have a field that contains the datetime for the raster. I > followed the examples here: > > > > https://postgis.net/docs/RT_FAQ.html#idm29732 > > > > In my case I would like to use the ?where? statement to filter the raster > tiles, but the ?where? statement only seems to work with the ?rid? field > (e.g. rid=123). Based on the example in the PostGIS docs, it looks like it > should theoretically work. I tried the ?FILTER? in the map file, but I > assume that only works with vector data since it did nothing. > > > > Does anybody know the trick to filter tiled raster data from a PostGIS > raster table? > > > > Any help is greatly appreciated! > > > > Cheers, > > > > BW > > > > > _______________________________________________ > 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 eric.maldonado at inrae.fr Mon Jun 22 02:21:54 2020 From: eric.maldonado at inrae.fr (Maldonado Eric) Date: Mon, 22 Jun 2020 11:21:54 +0200 (CEST) Subject: [mapserver-users] Swig mapscript troubles Message-ID: <1830805770.306300.1592817714464.JavaMail.zimbra@inrae.fr> hello, I'm trying to update an installation from ( mapserver / mapscript 6.4) to ( mapserver mapscript/swig 7.4) on a new debian server. I have no troubles with wms/wfs services but when I'm trying to use mapscript functions, i have these problems ~$ php -a Interactive mode enabled php > dl("php_mapscriptng.so"); php > $map= new_mapObj("mymap.map"); php > $p=new_pointObj(1, 1); php > $p->toString(); PHP Warning: Uncaught Error: Call to a member function toString() on resource in php shell code:1 Stack trace: #0 {main} thrown in php shell code on line 1 php > echo mapscript.msGetVersion(); PHP Warning: Use of undefined constant mapscript - assumed 'mapscript' (this will throw an Error in a future version of PHP) in php shell code on line 1 mapscriptMapServer version 7.4.4 OUTPUT=PNG OUTPUT=JPEG OUTPUT=KML SUPPORTS=PROJ SUPPORTS=AGG SUPPORTS=FREETYPE SUPPORTS=ICONV SUPPORTS=WMS_SERVER SUPPORTS=WMS_CLIENT SUPPORTS=WFS_SERVER SUPPORTS=WFS_CLIENT SUPPORTS=WCS_SERVER SUPPORTS=SOS_SERVER SUPPORTS=THREADS SUPPORTS=GEOS SUPPORTS=POINT_Z_M INPUT=JPEG INPUT=POSTGIS INPUT=OGR INPUT=GDAL INPUT=SHAPEFILE It seemed no problem with the constructor method but when I try to use methods of the object i have heses errors Could you help me ? Thank you -------------- next part -------------- An HTML attachment was scrubbed... URL: From jmckenna at gatewaygeomatics.com Mon Jun 22 08:15:28 2020 From: jmckenna at gatewaygeomatics.com (Jeff McKenna) Date: Mon, 22 Jun 2020 12:15:28 -0300 Subject: [mapserver-users] Thoughts for our friend Olivier Courtin Message-ID: <1ca3c52a-ed8b-9f33-8604-7caccf197e4d@gatewaygeomatics.com> On behalf of the MapServer community, and its PSC, we wish to send our condolences to the family of Olivier Courtin, as we have sadly learned of his unfortunate passing. Olivier was a big part of the MapServer and Open Source community, through his work as the creator of the TinyOWS project, as a core contributor to PostGIS, as co-founder of the company Oslandia, as a manager with Camptocamp, and of course as a lead organizer of the 2016 OSGeo Code Sprint in Paris. Recently Olivier founded the open company DataPink, and created the open framework neat-EO. Olivier through his work through various companies and projects helped fund conferences, sprints, functional additions to projects and, of course, contributions of code and support. Olivier was a significant driver of those relationships, even given his quiet demeanor. First priority is his family and friends (we have already reached out to his family to send our thoughts and offer assistance). Some of us are quiet, and still processing this unfortunate news. This is of course not the time to discuss software issues, but the MapServer PSC will tackle this shortly in the upcoming PSC meeting. Again, our sincere thoughts to his family and close friends. Olivier, we miss you already. -on behalf of the MapServer PSC From jmckenna at gatewaygeomatics.com Wed Jun 24 14:10:07 2020 From: jmckenna at gatewaygeomatics.com (Jeff McKenna) Date: Wed, 24 Jun 2020 18:10:07 -0300 Subject: [mapserver-users] Swig mapscript troubles Message-ID: Hi Eric! First sorry for my poorly formatted response, in fact your email never made it to my inbox, as the email server for this list is hosted on a machine that was recently tagged on a spam 'blacklist' (see https://trac.osgeo.org/osgeo/ticket/2475), so I'm piecing together a response to you manually ha. Regarding upgrading to MapScript SWIG, the MapServer migration guide actually lists 2 very important points regarding PHP that must now always be followed (see https://mapserver.org/MIGRATION_GUIDE.html#mapserver-7-2-to-7-4-migration). 1) all of your PHP scripts (that leverage MapServer objects and functions) must now always first include the generated 'mapscript.php' file containing MapServer constants: // required SWIG include (contains MapServer constants for PHP7) include("C:/ms4w/apps/phpmapscriptng-swig/include/mapscript.php"); 2) take note of the change in how to declare your new objects with the "new ..Obj" syntax : // open map $oMap = new mapObj("C:/ms4w/apps/phpmapscriptng-swig/ Regarding the required file 'mapscript.php', if you are compiling MapServer yourself, it will be generated in your build folder alongside the generated 'php_mapscriptng.so' (such as in /mapserver-master/build/mapscript/phpng/ By odd chance, earlier today I added a working example for how to create a new point object (with an inline feature) through PHP mapscript SWIG: https://ms4w.com/trac/wiki/SWIGMapScriptNewLayer The important parts of the example PHP script are: draw(); ?> Hope that makes a little sense ha! -jeff -- Jeff McKenna MapServer Consulting and Training Services co-founder of FOSS4G http://gatewaygeo.com/ From jorge.mendesdejesus at isric.org Thu Jun 25 05:12:25 2020 From: jorge.mendesdejesus at isric.org (jorge.mendesdejesus at isric.org) Date: Thu, 25 Jun 2020 12:12:25 +0000 Subject: [mapserver-users] Differerent output format for GetFeatureInfo - template strategy Message-ID: An HTML attachment was scrubbed... URL: From sethg at geographika.co.uk Thu Jun 25 07:36:51 2020 From: sethg at geographika.co.uk (Seth G) Date: Thu, 25 Jun 2020 16:36:51 +0200 Subject: [mapserver-users] =?utf-8?q?Differerent_output_format_for_GetFeat?= =?utf-8?q?ureInfo_-=09template_strategy?= In-Reply-To: References: Message-ID: <2e84be08-37ba-4b79-8a07-368c18d581af@www.fastmail.com> Hi, I'm not sure if you have a custom template for each layer already, or if this something you want to avoid? I'm guessing ideally you want to be able to change the LAYER - TEMPLATE via the URL? Although this is not listed in the docs at https://mapserver.org/cgi/runsub.html#parameters-supported looking at the source I think it can be replaced via a URL. You can also set a CLASS TEMPLATE via the URL, and maybe have a different CLASS for each INFO_FORMAT and select it with GetStyles. Changing the format filename for each layer might be a possibility? https://mapserver.org/cgi/runsub.html#parameters-supported OUTPUTFORMAT: FORMATOPTION: FILENAME (must have a MAP VALIDATION pattern) Seth -- web:http://geographika.co.uk twitter: @geographika On Thu, Jun 25, 2020, at 2:12 PM, jorge.mendesdejesus at isric.org wrote: > Dear mapserver community > > I am trying to set a WMS where the a GetFeatureInfo will support more than one INFO_FORMAT, currently I have text/html implemented [1], which uses a layer level implementation. This works fine when you have only one format [2]. > > Now I need to have 2 formats, html and geojson/json. > > Documentation is very clear that the best strategy is to use the OUTPUTFORMAT, each output format associated with a specific template, this works fine . > > Problem is that all examples that I see using outputformat have a very clear layer name indication (below is nums) > > // mapserver template > [resultset layer=mums] > > This simplely doesn't work if you have 100 layers on a mapfile and we need a output format template for all of them, I have search for some generic parameter that could relay the layer name being used but no luck. With setting the layer name it doesn't work!! And arguments can't be replaced > > Question : > - How can I have a generic [resultset ] that can be use by multiple layers???? [3] > - Template at layer level works good but I don't think we can support 2 formats there, is this correct??? > > > System: > mapserver7.6.0 gdal2.4 proj4 > > > Thank you > Jorge de Jesus > > [1] https://maps.isric.org/mapserv?map=/map/bdod.map&SERVICE=WMS&VERSION=1.3.0&REQUEST=GetFeatureInfo&BBOX=47.130647,8.931116,48.604188,29.54223&CRS=EPSG:4326&WIDTH=1073&HEIGHT=445&LAYERS=bdod_0-5cm_Q0.5&STYLES=&FORMAT=image/tiff&QUERY_LAYERS=bdod_0-5cm_Q0.5&INFO_FORMAT=text/html&I=509&J=359&FEATURE_COUNT=1 > > [2] https://gis.stackexchange.com/questions/343901/getfeatureinfo-template-of-mapserver-not-replacing-values > > [3] https://pastebin.com/FdepGTf7 > > > > ISRIC ? World Soil Information > > PO Box 353 | 6700 AJ Wageningen > Droevendaalsesteeg 3 (Building 101) | 6708 PB Wageningen > The Netherlands > Telephone (Secretariat): +31 317 483735 > E-mail: info at isric.org > ** > _______________________________________________ > 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 fernando.m.pimenta at gmail.com Thu Jun 25 13:16:33 2020 From: fernando.m.pimenta at gmail.com (Fernando Martins Pimenta) Date: Thu, 25 Jun 2020 17:16:33 -0300 Subject: [mapserver-users] PostGIS query problem Message-ID: Hi, I am using the query below to return a hydrograph of a region (using POSTGIS). This query works perfectly when I use it in pgadmin. With the mapserver, the connection with the client is lost. It records a query that shows no errors in SQL, just shows that the connection has lost. Why is that? DATA "geom FROM ( SELECT hidro.fid, hidro.name, ST_Intersection(gcc.geom, hidro.geom) AS geom FROM vector.hidrography AS hidro, vector.gcc AS gcc WHERE ST_Intersects(gcc.geom, hidro.geom) AND gcc.name = 'GRANDE' ) as subquery USING UNIQUE fid USING SRID=4326" Thanks in advance *Fernando Martins Pimenta * Graduando em Engenharia de Agrimensura e Cartogr?fica - UFV Bacharel em Engenharia de Biossistemas - UFSJ www.biosfera.dea.ufv.br -------------- next part -------------- An HTML attachment was scrubbed... URL: From sethg at geographika.co.uk Thu Jun 25 13:20:50 2020 From: sethg at geographika.co.uk (Seth G) Date: Thu, 25 Jun 2020 22:20:50 +0200 Subject: [mapserver-users] PostGIS query problem In-Reply-To: References: Message-ID: Hi, What client are you using? How long does the query take to complete? It is likely the client stops waiting for a response. Seth -- web:http://geographika.co.uk twitter: @geographika On Thu, Jun 25, 2020, at 10:16 PM, Fernando Martins Pimenta wrote: > Hi, > > I am using the query below to return a hydrograph of a region (using POSTGIS). This query works perfectly when I use it in pgadmin. With the mapserver, the connection with the client is lost. It records a query that shows no errors in SQL, just shows that the connection has lost. Why is that? > > DATA "geom FROM ( > SELECT > hidro.fid, hidro.name, ST_Intersection(gcc.geom, hidro.geom) AS geom > FROM > vector.hidrography AS hidro, > vector.gcc AS gcc > WHERE ST_Intersects(gcc.geom, hidro.geom) AND gcc.name = 'GRANDE' > ) as subquery USING UNIQUE fid USING SRID=4326" > > Thanks in advance > > *Fernando Martins Pimenta * > Graduando em Engenharia de Agrimensura e Cartogr?fica - UFV > Bacharel em Engenharia de Biossistemas - UFSJ > > www.biosfera.dea.ufv.br > > _______________________________________________ > 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 jmckenna at gatewaygeomatics.com Thu Jun 25 17:36:58 2020 From: jmckenna at gatewaygeomatics.com (Jeff McKenna) Date: Thu, 25 Jun 2020 21:36:58 -0300 Subject: [mapserver-users] PostGIS query problem In-Reply-To: References: Message-ID: Hi Fernando, I would try using the shp2img utility at the commandline, and set CONFIG "CPL_DEBUG" "ON" in your mapfile (see https://mapserver.org/optimization/debugging.html#step-3-turn-on-cpl-debug-optional) and then execute: shp2img -m mymap.map -o ttt.png -all_debug 5 The full query should be listed there in the response, which you can then paste into the psql commandline, and manually execute the same query to your database. PS. hello to my friends in Brasil! -jeff -- Jeff McKenna MapServer Consulting and Training Services co-founder of FOSS4G http://gatewaygeo.com/ On 2020-06-25 5:16 p.m., Fernando Martins Pimenta wrote: > Hi, > > I am using the query below to return a hydrograph of a region (using > POSTGIS). This query works perfectly when I use it in pgadmin. With the > mapserver, the connection with the client is lost. It records a query > that shows no errors in SQL, just shows that the connection has lost. > Why is that? > > DATA "geom FROM ( > ? ? ? ? ?SELECT > ? ? ? ? ? ? hidro.fid, hidro.name , > ST_Intersection(gcc.geom, hidro.geom) AS geom > ? ? ? ? ? FROM > ? ? ? ? ? ? vector.hidrography AS hidro, > ? ? ? ? ? ? vector.gcc AS gcc > ? ? ? ? ? WHERE ST_Intersects(gcc.geom, hidro.geom) AND gcc.name > = 'GRANDE' > ) as subquery USING UNIQUE fid USING SRID=4326" > > Thanks in advance > > *Fernando Martins Pimenta * > Graduando em Engenharia de Agrimensura e Cartogr?fica - UFV > Bacharel em Engenharia de Biossistemas - UFSJ > > www.biosfera.dea.ufv.br > > > From louis-philippe.rousseaulambert2 at canada.ca Fri Jun 26 06:00:31 2020 From: louis-philippe.rousseaulambert2 at canada.ca (Rousseau Lambert2, Louis-Philippe (EC)) Date: Fri, 26 Jun 2020 13:00:31 +0000 Subject: [mapserver-users] =?iso-8859-1?q?Sliver_when_displaying_0=B0-360?= =?iso-8859-1?q?=B0_NetCDF_data_in_EPSG=3A3857?= Message-ID: Hi, This issue is related to: * https://github.com/mapserver/mapserver/commit/722716c49de2399f54b275ab31437f0e8c92cd63 * https://github.com/mapserver/mapserver/commit/4c2aeb4bbd229723d8ea67c337cf02350575b2ae The issue is that when I try to visualize (via WMS) a layer with a NetCDF data file with longitude from 0? to 360? in EPSG:3857, there is a sliver around longitude 0? where no data is displayed. We already had that issue with the same files using EPSG:4326 and it's been fixed in MapServer (see merge request above). Here is where you can find example files: https://dd.weather.gc.ca/model_giops/netcdf/lat_lon/2d/00/003/CMC_giops_votemper_depth_0.5_latlon0.2x0.2_3h-mean_{yyyymmdd}00_P003.nc We are testing using: MapServer version 7.4.4 OUTPUT=PNG OUTPUT=JPEG OUTPUT=KML SUPPORTS=PROJ SUPPORTS=AGG SUPPORTS=FREETYPE SUPPORTS=CAIRO SUPPORTS=SVG_SYMBOLS SUPPORTS=RSVG SUPPORTS=ICONV SUPPORTS=FRIBIDI SUPPORTS=WMS_SERVER SUPPORTS=WMS_CLIENT SUPPORTS=WFS_SERVER SUPPORTS=WFS_CLIENT SUPPORTS=WCS_SERVER SUPPORTS=SOS_SERVER SUPPORTS=FASTCGI SUPPORTS=THREADS SUPPORTS=GEOS SUPPORTS=POINT_Z_M INPUT=JPEG INPUT=POSTGIS INPUT=OGR INPUT=GDAL INPUT=SHAPEFILE Here is a minimal mapfile to reproduce: MAP NAME "" IMAGETYPE PNG EXTENT -180 -90 180 90 MAXSIZE 4096 SIZE 500 300 IMAGECOLOR 255 255 255 PROJECTION "init=epsg:4326" END TRANSPARENT ON DEBUG 5 WEB METADATA "ows_extent" "-180 -90 180 90" "wms_getmap_formatlist" "image/png,image/jpeg" "wms_timeformat" "YYYY-MM-DDTHH:MM:SSZ" "wms_getfeatureinfo_formatlist" "text/plain" "ows_enable_request" "*" "ows_abstract" "" "ows_srs" "EPSG:4326 EPSG:3857" "ows_title" "" END END LAYER NAME "TEST" DEBUG 5 TYPE RASTER PROCESSING "GDAL_NETCDF_BOTTOMUP=YES" TOLERANCE 15 TEMPLATE "ttt.html" PROJECTION "proj=longlat" "a=6371229" "b=6371229" "lon_wrap=180" "no_defs" END DATA '' METADATA "ows_title" "" "ows_abstract" "" "ows_extent" "-180 -80.1 180 89.9" "ows_geomtype" "Geometry" END CLASS NAME "" STYLE COLORRANGE 0 0 127 127 0 0 DATARANGE 200.00 400 END END END END -------------- next part -------------- An HTML attachment was scrubbed... URL: From justb4 at gmail.com Fri Jun 26 08:55:01 2020 From: justb4 at gmail.com (Just van den Broecke) Date: Fri, 26 Jun 2020 17:55:01 +0200 Subject: [mapserver-users] Problem with Python MapScript queryByRect Message-ID: <35fd8e93-e9c2-240b-154f-4c231c4c0d00@gmail.com> Hi, I am reviving a Python 2 MapServer MapScript app that used to work 7 years ago (and still is in old deployment) but stuck in some MapScript calls that fail but also throw no Exceptions. Purpose of the app "MapGlow" [1] is to generate a WMS-heatmap triggered by specific STYLE parameters. When no heatmap STYLE is requested requests are delegated to map_file.OWSDispatch() etc. The latter works fine so the overall setup/stack/mapfile is working. Using MS 7.6.0 in Docker (compose) with Lighttp, FastCGI, WSGI, flup. It is only when layerObj.queryByRect() is called, a HTTP 500 is returned after a FastCGI hard error, no means to catch an Exception. The passed MapFile and Rect objects seem ok. Also I noticed that layerObj.metadata had 0 items. I can see that I have proper SWIG objects like > If only I could get a hint, a MapFile setting, maybe some log output or debug flag I can set? The WIP is on GH, I can point at the failing line [2] but the code is quite involved (mind, my first Python 7-9 years ago): [1] https://github.com/justb4/mapglow [2] https://github.com/justb4/mapglow/blob/master/app1/wms/mapglow_ms.py#L249 Thanks for any help, Just van den Broecke The Netherlands From jmckenna at gatewaygeomatics.com Fri Jun 26 10:56:39 2020 From: jmckenna at gatewaygeomatics.com (Jeff McKenna) Date: Fri, 26 Jun 2020 14:56:39 -0300 Subject: [mapserver-users] =?utf-8?q?Sliver_when_displaying_0=C2=B0-360?= =?utf-8?q?=C2=B0_NetCDF_data_in_EPSG=3A3857?= In-Reply-To: <20200626130748.CF10561449B3@lists.osgeo.org> References: <20200626130748.CF10561449B3@lists.osgeo.org> Message-ID: <860e28b4-d918-c6ea-0e1e-b35ff9617e6a@gatewaygeomatics.com> Hi Louis-Philippe, With much kind respect, the test case that you provided was not very simple, so I had to spend much effort to create a tiny test case, that contains one of your NetCDF files, and a small mapfile that simply reprojects the file into EPSG:3857 (without WMS etc.). The small test case contains a single shp2img command to replicate the issue (in a file 'commands.txt') which you can download at https://gatewaygeomatics.com/dl/netcdf-2020-06-26.zip The issue that you report, of a sliver (no data) in the map when reprojecting to 3857, is visible in the resulting map images in the live demo at: https://demo.gatewaygeomatics.com/cgi-bin/mapserv?MAP=/home/apps/netcdf/2020-06-26/netcdf-test.map&MODE=browse&TEMPLATE=openlayers&LAYERS=all (this server is running MapServer-master) This should be filed as a new ticket at https://github.com/mapserver/mapserver/issues and point to this test zipfile. Have a nice weekend, -jeff -- Jeff McKenna MapServer Consulting and Training Services co-founder of FOSS4G http://gatewaygeo.com/ On 2020-06-26 10:00 a.m., Rousseau Lambert2, Louis-Philippe (EC) wrote: > Hi, > > This issue is related to: > > * https://github.com/mapserver/mapserver/commit/722716c49de2399f54b275ab31437f0e8c92cd63 > > * https://github.com/mapserver/mapserver/commit/4c2aeb4bbd229723d8ea67c337cf02350575b2ae > > > The issue is that when I try to visualize (via WMS) a layer with a > NetCDF data file with longitude from 0? to 360? in EPSG:3857, there is a > sliver around longitude 0? where no data is displayed. > > From jmckenna at gatewaygeomatics.com Fri Jun 26 11:04:47 2020 From: jmckenna at gatewaygeomatics.com (Jeff McKenna) Date: Fri, 26 Jun 2020 15:04:47 -0300 Subject: [mapserver-users] =?utf-8?q?Sliver_when_displaying_0=C2=B0-360?= =?utf-8?q?=C2=B0_NetCDF_data_in_EPSG=3A3857?= In-Reply-To: <860e28b4-d918-c6ea-0e1e-b35ff9617e6a@gatewaygeomatics.com> References: <20200626130748.CF10561449B3@lists.osgeo.org> <860e28b4-d918-c6ea-0e1e-b35ff9617e6a@gatewaygeomatics.com> Message-ID: the mapfile is visible at https://gatewaygeomatics.com/dl/netcdf-test.map -jeff -- Jeff McKenna MapServer Consulting and Training Services co-founder of FOSS4G http://gatewaygeo.com/ On 2020-06-26 2:56 p.m., Jeff McKenna wrote: > Hi Louis-Philippe, > > With much kind respect, the test case that you provided was not very > simple, so I had to spend much effort to create a tiny test case, that > contains one of your NetCDF files, and a small mapfile that simply > reprojects the file into EPSG:3857 (without WMS etc.).? The small test > case contains a single shp2img command to replicate the issue (in a file > 'commands.txt') which you can download at > https://gatewaygeomatics.com/dl/netcdf-2020-06-26.zip > > The issue that you report, of a sliver (no data) in the map when > reprojecting to 3857, is visible in the resulting map images in the live > demo at: > https://demo.gatewaygeomatics.com/cgi-bin/mapserv?MAP=/home/apps/netcdf/2020-06-26/netcdf-test.map&MODE=browse&TEMPLATE=openlayers&LAYERS=all > ?(this server is running MapServer-master) > > This should be filed as a new ticket at > https://github.com/mapserver/mapserver/issues and point to this test > zipfile. > > Have a nice weekend, > > -jeff > > > > From justb4 at gmail.com Sat Jun 27 06:08:06 2020 From: justb4 at gmail.com (Just van den Broecke) Date: Sat, 27 Jun 2020 15:08:06 +0200 Subject: [mapserver-users] Problem with Python MapScript queryByRect In-Reply-To: <35fd8e93-e9c2-240b-154f-4c231c4c0d00@gmail.com> References: <35fd8e93-e9c2-240b-154f-4c231c4c0d00@gmail.com> Message-ID: <73011fed-bfc6-a853-fc1c-a82b524d6235@gmail.com> I got somewhat further: it appears I get a SEGFAULT when calling any MapScript query() method. This is also what FastCGI receives (signal 11). For example, bash-ing into the Docker Container and execute MapScript Python: $ python Python 2.7.16 (default, Oct 10 2019, 22:02:15) [GCC 8.3.0] on linux2 >>> import mapscript >>> map = mapscript.mapObj('/app1/config/mapserver/app1.map') >>> layer = map.getLayerByName('nlpubs') >>> layer.name 'nlpubs' >>> len(layer.metadata) 0 >>> res = layer.queryByAttributes(map, 'Name', 'Lef', mapscript.MS_MULTIPLE) Segmentation fault But getting number of Features is ok: >>> layer.getNumFeatures() GNM: GNMRegisterAllInternal GNM: RegisterGNMFile GNM: RegisterGNMdatabase GDAL: GDALOpen(/app1/data/pubs, this=0x557ace611b90) succeeds as ESRI Shapefile. Shape: DBF Codepage = LDID/87 for /app1/data/pubs/osm-nl-pub.shp Shape: Treating as encoding 'ISO-8859-1'. GDAL: GDALClose(/app1/data/pubs, this=0x557ace611b90) 2864 The LAYER def is LAYER NAME nlpubs STATUS default TYPE POINT PROJECTION "init=epsg:4326" END METADATA "wfs_title" "NL Pubs from OSM POIs" "wfs_version" "1.1.0" "wfs_extent" "4 50 6 54" "wfs_bbox_extended" "true" "wfs_enable_request" "*" "wfs_srs" "epsg:4326 epsg:3857 epsg:900913" "wfs_include_items" "all" "gml_include_items" "all" "gml_geometries" "geom" "wms_title" "NL Pubs from OSM POIs" "wms_srs" "epsg:4326 epsg:3857 epsg:900913" "wms_extent" "4 50 6 54" "wms_feature_info_mime_type" "text/xml" "mapglow_feat_density" "0.002" END CONNECTIONTYPE OGR CONNECTION "/app1/data/pubs" DATA "osm-nl-pub" TEMPLATE "/app1/config/mapserver/template.html" CLASS NAME "osm-nl-pub" STYLE COLOR 0 102 204 SYMBOL "circle" SIZE 10 END END END Data is a shapefile, but GeoJSON also fails. Also strange that layer.metadata is empty. Like said when I delegate any incoming OWS req to map.OWSDispatch() I get proper results for all WMS requests, in particular GetMap with styled output. The base Dockerfile used is at: https://github.com/PDOK/mapserver-docker/blob/master/Dockerfile from which I derived my Dockerfile: https://github.com/justb4/mapglow/blob/master/Dockerfile Maybe there is some mismatch in lib versions? Again thanks. Best, Just van den Broecke On 26-06-20 17:55, Just van den Broecke wrote: > Hi, > > I am reviving a Python 2 MapServer MapScript app that used to work 7 > years ago (and still is in old deployment) but stuck in some MapScript > calls that fail but also throw no Exceptions. > > Purpose of the app "MapGlow" [1] is to generate a WMS-heatmap triggered > by specific STYLE parameters. When no heatmap STYLE is requested > requests are delegated to map_file.OWSDispatch() etc. The latter works > fine so the overall setup/stack/mapfile is working. Using MS 7.6.0 in > Docker (compose) with Lighttp, FastCGI, WSGI, flup. > > It is only when? layerObj.queryByRect() is called, a HTTP 500 is > returned after a FastCGI hard error, no means to catch an Exception. The > passed MapFile and Rect objects seem ok. Also I noticed that > layerObj.metadata had 0 items. I can see that I have proper SWIG objects > like > 0x7fded06b1de0> > > If only I could get a hint, a MapFile setting, maybe some log output or > debug flag I can set? The WIP is on GH, I can point at the failing line > [2] but the code is > quite involved (mind, my first Python 7-9 years ago): > > [1] https://github.com/justb4/mapglow > [2] > https://github.com/justb4/mapglow/blob/master/app1/wms/mapglow_ms.py#L249 > > Thanks for any help, > > Just van den Broecke > The Netherlands > _______________________________________________ > mapserver-users mailing list > mapserver-users at lists.osgeo.org > https://lists.osgeo.org/mailman/listinfo/mapserver-users From sdlime at gmail.com Sat Jun 27 06:55:49 2020 From: sdlime at gmail.com (Steve Lime) Date: Sat, 27 Jun 2020 08:55:49 -0500 Subject: [mapserver-users] Differerent output format for GetFeatureInfo - template strategy In-Reply-To: References: Message-ID: If your data is very standardized I can see where this would be helpful. I think if the layer attribute was interpreted as a regex then that might do the trick. I?d advocate adding another attribute though to avoid a regression since layer names commonly contain characters that would be problematic in a regex. Something like ?layerPattern?. With that you could do: [resultset layerPattern=?.?] ... [/resultset] and it would apply to all layers. Note there is also include support in templates so you can use a common presentation over and over even if you had to define a resultset for each layer. So something like: [resultset layer=?l1?] [include file=?common.html?] [/resultset] [resultset layer=?l2?] [include file=?common.html?] [/resultset] This could be a candidate for 7.6.1 I suppose. ?Steve On Thu, Jun 25, 2020 at 7:20 AM wrote: > Dear mapserver community > > I am trying to set a WMS where the a GetFeatureInfo will support more > than one INFO_FORMAT, currently I have text/html implemented [1], which > uses a layer level implementation. This works fine when you have only one > format [2]. > > Now I need to have 2 formats, html and geojson/json. > > Documentation is very clear that the best strategy is to use the > OUTPUTFORMAT, each output format associated with a specific template, this > works fine . > > Problem is that all examples that I see using outputformat have a very > clear layer name indication (below is nums) > > // mapserver template[resultset layer=mums] > > > This simplely doesn't work if you have 100 layers on a mapfile and we need > a output format template for all of them, I have search for some generic > parameter that could relay the layer name being used but no luck. With > setting the layer name it doesn't work!! And arguments can't be replaced > > Question : > - How can I have a generic [resultset ] that can be use by multiple > layers???? [3] > - Template at layer level works good but I don't think we can support 2 > formats there, is this correct??? > > > System: > mapserver7.6.0 gdal2.4 proj4 > > > Thank you > Jorge de Jesus > > [1] > https://maps.isric.org/mapserv?map=/map/bdod.map&SERVICE=WMS&VERSION=1.3.0&REQUEST=GetFeatureInfo&BBOX=47.130647,8.931116,48.604188,29.54223&CRS=EPSG:4326&WIDTH=1073&HEIGHT=445&LAYERS=bdod_0-5cm_Q0.5&STYLES=&FORMAT=image/tiff&QUERY_LAYERS=bdod_0-5cm_Q0.5&INFO_FORMAT=text/html&I=509&J=359&FEATURE_COUNT=1 > > [2] > https://gis.stackexchange.com/questions/343901/getfeatureinfo-template-of-mapserver-not-replacing-values > > [3] https://pastebin.com/FdepGTf7 > > > > ISRIC ? World Soil Information > > PO Box 353 | 6700 AJ Wageningen > > Droevendaalsesteeg 3 (Building 101) | 6708 PB Wageningen > > > The Netherlands > > > Telephone (Secretariat): +31 317 483735 > > E-mail: info at isric.org > > > _______________________________________________ > 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 justb4 at gmail.com Sun Jun 28 03:20:21 2020 From: justb4 at gmail.com (Just van den Broecke) Date: Sun, 28 Jun 2020 12:20:21 +0200 Subject: [mapserver-users] Problem with Python MapScript queryByRect In-Reply-To: <73011fed-bfc6-a853-fc1c-a82b524d6235@gmail.com> References: <35fd8e93-e9c2-240b-154f-4c231c4c0d00@gmail.com> <73011fed-bfc6-a853-fc1c-a82b524d6235@gmail.com> Message-ID: <6d621bbe-be1b-766f-bf31-cdc3c6a270a8@gmail.com> Solved, there was some kind of mismatch probably with library versions from multi-stage Docker builds/copies. Made a new Dockerfile from buster-slim with standard Mapserver (7.2.2 ) and Lighttpd and apart from some new MapScript syntax, all works! The Dockerfile is nice and small (296MB uncompressed), works out-of-the-box with FastCGI/WSGI, albeit somewhat older MS version: https://github.com/justb4/mapglow/blob/master/Dockerfile Best, Just On 27-06-20 15:08, Just van den Broecke wrote: > I got somewhat further: it appears I get a SEGFAULT when calling any > MapScript query() method. This is also what FastCGI receives (signal 11). > > For example, bash-ing into the Docker Container and execute MapScript > Python: > > $ python > Python 2.7.16 (default, Oct 10 2019, 22:02:15) > [GCC 8.3.0] on linux2 > >>> import mapscript > >>> map = mapscript.mapObj('/app1/config/mapserver/app1.map') > >>> layer = map.getLayerByName('nlpubs') > >>> layer.name > 'nlpubs' > >>> len(layer.metadata) > 0 > >>> res = layer.queryByAttributes(map, 'Name', 'Lef', > mapscript.MS_MULTIPLE) > Segmentation fault > > But getting number of Features is ok: > >>> layer.getNumFeatures() > GNM: GNMRegisterAllInternal > GNM: RegisterGNMFile > GNM: RegisterGNMdatabase > GDAL: GDALOpen(/app1/data/pubs, this=0x557ace611b90) succeeds as ESRI > Shapefile. > Shape: DBF Codepage = LDID/87 for /app1/data/pubs/osm-nl-pub.shp > Shape: Treating as encoding 'ISO-8859-1'. > GDAL: GDALClose(/app1/data/pubs, this=0x557ace611b90) > 2864 > > The LAYER def is > LAYER > ??? NAME nlpubs > ??? STATUS default > ??? TYPE POINT > ??? PROJECTION > ????? "init=epsg:4326" > ??? END > > ??? METADATA > ??????? "wfs_title"???????? "NL Pubs from OSM POIs" > ??????? "wfs_version"???? "1.1.0" > ??????? "wfs_extent"???? "4 50 6 54" > ??????? "wfs_bbox_extended"???? "true" > ??????? "wfs_enable_request"??? "*" > ??????? "wfs_srs"???????? "epsg:4326 epsg:3857 epsg:900913" > ??????? "wfs_include_items"???? "all" > ??????? "gml_include_items"???? "all" > ??????? "gml_geometries"??????? "geom" > ??????? "wms_title"???????????? "NL Pubs from OSM POIs" > ??????? "wms_srs"???????? "epsg:4326 epsg:3857 epsg:900913" > ??????? "wms_extent"???? "4 50 6 54" > ??????? "wms_feature_info_mime_type" "text/xml" > ??????? "mapglow_feat_density"???? "0.002" > ?? END > > ??? CONNECTIONTYPE OGR > ??? CONNECTION "/app1/data/pubs" > ??? DATA "osm-nl-pub" > ??? TEMPLATE "/app1/config/mapserver/template.html" > > ??? CLASS > ????? NAME "osm-nl-pub" > ????? STYLE > ??????? COLOR 0 102 204 > ??????? SYMBOL "circle" > ??????? SIZE 10 > ????? END > ??? END > END > > Data is a shapefile, but GeoJSON also fails. Also strange that > layer.metadata is empty. Like said when I delegate any incoming OWS req > to map.OWSDispatch() I get proper results for all WMS requests, in > particular GetMap with styled output. > The base Dockerfile used is at: > https://github.com/PDOK/mapserver-docker/blob/master/Dockerfile from > which I derived my Dockerfile: > https://github.com/justb4/mapglow/blob/master/Dockerfile > > Maybe there is some mismatch in lib versions? > > Again thanks. Best, > > Just van den Broecke > > On 26-06-20 17:55, Just van den Broecke wrote: >> Hi, >> >> I am reviving a Python 2 MapServer MapScript app that used to work 7 >> years ago (and still is in old deployment) but stuck in some MapScript >> calls that fail but also throw no Exceptions. >> >> Purpose of the app "MapGlow" [1] is to generate a WMS-heatmap >> triggered by specific STYLE parameters. When no heatmap STYLE is >> requested requests are delegated to map_file.OWSDispatch() etc. The >> latter works fine so the overall setup/stack/mapfile is working. Using >> MS 7.6.0 in Docker (compose) with Lighttp, FastCGI, WSGI, flup. >> >> It is only when? layerObj.queryByRect() is called, a HTTP 500 is >> returned after a FastCGI hard error, no means to catch an Exception. >> The passed MapFile and Rect objects seem ok. Also I noticed that >> layerObj.metadata had 0 items. I can see that I have proper SWIG >> objects like >> > 0x7fded06b1de0> > >> If only I could get a hint, a MapFile setting, maybe some log output >> or debug flag I can set? The WIP is on GH, I can point at the failing >> line [2] but the code is >> quite involved (mind, my first Python 7-9 years ago): >> >> [1] https://github.com/justb4/mapglow >> [2] >> https://github.com/justb4/mapglow/blob/master/app1/wms/mapglow_ms.py#L249 >> >> Thanks for any help, >> >> Just van den Broecke >> The Netherlands >> _______________________________________________ >> mapserver-users mailing list >> mapserver-users at lists.osgeo.org >> https://lists.osgeo.org/mailman/listinfo/mapserver-users > > _______________________________________________ > mapserver-users mailing list > mapserver-users at lists.osgeo.org > https://lists.osgeo.org/mailman/listinfo/mapserver-users From fernando.m.pimenta at gmail.com Mon Jun 29 13:25:26 2020 From: fernando.m.pimenta at gmail.com (Fernando Martins Pimenta) Date: Mon, 29 Jun 2020 17:25:26 -0300 Subject: [mapserver-users] PostGIS query problem In-Reply-To: References: Message-ID: When I run the query in pgadmin4 query tool it works correctly. SELECT hidro.fid, hidro.name, ST_Intersection(gcc.geom, hidro.geom) AS geom FROM vector.hidrography AS hidro, vector.gcc AS gcc WHERE ST_Intersects(gcc.geom, hidro.geom) AND gcc.name = UPPER('grande') When I run the same query in mapfile it does not work (it returns only null). DATA "geom FROM ( SELECT hidro.fid, hidro.name, ST_Intersection(gcc.geom, hidro.geom) AS geom FROM vector.hidrography AS hidro, vector.gcc AS gcc WHERE ST_Intersects(gcc.geom, hidro.geom) AND gcc.name = UPPER('grande') ) as subquery USING UNIQUE fid USING SRID=4326" The difference is "as subquery USING UNIQUE fid USING SRID=4326" When I run shp2image the query returns: ... msPostGISReadShape: [shape] (null) msPostGISReadShape called. msPostGISReadShape: [shape] (null) msPostGISReadShape called. msPostGISReadShape: [shape] (null) msPostGISReadShape called. msPostGISReadShape: [shape] (null) msPostGISReadShape called. msPostGISReadShape: [shape] (null) msPostGISReadShape called. msPostGISReadShape: [shape] (null) msPostGISLayerFreeItemInfo called. msPostGISLayerClose called: geom FROM ( SELECT hidro.fid, hidro.name, ST_Intersection(gcc.geom, hidro.geom) AS geom FROM vector.hidrography AS hidro, vector.gcc AS gcc WHERE ST_Intersects(gcc.geom, hidro.geom) AND gcc.name = UPPER('grande') ) as subquery USING UNIQUE fid USING SRID=4326 msConnPoolRelease(hidrografia,host=************** dbname=****** user=****** password=****** port=5432,0x55c19e119740) msDrawMap(): Layer 0 (hidrografia), 163.260s msDrawMap(): Drawing Label Cache, 0.000s msDrawMap() total time: 163.260s msSaveImage(ttt.png) total time: 0.011s msFreeMap(): freeing map at 0x55c19e10d3f0. freeLayer(): freeing layer at 0x55c19e114ae0. msPostGISLayerIsOpen called. shp2img total time: 163.272s msConnPoolClose(host=************ dbname=******** user=******** password=******** port=5432,0x55c19e119740) GDAL: In GDALDestroy - unloading GDAL shared library. PostgreSQL log returns: FATAL: connection with client has been lost COMMAND: select ST_AsBinary (("geom"), 'NDR') as geom, "fid" :: text from ( SELECT hydro.fid, hydro.name, ST_Intersection (gcc.geom, hydro.geom) AS geom FROM vector.hidrography AS hydro, vector.gcc AS gcc WHERE ST_Intersects (gcc.geom, hydro.geom) AND gcc.name = UPPER ('grande')) as subquery where "geom" && ST_GeomFromText ('POLYGON ((- 46.7031998460824 -15.4471601311111, -46.703199856608-9353563593463563593563561035610610356)) , -43.0600566044731 -15.4471601311111, -46.7031998460824 -15.4471601311111)) ', 4326) I didn't find out why the mapserver is not executing this query correctly. *Fernando Martins Pimenta* Graduando em Engenharia de Agrimensura e Cartogr?fica - UFV Bacharel em Engenharia de Biossistemas - UFSJ www.biosfera.dea.ufv.br On Fri, Jun 26, 2020 at 1:02 PM wrote: > Send mapserver-users mailing list submissions to > mapserver-users at lists.osgeo.org > > To subscribe or unsubscribe via the World Wide Web, visit > https://lists.osgeo.org/mailman/listinfo/mapserver-users > 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. PostGIS query problem (Fernando Martins Pimenta) > 2. Re: PostGIS query problem (Seth G) > 3. Re: PostGIS query problem (Jeff McKenna) > 4. Sliver when displaying 0?-360? NetCDF data in EPSG:3857 > (Rousseau Lambert2, Louis-Philippe (EC)) > 5. Problem with Python MapScript queryByRect (Just van den Broecke) > > > ---------------------------------------------------------------------- > > Message: 1 > Date: Thu, 25 Jun 2020 17:16:33 -0300 > From: Fernando Martins Pimenta > To: mapserver-users at lists.osgeo.org > Subject: [mapserver-users] PostGIS query problem > Message-ID: > < > CA+VvBcEZ5tUetUXjAc-DSt3NMLo_ZCTX2oP4yiiEd0VUrX-odQ at mail.gmail.com> > Content-Type: text/plain; charset="utf-8" > > Hi, > > I am using the query below to return a hydrograph of a region (using > POSTGIS). This query works perfectly when I use it in pgadmin. With the > mapserver, the connection with the client is lost. It records a query that > shows no errors in SQL, just shows that the connection has lost. Why is > that? > > DATA "geom FROM ( > SELECT > hidro.fid, hidro.name, ST_Intersection(gcc.geom, hidro.geom) > AS > geom > FROM > vector.hidrography AS hidro, > vector.gcc AS gcc > WHERE ST_Intersects(gcc.geom, hidro.geom) AND gcc.name = > 'GRANDE' > ) as subquery USING UNIQUE fid USING SRID=4326" > > Thanks in advance > > *Fernando Martins Pimenta * > Graduando em Engenharia de Agrimensura e Cartogr?fica - UFV > Bacharel em Engenharia de Biossistemas - UFSJ > > www.biosfera.dea.ufv.br > -------------- next part -------------- > An HTML attachment was scrubbed... > URL: < > http://lists.osgeo.org/pipermail/mapserver-users/attachments/20200625/e300a5d6/attachment-0001.html > > > > ------------------------------ > > Message: 2 > Date: Thu, 25 Jun 2020 22:20:50 +0200 > From: "Seth G" > To: mapserver-users at lists.osgeo.org > Subject: Re: [mapserver-users] PostGIS query problem > Message-ID: > Content-Type: text/plain; charset="utf-8" > > Hi, > > What client are you using? > How long does the query take to complete? > It is likely the client stops waiting for a response. > > Seth > > -- > web:http://geographika.co.uk > twitter: @geographika > > > On Thu, Jun 25, 2020, at 10:16 PM, Fernando Martins Pimenta wrote: > > Hi, > > > > I am using the query below to return a hydrograph of a region (using > POSTGIS). This query works perfectly when I use it in pgadmin. With the > mapserver, the connection with the client is lost. It records a query that > shows no errors in SQL, just shows that the connection has lost. Why is > that? > > > > DATA "geom FROM ( > > SELECT > > hidro.fid, hidro.name, ST_Intersection(gcc.geom, hidro.geom) AS geom > > FROM > > vector.hidrography AS hidro, > > vector.gcc AS gcc > > WHERE ST_Intersects(gcc.geom, hidro.geom) AND gcc.name = 'GRANDE' > > ) as subquery USING UNIQUE fid USING SRID=4326" > > > > Thanks in advance > > > > *Fernando Martins Pimenta * > > Graduando em Engenharia de Agrimensura e Cartogr?fica - UFV > > Bacharel em Engenharia de Biossistemas - UFSJ > > > > www.biosfera.dea.ufv.br > > > > _______________________________________________ > > mapserver-users mailing list > > mapserver-users at lists.osgeo.org > > https://lists.osgeo.org/mailman/listinfo/mapserver-users > -------------- next part -------------- > An HTML attachment was scrubbed... > URL: < > http://lists.osgeo.org/pipermail/mapserver-users/attachments/20200625/af1484e5/attachment-0001.html > > > > ------------------------------ > > Message: 3 > Date: Thu, 25 Jun 2020 21:36:58 -0300 > From: Jeff McKenna > To: mapserver-users at lists.osgeo.org > Subject: Re: [mapserver-users] PostGIS query problem > Message-ID: > > Content-Type: text/plain; charset=utf-8; format=flowed > > Hi Fernando, > > I would try using the shp2img utility at the commandline, and set CONFIG > "CPL_DEBUG" "ON" in your mapfile (see > > https://mapserver.org/optimization/debugging.html#step-3-turn-on-cpl-debug-optional) > > and then execute: > > shp2img -m mymap.map -o ttt.png -all_debug 5 > > The full query should be listed there in the response, which you can > then paste into the psql commandline, and manually execute the same > query to your database. > > PS. hello to my friends in Brasil! > > -jeff > > > > -- > Jeff McKenna > MapServer Consulting and Training Services > co-founder of FOSS4G > http://gatewaygeo.com/ > > > On 2020-06-25 5:16 p.m., Fernando Martins Pimenta wrote: > > Hi, > > > > I am using the query below to return a hydrograph of a region (using > > POSTGIS). This query works perfectly when I use it in pgadmin. With the > > mapserver, the connection with the client is lost. It records a query > > that shows no errors in SQL, just shows that the connection has lost. > > Why is that? > > > > DATA "geom FROM ( > > SELECT > > hidro.fid, hidro.name , > > ST_Intersection(gcc.geom, hidro.geom) AS geom > > FROM > > vector.hidrography AS hidro, > > vector.gcc AS gcc > > WHERE ST_Intersects(gcc.geom, hidro.geom) AND gcc.name > > = 'GRANDE' > > ) as subquery USING UNIQUE fid USING SRID=4326" > > > > Thanks in advance > > > > *Fernando Martins Pimenta * > > Graduando em Engenharia de Agrimensura e Cartogr?fica - UFV > > Bacharel em Engenharia de Biossistemas - UFSJ > > > > www.biosfera.dea.ufv.br > > > > > > > > > ------------------------------ > > Message: 4 > Date: Fri, 26 Jun 2020 13:00:31 +0000 > From: "Rousseau Lambert2, Louis-Philippe (EC)" > > To: "mapserver-users at lists.osgeo.org" > > Subject: [mapserver-users] Sliver when displaying 0?-360? NetCDF > data in EPSG:3857 > Message-ID: > > Content-Type: text/plain; charset="iso-8859-1" > > Hi, > > This issue is related to: > > * > https://github.com/mapserver/mapserver/commit/722716c49de2399f54b275ab31437f0e8c92cd63 > * > https://github.com/mapserver/mapserver/commit/4c2aeb4bbd229723d8ea67c337cf02350575b2ae > > The issue is that when I try to visualize (via WMS) a layer with a NetCDF > data file with longitude from 0? to 360? in EPSG:3857, there is a sliver > around longitude 0? where no data is displayed. > > We already had that issue with the same files using EPSG:4326 and it's > been fixed in MapServer (see merge request above). > > Here is where you can find example files: > https://dd.weather.gc.ca/model_giops/netcdf/lat_lon/2d/00/003/CMC_giops_votemper_depth_0.5_latlon0.2x0.2_3h-mean_{yyyymmdd}00_P003.nc > > We are testing using: MapServer version 7.4.4 OUTPUT=PNG OUTPUT=JPEG > OUTPUT=KML SUPPORTS=PROJ SUPPORTS=AGG SUPPORTS=FREETYPE SUPPORTS=CAIRO > SUPPORTS=SVG_SYMBOLS SUPPORTS=RSVG SUPPORTS=ICONV SUPPORTS=FRIBIDI > SUPPORTS=WMS_SERVER SUPPORTS=WMS_CLIENT SUPPORTS=WFS_SERVER > SUPPORTS=WFS_CLIENT SUPPORTS=WCS_SERVER SUPPORTS=SOS_SERVER > SUPPORTS=FASTCGI SUPPORTS=THREADS SUPPORTS=GEOS SUPPORTS=POINT_Z_M > INPUT=JPEG INPUT=POSTGIS INPUT=OGR INPUT=GDAL INPUT=SHAPEFILE > > Here is a minimal mapfile to reproduce: > > MAP > NAME "" > IMAGETYPE PNG > EXTENT -180 -90 180 90 > MAXSIZE 4096 > SIZE 500 300 > IMAGECOLOR 255 255 255 > PROJECTION > "init=epsg:4326" > END > TRANSPARENT ON > DEBUG 5 > WEB > METADATA > "ows_extent" "-180 -90 180 90" > "wms_getmap_formatlist" "image/png,image/jpeg" > "wms_timeformat" "YYYY-MM-DDTHH:MM:SSZ" > "wms_getfeatureinfo_formatlist" "text/plain" > "ows_enable_request" "*" > "ows_abstract" "" > "ows_srs" "EPSG:4326 EPSG:3857" > "ows_title" "" > END > END > LAYER > NAME "TEST" > DEBUG 5 > TYPE RASTER > PROCESSING "GDAL_NETCDF_BOTTOMUP=YES" > TOLERANCE 15 > TEMPLATE "ttt.html" > PROJECTION > "proj=longlat" > "a=6371229" > "b=6371229" > "lon_wrap=180" > "no_defs" > END > DATA '' > METADATA > "ows_title" "" > "ows_abstract" "" > "ows_extent" "-180 -80.1 180 89.9" > "ows_geomtype" "Geometry" > END > CLASS > NAME "" > STYLE > COLORRANGE 0 0 127 127 0 0 > DATARANGE 200.00 400 > END > END > END > END > > -------------- next part -------------- > An HTML attachment was scrubbed... > URL: < > http://lists.osgeo.org/pipermail/mapserver-users/attachments/20200626/09ce9091/attachment.html > > > > ------------------------------ > > Message: 5 > Date: Fri, 26 Jun 2020 17:55:01 +0200 > From: Just van den Broecke > To: mapserver-users at lists.osgeo.org > Subject: [mapserver-users] Problem with Python MapScript queryByRect > Message-ID: <35fd8e93-e9c2-240b-154f-4c231c4c0d00 at gmail.com> > Content-Type: text/plain; charset=utf-8; format=flowed > > Hi, > > I am reviving a Python 2 MapServer MapScript app that used to work 7 > years ago (and still is in old deployment) but stuck in some MapScript > calls that fail but also throw no Exceptions. > > Purpose of the app "MapGlow" [1] is to generate a WMS-heatmap triggered > by specific STYLE parameters. When no heatmap STYLE is requested > requests are delegated to map_file.OWSDispatch() etc. The latter works > fine so the overall setup/stack/mapfile is working. Using MS 7.6.0 in > Docker (compose) with Lighttp, FastCGI, WSGI, flup. > > It is only when layerObj.queryByRect() is called, a HTTP 500 is > returned after a FastCGI hard error, no means to catch an Exception. The > passed MapFile and Rect objects seem ok. Also I noticed that > layerObj.metadata had 0 items. I can see that I have proper SWIG objects > like > 0x7fded06b1de0> > > If only I could get a hint, a MapFile setting, maybe some log output or > debug flag I can set? The WIP is on GH, I can point at the failing line > [2] but the code is > quite involved (mind, my first Python 7-9 years ago): > > [1] https://github.com/justb4/mapglow > [2] > https://github.com/justb4/mapglow/blob/master/app1/wms/mapglow_ms.py#L249 > > Thanks for any help, > > Just van den Broecke > The Netherlands > > > ------------------------------ > > Subject: Digest Footer > > _______________________________________________ > mapserver-users mailing list > mapserver-users at lists.osgeo.org > https://lists.osgeo.org/mailman/listinfo/mapserver-users > > ------------------------------ > > End of mapserver-users Digest, Vol 149, Issue 15 > ************************************************ > -------------- next part -------------- An HTML attachment was scrubbed... URL: From boolean10001 at yahoo.com Mon Jun 29 13:55:48 2020 From: boolean10001 at yahoo.com (Carlos Ruiz) Date: Mon, 29 Jun 2020 20:55:48 +0000 (UTC) Subject: [mapserver-users] PostGIS query problem In-Reply-To: References: Message-ID: <415110643.5525054.1593464148148@mail.yahoo.com> Hola, Fernando, I don't know what's really going on but despite if this is a GDAL error or something else, I suggest you to try the following in the MAP file LAYER section: PROCESSING "CLOSE_CONNECTION=DEFER" Another question: does PostgreSQL server is running in another machine ? MSc. Carlos Ruiz -------------- next part -------------- An HTML attachment was scrubbed... URL: