From MarkVolz at co.lyon.mn.us Thu Dec 1 06:34:57 2022 From: MarkVolz at co.lyon.mn.us (Mark Volz) Date: Thu, 1 Dec 2022 14:34:57 +0000 Subject: [MapServer-users] Possible issue between MapCache WMTS, the new ArcGIS Online Viewer, and the Web App Builder Message-ID: <5ca4c64eabda4002b9dbb0b56c5d24b0@co.lyon.mn.us> Hello, I noticed that MapCache WMTS basemaps do not display in ESRI's Web Application Builder when I create the map in the "New Map Viewer." However, if I create the map with "Map Viewer Classic" then the tiles appear appropriately in the Web Application Builder. ESRI thinks that this is a possible bug on their end, but it also could be a misconfiguration on my end as well. Questions and thoughts: 1. If other people are having this issue then please try using the Map Viewer Classic and has anyone had success with the new map viewer? 2. Please let me know if my configuration below looks appropriate. 3. ESRI asked if I would like to continue debugging this issue. Would any of the developers want to be included in this discussion? Thanks! GoogleBingArcGISCompatible urn:ogc:def:wkss:OGC:1.0:GoogleMapsCompatible -20037508.3427892480 -20037508.3427892480 20037508.3427892480 20037508.3427892480 EPSG:3857 EPSG:900913 m 256 256 156543.0339280410 78271.51696402048 39135.75848201023 19567.87924100512 9783.939620502561 4891.969810251280 2445.984905125640 1222.992452562820 611.4962262814100 305.7481131407048 152.8740565703525 76.43702828517624 38.21851414258813 19.10925707129406 9.554628535647032 4.777314267823516 2.388657133911758 1.194328566955879 0.5971642834779395 0.29858214173896975 0.149291070869484875 0.074645535434742 0.037322767717371 Sincerely, Mark Volz, GISP Lyon County GIS Coordinator Ph: (507) 532-8218 -------------- next part -------------- An HTML attachment was scrubbed... URL: From ijturton at gmail.com Thu Dec 1 07:50:10 2022 From: ijturton at gmail.com (Ian Turton) Date: Thu, 1 Dec 2022 15:50:10 +0000 Subject: [MapServer-users] converting an expression to an OGC filter Message-ID: I currently have an expression in my mapfile EXPRESSION ('[postcode]' ~* '0..$') and I'm in the process of moving to using SLD for styling - I thought I could convert that expression to postcode .*0.. Which I think should match from the start of the string (.*) to a 0 and then two characters (..) to the end of the string. But it doesn't work - neither does any variant on this work either. Is there some issue with conversions between SLD Filters and internal expressions that I'm missing or is there something else I should know about LIKE filters? Thanks Ian -- Ian Turton -------------- next part -------------- An HTML attachment was scrubbed... URL: From ijturton at gmail.com Fri Dec 2 01:47:58 2022 From: ijturton at gmail.com (Ian Turton) Date: Fri, 2 Dec 2022 09:47:58 +0000 Subject: [MapServer-users] converting an expression to an OGC filter In-Reply-To: References: Message-ID: On Thu, 1 Dec 2022 at 22:13, Lime, Steve D (MNIT) wrote: > Hi Ian: What?s the backend (e.g. shapefile, PostGIS, etc?)? MapServer > expressions don?t support a wildcard operator (outside of a regex) so I?m > not sure off the top of my head and things may vary by driver. > It's a postgis database on the backend, the original expression works fine but not when it's input as an OGC expression. Ian > > > --Steve > > > > *From:* MapServer-users *On > Behalf Of *Ian Turton > *Sent:* Thursday, December 1, 2022 9:50 AM > *To:* mapserver-users at lists.osgeo.org > *Subject:* [MapServer-users] converting an expression to an OGC filter > > > > I currently have an expression in my mapfile EXPRESSION ('[postcode]' ~* > '0..$') and I'm in the process of moving to using SLD for styling - I > thought I could convert that expression to > > > > > > postcode > > .*0.. > > > > Which I think should match from the start of the string (.*) to a 0 and then two characters (..) to the end of the string. But it doesn't work - neither does any variant on this work either. > > Is there some issue with conversions between SLD Filters and internal expressions that I'm missing or is there something else I should know about LIKE filters? > > Thanks > > > > Ian > > -- > > Ian Turton > -- Ian Turton -------------- next part -------------- An HTML attachment was scrubbed... URL: From Andreas.Eichner at sid.sachsen.de Fri Dec 2 06:45:00 2022 From: Andreas.Eichner at sid.sachsen.de (Eichner, Andreas - SID) Date: Fri, 2 Dec 2022 14:45:00 +0000 Subject: [MapServer-users] converting an expression to an OGC filter In-Reply-To: References: Message-ID: <1223469d185c428b82dce418eed11f8f@sid.sachsen.de> Your pattern seems to be wrong. You originally used a case insensitive regex 0..$ meaning a value shall end with a '0' and to other arbitrary characters. Your PropertyIsLike filter is translated into an SQL "like": (for Postgres) postcode::text ilike '_%0__' meaning a string as a whole shall consist of an arbitrary character followed by zero or more arbitrary characters followed by a '0' and two additional arbitrary characters. The corresponding regex would look like ^..*0..$ So I guess you would like want to use *0.. as pattern: postcode *0.. Regards, Andreas -----Urspr?ngliche Nachricht----- Von: MapServer-users Im Auftrag von Ian Turton Gesendet: Freitag, 2. Dezember 2022 10:48 An: steve.lime at state.mn.us; mapserver-users at lists.osgeo.org Betreff: Re: [MapServer-users] converting an expression to an OGC filter On Thu, 1 Dec 2022 at 22:13, Lime, Steve D (MNIT) > wrote: Hi Ian: What?s the backend (e.g. shapefile, PostGIS, etc?)? MapServer expressions don?t support a wildcard operator (outside of a regex) so I?m not sure off the top of my head and things may vary by driver. It's a postgis database on the backend, the original expression works fine but not when it's input as an OGC expression. Ian --Steve From: MapServer-users > On Behalf Of Ian Turton Sent: Thursday, December 1, 2022 9:50 AM To: mapserver-users at lists.osgeo.org Subject: [MapServer-users] converting an expression to an OGC filter I currently have an expression in my mapfile EXPRESSION ('[postcode]' ~* '0..$') and I'm in the process of moving to using SLD for styling - I thought I could convert that expression to postcode .*0.. Which I think should match from the start of the string (.*) to a 0 and then two characters (..) to the end of the string. But it doesn't work - neither does any variant on this work either. Is there some issue with conversions between SLD Filters and internal expressions that I'm missing or is there something else I should know about LIKE filters? Thanks Ian -- Ian Turton -- Ian Turton -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/x-pkcs7-signature Size: 2500 bytes Desc: not available URL: From mniemyjski at cloudferro.com Fri Dec 2 06:46:13 2022 From: mniemyjski at cloudferro.com (Marcin Niemyjski) Date: Fri, 2 Dec 2022 14:46:13 +0000 Subject: [MapServer-users] Mapserver on k8s weird behaviour Message-ID: Hello, I am using Mapserver on Kubernetes (LoadBalancer). Everything works great - GetMap, GetCapabilities, layers load correctly in QGIS and Leaflet. However, what caught my attention is that when passing the mapfile's url using LoadBalancer/Kubernetes IP, only the first time the message is msLoadMap(): Regular expression error. MS_DEFAULT_MAPFILE_PATTERN validation failed and every time thereafter Internal Server Error The server encountered an internal error or misconfiguration and was unable to complete your request. By refreshing a few times, you may get the expected message again, but this is random. As I mentioned - layers and requests load correctly everywhere (also after repeated refreshing). Should I be concerned? I would love to understand why is this happening ^^ Sample mapfile (but problem occured on all those tested): https://pastecode.io/s/pfaudfef As always - thank you, Marcin -------------- next part -------------- An HTML attachment was scrubbed... URL: From steve.lime at state.mn.us Fri Dec 2 07:23:42 2022 From: steve.lime at state.mn.us (Lime, Steve D (MNIT)) Date: Fri, 2 Dec 2022 15:23:42 +0000 Subject: [MapServer-users] Mapserver on k8s weird behaviour In-Reply-To: References: Message-ID: Hi Marcin: Are you using FastCGI? Which version of MapServer? We ran into something similar w/FastCGI and version 8 during development where you'd see the first instance of an error message but then the server error subsequently. It was consistent on some setups but never happened on others. You could try applying the fix (see https://github.com/MapServer/MapServer/pull/6577) locally and see if that fixes things. It will be backported to the 7.6 branch in the near future. --Steve From: MapServer-users On Behalf Of Marcin Niemyjski via MapServer-users Sent: Friday, December 2, 2022 8:46 AM To: Marcin Niemyjski via MapServer-users Subject: [MapServer-users] Mapserver on k8s weird behaviour Hello, I am using Mapserver on Kubernetes (LoadBalancer). Everything works great - GetMap, GetCapabilities, layers load correctly in QGIS and Leaflet. However, what caught my attention is that when passing the mapfile's url using LoadBalancer/Kubernetes IP, only the first time the message is msLoadMap(): Regular expression error. MS_DEFAULT_MAPFILE_PATTERN validation failed and every time thereafter Internal Server Error The server encountered an internal error or misconfiguration and was unable to complete your request. By refreshing a few times, you may get the expected message again, but this is random. As I mentioned - layers and requests load correctly everywhere (also after repeated refreshing). Should I be concerned? I would love to understand why is this happening ^^ Sample mapfile (but problem occured on all those tested): https://pastecode.io/s/pfaudfef As always - thank you, Marcin -------------- next part -------------- An HTML attachment was scrubbed... URL: From mniemyjski at cloudferro.com Fri Dec 2 07:32:51 2022 From: mniemyjski at cloudferro.com (Marcin Niemyjski) Date: Fri, 2 Dec 2022 15:32:51 +0000 Subject: [MapServer-users] Mapserver on k8s weird behaviour In-Reply-To: References: Message-ID: Steve, I'm using Mapserver 8 from camptocamp/mapserver https://hub.docker.com/r/camptocamp/mapserver Best, Marcin ________________________________ From: Lime, Steve D (MNIT) Sent: Friday, December 2, 2022 4:23 PM To: Marcin Niemyjski ; Marcin Niemyjski via MapServer-users Subject: RE: Mapserver on k8s weird behaviour Hi Marcin: Are you using FastCGI? Which version of MapServer? We ran into something similar w/FastCGI and version 8 during development where you?d see the first instance of an error message but then the server error subsequently. It was consistent on some setups but never happened on others. You could try applying the fix (see https://github.com/MapServer/MapServer/pull/6577) locally and see if that fixes things. It will be backported to the 7.6 branch in the near future. --Steve From: MapServer-users On Behalf Of Marcin Niemyjski via MapServer-users Sent: Friday, December 2, 2022 8:46 AM To: Marcin Niemyjski via MapServer-users Subject: [MapServer-users] Mapserver on k8s weird behaviour Hello, I am using Mapserver on Kubernetes (LoadBalancer). Everything works great - GetMap, GetCapabilities, layers load correctly in QGIS and Leaflet. However, what caught my attention is that when passing the mapfile's url using LoadBalancer/Kubernetes IP, only the first time the message is msLoadMap(): Regular expression error. MS_DEFAULT_MAPFILE_PATTERN validation failed and every time thereafter Internal Server Error The server encountered an internal error or misconfiguration and was unable to complete your request. By refreshing a few times, you may get the expected message again, but this is random. As I mentioned - layers and requests load correctly everywhere (also after repeated refreshing). Should I be concerned? I would love to understand why is this happening ^^ Sample mapfile (but problem occured on all those tested): https://pastecode.io/s/pfaudfef As always - thank you, Marcin -------------- next part -------------- An HTML attachment was scrubbed... URL: From steve.lime at state.mn.us Fri Dec 2 08:16:45 2022 From: steve.lime at state.mn.us (Lime, Steve D (MNIT)) Date: Fri, 2 Dec 2022 16:16:45 +0000 Subject: [MapServer-users] Mapserver on k8s weird behaviour In-Reply-To: References: Message-ID: Based on that error message you're not running MapServer 8.0 though. That was an area that changed between v.7 and v.8 and the error message was updated. V.8 outputs something like: msLoadMap(): Regular expression error. Filename validation failed. --Steve From: Marcin Niemyjski Sent: Friday, December 2, 2022 9:33 AM To: Lime, Steve D (MNIT) ; Marcin Niemyjski via MapServer-users Subject: Re: Mapserver on k8s weird behaviour Steve, I'm using Mapserver 8 from camptocamp/mapserver https://hub.docker.com/r/camptocamp/mapserver Best, Marcin ________________________________ From: Lime, Steve D (MNIT) > Sent: Friday, December 2, 2022 4:23 PM To: Marcin Niemyjski >; Marcin Niemyjski via MapServer-users > Subject: RE: Mapserver on k8s weird behaviour Hi Marcin: Are you using FastCGI? Which version of MapServer? We ran into something similar w/FastCGI and version 8 during development where you'd see the first instance of an error message but then the server error subsequently. It was consistent on some setups but never happened on others. You could try applying the fix (see https://github.com/MapServer/MapServer/pull/6577) locally and see if that fixes things. It will be backported to the 7.6 branch in the near future. --Steve From: MapServer-users > On Behalf Of Marcin Niemyjski via MapServer-users Sent: Friday, December 2, 2022 8:46 AM To: Marcin Niemyjski via MapServer-users > Subject: [MapServer-users] Mapserver on k8s weird behaviour Hello, I am using Mapserver on Kubernetes (LoadBalancer). Everything works great - GetMap, GetCapabilities, layers load correctly in QGIS and Leaflet. However, what caught my attention is that when passing the mapfile's url using LoadBalancer/Kubernetes IP, only the first time the message is msLoadMap(): Regular expression error. MS_DEFAULT_MAPFILE_PATTERN validation failed and every time thereafter Internal Server Error The server encountered an internal error or misconfiguration and was unable to complete your request. By refreshing a few times, you may get the expected message again, but this is random. As I mentioned - layers and requests load correctly everywhere (also after repeated refreshing). Should I be concerned? I would love to understand why is this happening ^^ Sample mapfile (but problem occured on all those tested): https://pastecode.io/s/pfaudfef As always - thank you, Marcin -------------- next part -------------- An HTML attachment was scrubbed... URL: From bahbouba.909 at gmail.com Sun Dec 4 17:42:21 2022 From: bahbouba.909 at gmail.com (Boubacar Bah) Date: Mon, 5 Dec 2022 02:42:21 +0100 Subject: [MapServer-users] asking help Message-ID: hi everyone i would like to make a cgi proxy for openlayer ProxyHost from ms4w here is the code link of my source code: https://pastebin.com/y32K2qdK I don't know what is missing in this code. when I file error I see the following message:* [cgi:error] [pid 6660:tid 224] [client 127.0.0.1:58543 ] Premature end of script headers: proxy.cgi* I do not know what to do anymore; I really need your help thank you in advance. -------------- next part -------------- An HTML attachment was scrubbed... URL: From bfraser at geoanalytic.com Mon Dec 5 06:10:58 2022 From: bfraser at geoanalytic.com (Brent Fraser) Date: Mon, 5 Dec 2022 07:10:58 -0700 Subject: [MapServer-users] asking help In-Reply-To: References: Message-ID: Try adding two newlines to the end of your "Content-Type" headers like print ("Content-Type: text/plain\n\n") ---------------------------------------- From: "Boubacar Bah" Sent: 12/4/22 6:57 PM To: mapserver-users at lists.osgeo.org Subject: [MapServer-users] asking help hi everyone i would like to make a cgi proxy for openlayer ProxyHost from ms4w here is the code link of my source code: https://pastebin.com/y32K2qdK I don't know what is missing in this code. when I file error I see the following message: [cgi:error] [pid 6660:tid 224] [client 127.0.0.1:58543] Premature end of script headers: proxy.cgi I do not know what to do anymore; I really need your help thank you in advance. -------------- next part -------------- An HTML attachment was scrubbed... URL: From mniemyjski at cloudferro.com Tue Dec 6 09:18:27 2022 From: mniemyjski at cloudferro.com (Marcin Niemyjski) Date: Tue, 6 Dec 2022 17:18:27 +0000 Subject: [MapServer-users] Problems with vrt created from GCP raster Message-ID: Hello, up to now, I have been working with VRT as a carrier for the rasters I wanted to use in the mapfile. Now in order to use the rasters that were provided to me (they are GCP georeferenced rasters) I have to convert them to VRT (via gdal warp), hence my question - how can I mosaic the rasters within one layer in Mapserver (one layer = one day of photos from Sentinel-2 for example). I can't create vrt to existing vrt, and creating a tileindex for each layer generates too many files. I wanted to create one vrt gathering together all of raster but gdal_warp uses only the first one as data source. What can I do? Best regards, Marcin -------------- next part -------------- An HTML attachment was scrubbed... URL: From public at postholer.com Tue Dec 6 09:39:00 2022 From: public at postholer.com (Scott) Date: Tue, 6 Dec 2022 09:39:00 -0800 Subject: [MapServer-users] Problems with vrt created from GCP raster In-Reply-To: References: Message-ID: My "first is worst" suggestion would be to create a .vrt for each day: gdalbuildvrt Day1.vrt [date]*.tif gdalbuildvrt Day2.vrt [date]*.tif ... Next, in your .map file use runtime substitution: DATA "/file/path/Day%day%.vrt" If you really want to make this fast, convert all your source .tif's to format COG. All you tif's will be tiled: gdalwarp -f COG -co COMPRESS=DEFLATE -co BIGTIFF=YES sent.tif sent_cog.tif On 12/6/22 09:18, Marcin Niemyjski via MapServer-users wrote: > Hello, > > up to now, I have been working with VRT as a carrier for the rasters I > wanted to use in the mapfile. Now in order to use the rasters that were > provided to me (they are GCP georeferenced rasters) I have to convert > them to VRT(via gdal warp), hence my question - how can I mosaic the > rasters within one layer in Mapserver (one layer = one day of photos > from Sentinel-2 for example). I can't create vrt to existing vrt, and > creating a tileindex for each layer generates too many files. I wanted > to create one vrt gathering together all of raster but gdal_warp uses > only the first one as data source. > > What can I do? > > Best regards, > Marcin > > > > _______________________________________________ > MapServer-users mailing list > MapServer-users at lists.osgeo.org > https://lists.osgeo.org/mailman/listinfo/mapserver-users From mniemyjski at cloudferro.com Tue Dec 6 10:07:53 2022 From: mniemyjski at cloudferro.com (Marcin Niemyjski) Date: Tue, 6 Dec 2022 18:07:53 +0000 Subject: [MapServer-users] Problems with vrt created from GCP raster In-Reply-To: References: Message-ID: Scott, 1. gdalbuildvrt doesnt work with raster georeferenced by ground control points. Thats why I am using gdal warp -> https://gis.stackexchange.com/questions/283595/transform-rectify-unprojected-raster-using-target-extent-co-ordinates 2. Source files are already in cloud optimized format Do you have any other ideas? Best, Marcin Wysy?ane z aplikacji Outlook dla systemu iOS ________________________________ Od: MapServer-users w imieniu u?ytkownika Scott Wys?ane: Tuesday, December 6, 2022 6:39:00 PM Do: mapserver-users at lists.osgeo.org Temat: Re: [MapServer-users] Problems with vrt created from GCP raster My "first is worst" suggestion would be to create a .vrt for each day: gdalbuildvrt Day1.vrt [date]*.tif gdalbuildvrt Day2.vrt [date]*.tif ... Next, in your .map file use runtime substitution: DATA "/file/path/Day%day%.vrt" If you really want to make this fast, convert all your source .tif's to format COG. All you tif's will be tiled: gdalwarp -f COG -co COMPRESS=DEFLATE -co BIGTIFF=YES sent.tif sent_cog.tif On 12/6/22 09:18, Marcin Niemyjski via MapServer-users wrote: > Hello, > > up to now, I have been working with VRT as a carrier for the rasters I > wanted to use in the mapfile. Now in order to use the rasters that were > provided to me (they are GCP georeferenced rasters) I have to convert > them to VRT(via gdal warp), hence my question - how can I mosaic the > rasters within one layer in Mapserver (one layer = one day of photos > from Sentinel-2 for example). I can't create vrt to existing vrt, and > creating a tileindex for each layer generates too many files. I wanted > to create one vrt gathering together all of raster but gdal_warp uses > only the first one as data source. > > What can I do? > > Best regards, > Marcin > > > > _______________________________________________ > 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 public at postholer.com Tue Dec 6 10:19:19 2022 From: public at postholer.com (Scott) Date: Tue, 6 Dec 2022 10:19:19 -0800 Subject: [MapServer-users] Problems with vrt created from GCP raster In-Reply-To: References: Message-ID: The only thing I can think of is create an entirely new .tif from your gcp .tif, then it shouldn't be a problem. However, this could result a very large set of new sentinel tifs. Bad. On 12/6/22 10:07, Marcin Niemyjski wrote: > Scott, > > 1. gdalbuildvrt doesnt work with raster georeferenced by ground control > points. Thats why I am using gdal warp -> > https://gis.stackexchange.com/questions/283595/transform-rectify-unprojected-raster-using-target-extent-co-ordinates > 2. Source files are already in cloud optimized format > > Do you have any other ideas? > > Best, > Marcin > > Wysy?ane z aplikacji Outlook dla systemu iOS > ------------------------------------------------------------------------ > *Od:* MapServer-users w > imieniu u?ytkownika Scott > *Wys?ane:* Tuesday, December 6, 2022 6:39:00 PM > *Do:* mapserver-users at lists.osgeo.org > *Temat:* Re: [MapServer-users] Problems with vrt created from GCP raster > My "first is worst" suggestion would be to create a .vrt for each day: > > gdalbuildvrt Day1.vrt [date]*.tif > gdalbuildvrt Day2.vrt [date]*.tif > ... > > Next, in your .map file use runtime substitution: > > DATA "/file/path/Day%day%.vrt" > > If you really want to make this fast, convert all your source .tif's to > format COG. All you tif's will be tiled: > > gdalwarp -f COG -co COMPRESS=DEFLATE -co BIGTIFF=YES sent.tif sent_cog.tif > > > > On 12/6/22 09:18, Marcin Niemyjski via MapServer-users wrote: >> Hello, >> >> up to now, I have been working with VRT as a carrier for the rasters I >> wanted to use in the mapfile. Now in order to use the rasters that were >> provided to me (they are GCP georeferenced rasters) I have to convert >> them to VRT(via gdal warp), hence my question - how can I mosaic the >> rasters within one layer in Mapserver (one layer = one day of photos >> from Sentinel-2 for example). I can't create vrt to existing vrt, and >> creating a tileindex for each layer generates too many files. I wanted >> to create one vrt gathering together all of raster but gdal_warp uses >> only the first one as data source. >> >> What can I do? >> >> Best regards, >> Marcin >> >> >> >> _______________________________________________ >> 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 pschmitt at gmail.com Tue Dec 6 10:39:26 2022 From: pschmitt at gmail.com (Peter Schmitt) Date: Tue, 6 Dec 2022 11:39:26 -0700 Subject: [MapServer-users] How do I use an SQL query in a Postgis tileindex of vector files? Message-ID: Hi, How do I get a tileindex of vector files working from data in a Postgis database and accessed via an SQL query of my choosing? I would like to make a vector tile index as described at https://mapserver.org/optimization/vector.html#index-your-data using data stored in a Postgis database and a SQL query of my choosing. Here is one approach that works: 1. create a test table in postgres database: > create table testtable (id int, location text, geom geometry(Polygon,4326)); 2. insert data into the table: insert into testtable (id, location, geom) values (1, '/test_data/test.geojson,0', 'POLYGON((122.01377475333321 29.96355712017804,122.01424752183958 29.915620560607106,122.06927507957919 29.91602043815968,122.0688286928125 29.963957768165944,122.01377475333321 29.96355712017804))'::geometry); 3. Define a layer using the OGR connection: LAYER NAME "vector" TYPE POLYGON CONNECTIONTYPE OGR CONNECTION "PG:\"host=localhost user=postgres dbname=mydatabase password=mypwd tables=testtable(geom)\"" STATUS OFF CLASS STYLE WIDTH 1 OUTLINECOLOR 255 105 180 END END END 4. Issue a request: mapserv QUERY_STRING='SERVICE=WMS&map=/tmpp/mapfile.map&VERSION=1.3.0&REQUEST=GetMap&FORMAT=image/png&layers=vector&width=256&height=256&crs=EPSG:3857&bbox=13580108.193257555,3487974.474709164,13585000.163067807,3492866.4445194146' and I get an image of my vectors back. How do I use a more complex query than `testtable(geom)`? I tried specifying a query via a DATA block: LAYER NAME "vector" TYPE POLYGON CONNECTIONTYPE OGR CONNECTION "PG:\"host=localhost user=postgres dbname=mydatabase password=mypwd\"" DATA "geom FROM (SELECT id, geom, location FROM testtable ) AS subquery USING unique id USING SRID=4326" PROJECTION "init=epsg:4326" END STATUS OFF CLASS STYLE WIDTH 1 OUTLINECOLOR 255 105 180 END END END However, the same query generates an error: mapserv QUERY_STRING='SERVICE=WMS&map=/tmpp/mapfile.map&VERSION=1.3.0&REQUEST=GetMap&FORMAT=image/png&layers=vector&width=256&height=256&crs=EPSG:3857&bbox=13580108.193257555,3487974.474709164,13585000.163067807,3492866.4445194146' "msOGRFileOpen(): OGR error. Open failed for OGR connection in layer `vector'. File not found or unsupported format. Check server logs. msDrawMap(): Image handling error. Failed to draw layer named 'vector'" I tried using a postgis connectiontype, but could not get that working either https://mapserver.org/mapfile/layer.html#mapfile-layer-connectiontype How do I get a tileindex of vector files working from data in a Postgis database and accessed via an SQL query of my choosing? Thanks! Pete -------------- next part -------------- An HTML attachment was scrubbed... URL: From public at postholer.com Tue Dec 6 10:45:03 2022 From: public at postholer.com (Scott) Date: Tue, 6 Dec 2022 10:45:03 -0800 Subject: [MapServer-users] How do I use an SQL query in a Postgis tileindex of vector files? In-Reply-To: References: Message-ID: <700a71b9-1df2-5cb0-1db1-0e45fe36d32c@postholer.com> Your connectiontype is ogr, you need postgis for a query CONNECTIONTYPE POSTGIS On 12/6/22 10:39, Peter Schmitt wrote: > Hi, > > How do I get a tileindex of vector files working from data in a Postgis > database and accessed via an SQL query of my choosing? > > I would like to make a vector tile index as described at > https://mapserver.org/optimization/vector.html#index-your-data > using > data stored in a Postgis database and a SQL query of my choosing.? Here > is one approach that works: > > 1.? create a test table in postgres database: > ? ? ?> create table testtable (id int, location text, geom > geometry(Polygon,4326)); > > 2.? insert data into the table: > > ? ? ?insert into testtable (id, location, geom) values (1, > '/test_data/test.geojson,0', 'POLYGON((122.01377475333321 > 29.96355712017804,122.01424752183958 > 29.915620560607106,122.06927507957919 > 29.91602043815968,122.0688286928125 > 29.963957768165944,122.01377475333321 29.96355712017804))'::geometry); > > 3. Define a layer using the OGR connection: > > LAYER > ? NAME "vector" > ? TYPE POLYGON > ? CONNECTIONTYPE OGR > ? CONNECTION "PG:\"host=localhost user=postgres dbname=mydatabase > password=mypwd tables=testtable(geom)\"" > ? STATUS OFF > ? CLASS > ? ? STYLE > ? ? ? WIDTH 1 > ? ? ? OUTLINECOLOR 255 105 180 > ? ? END > ? END > END > > 4. Issue a request: > > ? ? mapserv > QUERY_STRING='SERVICE=WMS&map=/tmpp/mapfile.map&VERSION=1.3.0&REQUEST=GetMap&FORMAT=image/png&layers=vector&width=256&height=256&crs=EPSG:3857&bbox=13580108.193257555,3487974.474709164,13585000.163067807,3492866.4445194146' > > and I get an image of my vectors back. > > How do I use a more complex query than `testtable(geom)`?? I tried > specifying a query via a DATA block: > > LAYER > ? ? NAME "vector" > ? ? TYPE POLYGON > ? ? CONNECTIONTYPE OGR > ? ? CONNECTION "PG:\"host=localhost user=postgres dbname=mydatabase > password=mypwd\"" > ? ? DATA "geom FROM (SELECT > ? ? ? ? id, > ? ? ? ? geom, > ? ? ? ? location > ? ? ? FROM testtable > ? ? ) AS subquery USING unique id USING SRID=4326" > ? ? PROJECTION > ? ? ? "init=epsg:4326" > ? ? END > ? ? STATUS OFF > ? ? CLASS > ? ? ? STYLE > ? ? ? ? WIDTH 1 > ? ? ? ? OUTLINECOLOR 255 105 180 > ? ? ? END > ? ? END > ? END > > However, the same query generates an error: > > mapserv > QUERY_STRING='SERVICE=WMS&map=/tmpp/mapfile.map&VERSION=1.3.0&REQUEST=GetMap&FORMAT=image/png&layers=vector&width=256&height=256&crs=EPSG:3857&bbox=13580108.193257555,3487974.474709164,13585000.163067807,3492866.4445194146' > > "msOGRFileOpen(): OGR error. Open failed for OGR connection in layer > `vector'.? File not found or unsupported format. Check server logs. > msDrawMap(): Image handling error. Failed to draw layer named 'vector'" > > I tried using a postgis connectiontype, but could not get that working > either > https://mapserver.org/mapfile/layer.html#mapfile-layer-connectiontype > > > How do I get a tileindex of vector files working from data in a Postgis > database and accessed via an SQL query of my choosing? > > Thanks! > Pete > > _______________________________________________ > MapServer-users mailing list > MapServer-users at lists.osgeo.org > https://lists.osgeo.org/mailman/listinfo/mapserver-users From pe_lord at protonmail.com Tue Dec 6 11:46:27 2022 From: pe_lord at protonmail.com (PE Lord) Date: Tue, 06 Dec 2022 19:46:27 +0000 Subject: [MapServer-users] WFS output geojson - missing column with null values Message-ID: I runmapserver7.6.4 compiled with gdal 3.2.1. When I output various formats (CSV/KML/GPKG) from my layer (gpkg based), the requested features are properly returned. In the case of an ogroutput in geojson format, some of mycolumns are not returned.The missing column are those with null values. Here myOUTPUTFORMAT definition #============================================== END OUTPUTFORMAT NAME "geojson" DRIVER "OGR/GEOJSON" FORMATOPTION "LCO:COORDINATE_PRECISION=15" FORMATOPTION "LCO:WRITE_BBOX=YES" FORMATOPTION "STORAGE=memory" FORMATOPTION "FORM=simple" FORMATOPTION "USE_FEATUREID=true" FORMATOPTION "FILENAME=%outfile%.geojson" MIMETYPE "application/geo+json" #=============================================== I've tested with these 2 additionnal properties without any success....FORMATOPTION "LCO:WRITE_NON_FINITE_VALUES=YES" FORMATOPTION "LCO:RFC7946=YES" i've also tried with gml_types auto or gml_val_cam_annee_1 Character (or Real) without success. Here 2 links with the current issue. - wfs output (geojson) with missing column --> https://ws.mapserver.transports.gouv.qc.ca/swtq?outfile=requestedColumnIsMissing&service=wfs&version=2.0.0&request=getfeature&typename=ms:circulation_routier&outputformat=geojson&srsname=EPSG:4326&count=1&propertyName=val_cam_annee_1 - wfs output (kml) with requested column --> https://ws.mapserver.transports.gouv.qc.ca/swtq?outfile=requestedcolumIsPresent&service=wfs&version=2.0.0&request=getfeature&typename=ms:circulation_routier&outputformat=kml&srsname=EPSG:4326&count=1&propertyName=val_cam_annee_1 I've found a workaround, I declare a sql syntax with a coalesce(field,'') ... but I look for a proper fix. I will probably push this fix on december 7. Here the getfeature responses: - circulation_routier ..... - { "type": "FeatureCollection", "name": "circulation_routier", "bbox": [ -72.5617697276407, 45.6593622104288, -72.4990762933546, 45.7595067353991 ], "features": [ { "type": "Feature", "id": 1, "properties": { }, "bbox": [ ... ], "geometry": { "type": "LineString", "coordinates": [ ... ] } } ]} PE -------------- next part -------------- An HTML attachment was scrubbed... URL: From pschmitt at gmail.com Tue Dec 6 15:56:05 2022 From: pschmitt at gmail.com (Peter Schmitt) Date: Tue, 6 Dec 2022 16:56:05 -0700 Subject: [MapServer-users] Vector tileindex with connectiontype OGR Message-ID: Hi, How do I get a vector tileindex working with another Mapserver layer as the tileindex? I have the following tindex.geojson: { "type":"FeatureCollection","features":[{"type":"Feature","properties":{"location":"/app/mapfiles/test.geojson"},"geometry":{"type":"Polygon","coordinates":[[[122.013774753,29.96355712],[122.014247522,29.915620561],[122.06927508,29.916020438],[122.068828693,29.963957768],[122.013774753,29.96355712]]]}}]} Which points to a single file /app/mapfiles/test.geojson: {"type":"Feature","properties":{},"geometry":{"coordinates":[[[122.04067791363536,29.944772490597998],[122.03620089848994,29.94141730774004],[122.03819740524398,29.937852301951125],[122.0446709271447,29.938166866424368],[122.04648593328471,29.940211511256464],[122.04067791363536,29.944772490597998]]],"type":"Polygon"}} I would like to define the TILEINDEX as one MapServer Layer and have another MapServer layer reference that tile index. I tried this layer: LAYER NAME "vector_via_ogr" TYPE POLYGON TILEINDEX tindex_ogr CONNECTIONTYPE OGR STATUS OFF END but when I run `mapserv -nh QUERY_STRING='service=WFS&VERSION=1.0.0&REQUEST=getfeature&map=/app/mapfiles/test2.map&typename=vector_via_ogr&OUTPUTFORMAT=geojson'`, I get the following error: "msOGRFileOpen(): OGR error. Open failed for OGR connection in layer `vector_via_ogr'. File not found or unsupported format. Check server logs." If I run without CONNECTIONTYPE OGR, I get the following error: "msTiledSHPOpenFile(): Shapefile error. Tileindex layer must be a shapefile." I can get a similar thing working for a TILEINDEX of rasters. However I cannot get it working on a TILEINDEX of vectors. The example below is the simplest reproduce case I could create. Ultimately I plan on having a TILEINDEX point to a layer of defined via CONNECTIONTYPE postgis. How do I get a vector tileindex working with another Mapserver layer as the tileindex? Thanks! Pete Full mapfile below with example commands reproducing my errors. MAP OUTPUTFORMAT NAME "geojson" DRIVER "OGR/GEOJSON" MIMETYPE "application/json; subtype=geojson" FORMATOPTION "STORAGE=memory" FORMATOPTION "FORM=SIMPLE" FORMATOPTION "LCO:RFC7946=NO" FORMATOPTION "FILENAME=result.json" END WEB METADATA "ows_enable_request" "*" "wfs_getfeature_formatlist" "ogrgml,geojson" END END CONFIG "MS_ERRORFILE" "stderr" PROJECTION "init=epsg:4326" END DEBUG 5 # mapserv -nh QUERY_STRING='service=WFS&VERSION=1.0.0&REQUEST=getfeature&map=/app/mapfiles/test2.map&typename=vector_directly&OUTPUTFORMAT=geojson' # returns the contents of 'test.geojson'! LAYER NAME "vector_directly" TYPE POLYGON TILEINDEX "/app/mapfiles/tindex.geojson" CONNECTIONTYPE OGR STATUS OFF END # mapserv -nh QUERY_STRING='service=WFS&VERSION=1.0.0&REQUEST=getfeature&map=/app/mapfiles/test2.map&typename=tindex_ogr&OUTPUTFORMAT=geojson' # returns contents of tindex.geojson! LAYER NAME "tindex_ogr" TYPE POLYGON CONNECTIONTYPE OGR CONNECTION "/app/mapfiles/tindex.geojson" STATUS OFF END # mapserv -nh QUERY_STRING='service=WFS&VERSION=1.0.0&REQUEST=getfeature&map=/app/mapfiles/test2.map&typename=vector_tindex&OUTPUTFORMAT=geojson' # returns 'msTiledSHPOpenFile(): Shapefile error. Tileindex layer must be a shapefile.' LAYER NAME "vector_via_tindex" TYPE POLYGON TILEINDEX tindex_ogr STATUS OFF END # mapserv -nh QUERY_STRING='service=WFS&VERSION=1.0.0&REQUEST=getfeature&map=/app/mapfiles/test2.map&typename=vector_via_ogr&OUTPUTFORMAT=geojson' # returns 'msOGRFileOpen(): OGR error. Open failed for OGR connection in layer `vector_via_ogr'. File not found or unsupported format. Check server logs.' LAYER NAME "vector_via_ogr" TYPE POLYGON TILEINDEX tindex_ogr CONNECTIONTYPE OGR STATUS OFF END END # mapfile -------------- next part -------------- An HTML attachment was scrubbed... URL: From lars.schylberg at saabgroup.com Wed Dec 7 00:16:46 2022 From: lars.schylberg at saabgroup.com (Schylberg Lars) Date: Wed, 7 Dec 2022 08:16:46 +0000 Subject: [MapServer-users] [EXTERNAL] Vector tileindex with connectiontype OGR In-Reply-To: References: Message-ID: <0c6ff3ba957a4736b3376dc7052a9ce2@saabgroup.com> Hi, I remember that I did tileindexes for vector layers a couple of years ago. I can?t find my example right now, but I think I was following this example for raster. The important thing is to have a one layer for the actual tile index, that has status off and one layer that is using the tile index layer. In my case I did it with sqlite if remember correctly. I believe I was following this example for raster, but did it with vector data. https://github.com/mapserver/mapserver/wiki/MapServer-TILEINDEXes-with-Database-RASTERS https://lists.osgeo.org/pipermail/mapserver-users/2014-August/076877.html Have fun / Lars Schyberg From: MapServer-users On Behalf Of Peter Schmitt Sent: den 7 december 2022 00:56 To: Mapserver-Users (mapserver-users at lists.osgeo.org) Subject: [EXTERNAL] [MapServer-users] Vector tileindex with connectiontype OGR Hi, How do I get a vector tileindex working with another Mapserver layer as the tileindex? I have the following tindex.geojson: { "type":"FeatureCollection","features":[{"type":"Feature","properties":{"location":"/app/mapfiles/test.geojson"},"geometry":{"type":"Polygon","coordinates":[[[122.013774753,29.96355712],[122.014247522,29.915620561],[122.06927508,29.916020438],[122.068828693,29.963957768],[122.013774753,29.96355712]]]}}]} Which points to a single file /app/mapfiles/test.geojson: {"type":"Feature","properties":{},"geometry":{"coordinates":[[[122.04067791363536,29.944772490597998],[122.03620089848994,29.94141730774004],[122.03819740524398,29.937852301951125],[122.0446709271447,29.938166866424368],[122.04648593328471,29.940211511256464],[122.04067791363536,29.944772490597998]]],"type":"Polygon"}} I would like to define the TILEINDEX as one MapServer Layer and have another MapServer layer reference that tile index. I tried this layer: LAYER NAME "vector_via_ogr" TYPE POLYGON TILEINDEX tindex_ogr CONNECTIONTYPE OGR STATUS OFF END but when I run `mapserv -nh QUERY_STRING='service=WFS&VERSION=1.0.0&REQUEST=getfeature&map=/app/mapfiles/test2.map&typename=vector_via_ogr&OUTPUTFORMAT=geojson'`, I get the following error: "msOGRFileOpen(): OGR error. Open failed for OGR connection in layer `vector_via_ogr'. File not found or unsupported format. Check server logs." If I run without CONNECTIONTYPE OGR, I get the following error: "msTiledSHPOpenFile(): Shapefile error. Tileindex layer must be a shapefile." I can get a similar thing working for a TILEINDEX of rasters. However I cannot get it working on a TILEINDEX of vectors. The example below is the simplest reproduce case I could create. Ultimately I plan on having a TILEINDEX point to a layer of defined via CONNECTIONTYPE postgis. How do I get a vector tileindex working with another Mapserver layer as the tileindex? Thanks! Pete Full mapfile below with example commands reproducing my errors. MAP OUTPUTFORMAT NAME "geojson" DRIVER "OGR/GEOJSON" MIMETYPE "application/json; subtype=geojson" FORMATOPTION "STORAGE=memory" FORMATOPTION "FORM=SIMPLE" FORMATOPTION "LCO:RFC7946=NO" FORMATOPTION "FILENAME=result.json" END WEB METADATA "ows_enable_request" "*" "wfs_getfeature_formatlist" "ogrgml,geojson" END END CONFIG "MS_ERRORFILE" "stderr" PROJECTION "init=epsg:4326" END DEBUG 5 # mapserv -nh QUERY_STRING='service=WFS&VERSION=1.0.0&REQUEST=getfeature&map=/app/mapfiles/test2.map&typename=vector_directly&OUTPUTFORMAT=geojson' # returns the contents of 'test.geojson'! LAYER NAME "vector_directly" TYPE POLYGON TILEINDEX "/app/mapfiles/tindex.geojson" CONNECTIONTYPE OGR STATUS OFF END # mapserv -nh QUERY_STRING='service=WFS&VERSION=1.0.0&REQUEST=getfeature&map=/app/mapfiles/test2.map&typename=tindex_ogr&OUTPUTFORMAT=geojson' # returns contents of tindex.geojson! LAYER NAME "tindex_ogr" TYPE POLYGON CONNECTIONTYPE OGR CONNECTION "/app/mapfiles/tindex.geojson" STATUS OFF END # mapserv -nh QUERY_STRING='service=WFS&VERSION=1.0.0&REQUEST=getfeature&map=/app/mapfiles/test2.map&typename=vector_tindex&OUTPUTFORMAT=geojson' # returns 'msTiledSHPOpenFile(): Shapefile error. Tileindex layer must be a shapefile.' LAYER NAME "vector_via_tindex" TYPE POLYGON TILEINDEX tindex_ogr STATUS OFF END # mapserv -nh QUERY_STRING='service=WFS&VERSION=1.0.0&REQUEST=getfeature&map=/app/mapfiles/test2.map&typename=vector_via_ogr&OUTPUTFORMAT=geojson' # returns 'msOGRFileOpen(): OGR error. Open failed for OGR connection in layer `vector_via_ogr'. File not found or unsupported format. Check server logs.' LAYER NAME "vector_via_ogr" TYPE POLYGON TILEINDEX tindex_ogr CONNECTIONTYPE OGR STATUS OFF END END # mapfile -------------- next part -------------- An HTML attachment was scrubbed... URL: From mniemyjski at cloudferro.com Wed Dec 7 02:44:38 2022 From: mniemyjski at cloudferro.com (Marcin Niemyjski) Date: Wed, 7 Dec 2022 10:44:38 +0000 Subject: [MapServer-users] GetFeatureInfo html template Message-ID: Hello, I'm looking for tutorial of enabling GetFeatureInfo requests of WMS. I would be grateful for any example of code of .tmpl file. What I want to do is simple table with name and value of attribute for selected feature. As always thank you, Marcin -------------- next part -------------- An HTML attachment was scrubbed... URL: From joerg.thomsen at wheregroup.com Wed Dec 7 04:26:07 2022 From: joerg.thomsen at wheregroup.com (=?UTF-8?Q?J=c3=b6rg_Thomsen_=28WhereGroup=29?=) Date: Wed, 7 Dec 2022 13:26:07 +0100 Subject: [MapServer-users] fix tutorial? (Re: GetFeatureInfo html template) In-Reply-To: References: Message-ID: Hi, Am 07.12.22 um 11:44 schrieb Marcin Niemyjski via MapServer-users: > Hello, > > I'm looking for tutorial of enabling GetFeatureInfo requests of WMS. I > would be grateful for any example of code of .tmpl file. What I want to > do is simple table with name and value of attribute for selected feature. there should be one in the tuitorial https://www.mapserver.org/tutorial/index.html https://demo.mapserver.org/tutorial/section3.html but ist seems to be broken, who could fix it? -- Viele Gr??e, J?rg Thomsen --------------------------------------------- Where2B Konferenz 2022 15. Dezember 2022 in Bonn und Online where2b-conference.com --------------------------------------------- J?rg Thomsen WhereGroup GmbH Bundesallee 23 10717 Berlin Germany Tel: +49 (0)30 / 5130 278 74 Fax: +49 (0)30 / 5130 278 11 joerg.thomsen at wheregroup.com www.wheregroup.com Gesch?ftsf?hrer: Olaf Knopp, Peter Stamm Amtsgericht Bonn, HRB 9885 ------------------------------- Folgen Sie der WhereGroup auf twitter: http://twitter.com/WhereGroup_com From mniemyjski at cloudferro.com Wed Dec 7 04:44:37 2022 From: mniemyjski at cloudferro.com (Marcin Niemyjski) Date: Wed, 7 Dec 2022 12:44:37 +0000 Subject: [MapServer-users] Filled SVG symbol after switching to Mapserver 8 Message-ID: Hello, after switching to Mapserver 8 my svg symbols started to be rendered as filled: how it looks now: https://pasteboard.co/4K4CIEW6oFIm.png how it was looking (the good way): https://pasteboard.co/wDQGW0xzFGRg.png My mapfile: https://pastebin.com/KRYDEAR2 What can I do to render svg the good way? Best, Marcin -------------- next part -------------- An HTML attachment was scrubbed... URL: From jmckenna at gatewaygeomatics.com Wed Dec 7 06:19:44 2022 From: jmckenna at gatewaygeomatics.com (Jeff McKenna) Date: Wed, 7 Dec 2022 10:19:44 -0400 Subject: [MapServer-users] fix tutorial? (Re: GetFeatureInfo html template) In-Reply-To: References: Message-ID: <5989f371-9ad1-07eb-e163-c06f3be4bb5f@gatewaygeomatics.com> On 2022-12-07 8:26 a.m., J?rg Thomsen (WhereGroup) wrote: > Hi, > > Am 07.12.22 um 11:44 schrieb Marcin Niemyjski via MapServer-users: >> Hello, >> >> I'm looking for tutorial of enabling GetFeatureInfo requests of WMS. I >> would be grateful for any example of code of .tmpl file. What I want >> to do is simple table with name and value of attribute for selected >> feature. > there should be one in the tuitorial > https://www.mapserver.org/tutorial/index.html > https://demo.mapserver.org/tutorial/section3.html > > but ist seems to be broken, who could fix it? > > I had started some fixes last week, will continue now (follow along at https://github.com/MapServer/MapServer-documentation/issues/779 ). If you ever notice issues with the demo server or any of the many services relying on it, either email me directly or report the issue in the 'MapServer-documentation' repository. thanks, -jeff -- Jeff McKenna GatewayGeo: Developers of MS4W, MapServer Consulting and Training co-founder of FOSS4G http://gatewaygeo.com/ From steve.lime at state.mn.us Wed Dec 7 07:33:35 2022 From: steve.lime at state.mn.us (Lime, Steve D (MNIT)) Date: Wed, 7 Dec 2022 15:33:35 +0000 Subject: [MapServer-users] Filled SVG symbol after switching to Mapserver 8 In-Reply-To: References: Message-ID: Hmmm... I'm not aware of any obvious changes between v.7 and v.8 that would account for the change and nothing jumps out looking at your mapfile. Would you be able to share one of your SVG graphics? --Steve From: MapServer-users On Behalf Of Marcin Niemyjski via MapServer-users Sent: Wednesday, December 7, 2022 6:45 AM To: Marcin Niemyjski via MapServer-users Subject: [MapServer-users] Filled SVG symbol after switching to Mapserver 8 Hello, after switching to Mapserver 8 my svg symbols started to be rendered as filled: how it looks now: https://pasteboard.co/4K4CIEW6oFIm.png how it was looking (the good way): https://pasteboard.co/wDQGW0xzFGRg.png My mapfile: https://pastebin.com/KRYDEAR2 What can I do to render svg the good way? Best, Marcin -------------- next part -------------- An HTML attachment was scrubbed... URL: From mniemyjski at cloudferro.com Wed Dec 7 07:37:55 2022 From: mniemyjski at cloudferro.com (Marcin Niemyjski) Date: Wed, 7 Dec 2022 15:37:55 +0000 Subject: [MapServer-users] Filled SVG symbol after switching to Mapserver 8 In-Reply-To: References: Message-ID: Steve, link to my svgs: https://cloudferro-my.sharepoint.com/:f:/p/mniemyjski/EobJZb14qXRHj34634dWZdgBnZa3r7Qztx4-Z2HVFvZO9A?e=L2hCXj Thanks, Marcin ________________________________ From: Lime, Steve D (MNIT) Sent: Wednesday, December 7, 2022 4:33 PM To: Marcin Niemyjski ; Marcin Niemyjski via MapServer-users Subject: RE: Filled SVG symbol after switching to Mapserver 8 Hmmm? I?m not aware of any obvious changes between v.7 and v.8 that would account for the change and nothing jumps out looking at your mapfile. Would you be able to share one of your SVG graphics? --Steve From: MapServer-users On Behalf Of Marcin Niemyjski via MapServer-users Sent: Wednesday, December 7, 2022 6:45 AM To: Marcin Niemyjski via MapServer-users Subject: [MapServer-users] Filled SVG symbol after switching to Mapserver 8 Hello, after switching to Mapserver 8 my svg symbols started to be rendered as filled: how it looks now: https://pasteboard.co/4K4CIEW6oFIm.png how it was looking (the good way): https://pasteboard.co/wDQGW0xzFGRg.png My mapfile: https://pastebin.com/KRYDEAR2 What can I do to render svg the good way? Best, Marcin -------------- next part -------------- An HTML attachment was scrubbed... URL: From pschmitt at gmail.com Wed Dec 7 09:07:50 2022 From: pschmitt at gmail.com (Peter Schmitt) Date: Wed, 7 Dec 2022 10:07:50 -0700 Subject: [MapServer-users] [EXTERNAL] Vector tileindex with connectiontype OGR In-Reply-To: <0c6ff3ba957a4736b3376dc7052a9ce2@saabgroup.com> References: <0c6ff3ba957a4736b3376dc7052a9ce2@saabgroup.com> Message-ID: On Wed, Dec 7, 2022 at 1:16 AM Schylberg Lars wrote: > The important thing is to have a one layer for the actual tile index, that has status off and one layer that is using the tile index layer. Thanks for the message, Lars! This gave me another idea to debug. When I set DEBUG 5 and request mapserv -nh QUERY_STRING='service=WFS&VERSION=1.0.0&REQUEST=getfeature&map=/app/mapfiles/test2.map&typename=vector_via_ogr&OUTPUTFORMAT=geojson' then the log contains OGROPen(tindex_ogr) msOGRFileOpen(): OGR error. Open failed for OGR connection in layer `vector_via_ogr'. File not found or unsupported format. Check server logs. Open failed for OGR connection in layer `vector_via_ogr'. with the layers LAYER DEBUG 5 NAME "tindex_ogr" TYPE POLYGON CONNECTIONTYPE OGR CONNECTION "/app/mapfiles/tindex.geojson" STATUS OFF END LAYER DEBUG 5 NAME "vector_via_ogr" TYPE POLYGON TILEINDEX tindex_ogr CONNECTIONTYPE OGR STATUS OFF END This log line OGROPen(tindex_ogr) makes me suspect the following lines of code are setting the OGR dataset name to "tindex_ogr", whereas I expect it to do something like use the value from CONNECTION in the layer with name "tindex_ogr". https://github.com/MapServer/MapServer/blob/71ecf4028b0769027df3a970a36d56feb1d46ab6/mapogr.cpp#L1205-L1238 In other words, I expect the log line to read OGROPen(/app/mapfiles/tindex.geojson) and not OGROPen(tindex_ogr) This seems to be unique for a vector tile index of vectors. This otherwise works fine when using a vector tileindex of rasters. So if I make a bogus raster layer like LAYER DEBUG 5 NAME "bogus_raster" TYPE RASTER TILEINDEX tindex_ogr STATUS OFF PROJECTION "init=epsg:3857" END END and then issue a bogus request like curl ' http://localhost:8000/wms?SERVICE=WMS&VERSION=1.3.0&REQUEST=GetMap&FORMAT=image/png&TRANSPARENT=true&map=/app/mapfiles/test2.map&layers=bogus_raster&WIDTH=256&HEIGHT=256&CRS=EPSG:3857&STYLES=&BBOX=4163066.308523841,5943743.319455305,4167958.2783340923,5948635.289265556 ' Then the log line includes msOGRFileOpen(/app/mapfiles/tindex.geojson)... OGROPen(/app/mapfiles/tindex.geojson) msConnPoolRegister(tindex_ogr,/app/mapfiles/tindex.geojson,0x556aba222630) and _not_ msOGRFileOpen(tindex_ogr)... like I see for a vector tile index of vectors. Thanks, Pete -------------- next part -------------- An HTML attachment was scrubbed... URL: From steve.lime at state.mn.us Wed Dec 7 09:21:39 2022 From: steve.lime at state.mn.us (Lime, Steve D (MNIT)) Date: Wed, 7 Dec 2022 17:21:39 +0000 Subject: [MapServer-users] Filled SVG symbol after switching to Mapserver 8 In-Reply-To: References: Message-ID: Which SVG library are you using - RSVG or Cairo? From: Marcin Niemyjski Sent: Wednesday, December 7, 2022 9:38 AM To: Lime, Steve D (MNIT) ; Marcin Niemyjski via MapServer-users Subject: Re: Filled SVG symbol after switching to Mapserver 8 Steve, link to my svgs: https://cloudferro-my.sharepoint.com/:f:/p/mniemyjski/EobJZb14qXRHj34634dWZdgBnZa3r7Qztx4-Z2HVFvZO9A?e=L2hCXj Thanks, Marcin ________________________________ From: Lime, Steve D (MNIT) > Sent: Wednesday, December 7, 2022 4:33 PM To: Marcin Niemyjski >; Marcin Niemyjski via MapServer-users > Subject: RE: Filled SVG symbol after switching to Mapserver 8 Hmmm... I'm not aware of any obvious changes between v.7 and v.8 that would account for the change and nothing jumps out looking at your mapfile. Would you be able to share one of your SVG graphics? --Steve From: MapServer-users > On Behalf Of Marcin Niemyjski via MapServer-users Sent: Wednesday, December 7, 2022 6:45 AM To: Marcin Niemyjski via MapServer-users > Subject: [MapServer-users] Filled SVG symbol after switching to Mapserver 8 Hello, after switching to Mapserver 8 my svg symbols started to be rendered as filled: how it looks now: https://pasteboard.co/4K4CIEW6oFIm.png how it was looking (the good way): https://pasteboard.co/wDQGW0xzFGRg.png My mapfile: https://pastebin.com/KRYDEAR2 What can I do to render svg the good way? Best, Marcin -------------- next part -------------- An HTML attachment was scrubbed... URL: From mniemyjski at cloudferro.com Wed Dec 7 09:26:49 2022 From: mniemyjski at cloudferro.com (Marcin Niemyjski) Date: Wed, 7 Dec 2022 17:26:49 +0000 Subject: [MapServer-users] Filled SVG symbol after switching to Mapserver 8 In-Reply-To: References: Message-ID: I am using the camptocamp/mapserver 8 image. I have not changed anything in the default configuration provided as part of the image. Wysy?ane z aplikacji Outlook dla systemu iOS ________________________________ Od: Lime, Steve D (MNIT) Wys?ane: Wednesday, December 7, 2022 6:21:39 PM Do: Marcin Niemyjski ; Marcin Niemyjski via MapServer-users Temat: RE: Filled SVG symbol after switching to Mapserver 8 Which SVG library are you using ? RSVG or Cairo? From: Marcin Niemyjski Sent: Wednesday, December 7, 2022 9:38 AM To: Lime, Steve D (MNIT) ; Marcin Niemyjski via MapServer-users Subject: Re: Filled SVG symbol after switching to Mapserver 8 Steve, link to my svgs: https://cloudferro-my.sharepoint.com/:f:/p/mniemyjski/EobJZb14qXRHj34634dWZdgBnZa3r7Qztx4-Z2HVFvZO9A?e=L2hCXj Thanks, Marcin ________________________________ From: Lime, Steve D (MNIT) > Sent: Wednesday, December 7, 2022 4:33 PM To: Marcin Niemyjski >; Marcin Niemyjski via MapServer-users > Subject: RE: Filled SVG symbol after switching to Mapserver 8 Hmmm? I?m not aware of any obvious changes between v.7 and v.8 that would account for the change and nothing jumps out looking at your mapfile. Would you be able to share one of your SVG graphics? --Steve From: MapServer-users > On Behalf Of Marcin Niemyjski via MapServer-users Sent: Wednesday, December 7, 2022 6:45 AM To: Marcin Niemyjski via MapServer-users > Subject: [MapServer-users] Filled SVG symbol after switching to Mapserver 8 Hello, after switching to Mapserver 8 my svg symbols started to be rendered as filled: how it looks now: https://pasteboard.co/4K4CIEW6oFIm.png how it was looking (the good way): https://pasteboard.co/wDQGW0xzFGRg.png My mapfile: https://pastebin.com/KRYDEAR2 What can I do to render svg the good way? Best, Marcin -------------- next part -------------- An HTML attachment was scrubbed... URL: From jukka.rahkonen at maanmittauslaitos.fi Wed Dec 7 11:18:41 2022 From: jukka.rahkonen at maanmittauslaitos.fi (Rahkonen Jukka) Date: Wed, 7 Dec 2022 19:18:41 +0000 Subject: [MapServer-users] [EXTERNAL] Vector tileindex with connectiontype OGR In-Reply-To: References: <0c6ff3ba957a4736b3376dc7052a9ce2@saabgroup.com> Message-ID: Hi, I made some tests and noticed that the OGR tileindex does not need to be a shapefile but GeoPackage worked as well. Actully what did not work was to make a vector layer from tileindex that was saved into GeoPackage and to use that layer in TILEINDEX. And then I noticed that this behavior is documented in https://www.mapserver.org/input/vector/ogr.html#tileindex-with-ogr: "OGR layers can utilize tile indexes in a similar fashion to Shapefile based layers. The TILEINDEX keyword should contain the connection string for the tile index file. The tile index file may be any supported OGR format, including shapefiles." So this is what I used in LAYER and it worked both for WMS and WFS: CONNECTIONTYPE OGR TILEINDEX "c:\data\000\mapservertest\tindex.gpkg" I do not know when and if this behavior has changed. I thought as well that the layer-as-a-tileindex would be the way to follow if tileindex is not in shapefile format. -Jukka Rahkonen- L?hett?j?: MapServer-users Puolesta Peter Schmitt L?hetetty: keskiviikko 7. joulukuuta 2022 19.08 Vastaanottaja: Schylberg Lars Kopio: Mapserver-Users (mapserver-users at lists.osgeo.org) Aihe: Re: [MapServer-users] [EXTERNAL] Vector tileindex with connectiontype OGR On Wed, Dec 7, 2022 at 1:16 AM Schylberg Lars > wrote: > The important thing is to have a one layer for the actual tile index, that has status off and one layer that is using the tile index layer. Thanks for the message, Lars! This gave me another idea to debug. When I set DEBUG 5 and request mapserv -nh QUERY_STRING='service=WFS&VERSION=1.0.0&REQUEST=getfeature&map=/app/mapfiles/test2.map&typename=vector_via_ogr&OUTPUTFORMAT=geojson' then the log contains OGROPen(tindex_ogr) msOGRFileOpen(): OGR error. Open failed for OGR connection in layer `vector_via_ogr'. File not found or unsupported format. Check server logs. Open failed for OGR connection in layer `vector_via_ogr'. with the layers LAYER DEBUG 5 NAME "tindex_ogr" TYPE POLYGON CONNECTIONTYPE OGR CONNECTION "/app/mapfiles/tindex.geojson" STATUS OFF END LAYER DEBUG 5 NAME "vector_via_ogr" TYPE POLYGON TILEINDEX tindex_ogr CONNECTIONTYPE OGR STATUS OFF END This log line OGROPen(tindex_ogr) makes me suspect the following lines of code are setting the OGR dataset name to "tindex_ogr", whereas I expect it to do something like use the value from CONNECTION in the layer with name "tindex_ogr". https://github.com/MapServer/MapServer/blob/71ecf4028b0769027df3a970a36d56feb1d46ab6/mapogr.cpp#L1205-L1238 In other words, I expect the log line to read OGROPen(/app/mapfiles/tindex.geojson) and not OGROPen(tindex_ogr) This seems to be unique for a vector tile index of vectors. This otherwise works fine when using a vector tileindex of rasters. So if I make a bogus raster layer like LAYER DEBUG 5 NAME "bogus_raster" TYPE RASTER TILEINDEX tindex_ogr STATUS OFF PROJECTION "init=epsg:3857" END END and then issue a bogus request like curl 'http://localhost:8000/wms?SERVICE=WMS&VERSION=1.3.0&REQUEST=GetMap&FORMAT=image/png&TRANSPARENT=true&map=/app/mapfiles/test2.map&layers=bogus_raster&WIDTH=256&HEIGHT=256&CRS=EPSG:3857&STYLES=&BBOX=4163066.308523841,5943743.319455305,4167958.2783340923,5948635.289265556' Then the log line includes msOGRFileOpen(/app/mapfiles/tindex.geojson)... OGROPen(/app/mapfiles/tindex.geojson) msConnPoolRegister(tindex_ogr,/app/mapfiles/tindex.geojson,0x556aba222630) and _not_ msOGRFileOpen(tindex_ogr)... like I see for a vector tile index of vectors. Thanks, Pete -------------- next part -------------- An HTML attachment was scrubbed... URL: From steve.lime at state.mn.us Wed Dec 7 14:35:55 2022 From: steve.lime at state.mn.us (Lime, Steve D (MNIT)) Date: Wed, 7 Dec 2022 22:35:55 +0000 Subject: [MapServer-users] Filled SVG symbol after switching to Mapserver 8 In-Reply-To: References: Message-ID: Interestingly the SVG-related regression tests all pass using a more complex SVG file than what you had shared. Using 8.0, the msautotest/misc/data/Road_Works.svg (https://github.com/MapServer/MapServer/blob/branch-8-0/msautotest/misc/data/Road_Works.svg) file renders fine as a point symbol while your marker_customers.svg does not and matches your sample output. Using the current 7.6 branch, both symbols render as expected as point symbols. More digging will be necessary. Are any devs aware of specific changes relative to SVG (or vector) symbol support? --Steve From: Marcin Niemyjski Sent: Wednesday, December 7, 2022 11:27 AM To: Lime, Steve D (MNIT) ; Marcin Niemyjski via MapServer-users Subject: Re: Filled SVG symbol after switching to Mapserver 8 I am using the camptocamp/mapserver 8 image. I have not changed anything in the default configuration provided as part of the image. Wysy?ane z aplikacji Outlook dla systemu iOS ________________________________ Od: Lime, Steve D (MNIT) > Wys?ane: Wednesday, December 7, 2022 6:21:39 PM Do: Marcin Niemyjski >; Marcin Niemyjski via MapServer-users > Temat: RE: Filled SVG symbol after switching to Mapserver 8 Which SVG library are you using - RSVG or Cairo? From: Marcin Niemyjski > Sent: Wednesday, December 7, 2022 9:38 AM To: Lime, Steve D (MNIT) >; Marcin Niemyjski via MapServer-users > Subject: Re: Filled SVG symbol after switching to Mapserver 8 Steve, link to my svgs: https://cloudferro-my.sharepoint.com/:f:/p/mniemyjski/EobJZb14qXRHj34634dWZdgBnZa3r7Qztx4-Z2HVFvZO9A?e=L2hCXj Thanks, Marcin ________________________________ From: Lime, Steve D (MNIT) > Sent: Wednesday, December 7, 2022 4:33 PM To: Marcin Niemyjski >; Marcin Niemyjski via MapServer-users > Subject: RE: Filled SVG symbol after switching to Mapserver 8 Hmmm... I'm not aware of any obvious changes between v.7 and v.8 that would account for the change and nothing jumps out looking at your mapfile. Would you be able to share one of your SVG graphics? --Steve From: MapServer-users > On Behalf Of Marcin Niemyjski via MapServer-users Sent: Wednesday, December 7, 2022 6:45 AM To: Marcin Niemyjski via MapServer-users > Subject: [MapServer-users] Filled SVG symbol after switching to Mapserver 8 Hello, after switching to Mapserver 8 my svg symbols started to be rendered as filled: how it looks now: https://pasteboard.co/4K4CIEW6oFIm.png how it was looking (the good way): https://pasteboard.co/wDQGW0xzFGRg.png My mapfile: https://pastebin.com/KRYDEAR2 What can I do to render svg the good way? Best, Marcin -------------- next part -------------- An HTML attachment was scrubbed... URL: From pschmitt at gmail.com Wed Dec 7 15:02:29 2022 From: pschmitt at gmail.com (Peter Schmitt) Date: Wed, 7 Dec 2022 16:02:29 -0700 Subject: [MapServer-users] [EXTERNAL] Vector tileindex with connectiontype OGR In-Reply-To: References: <0c6ff3ba957a4736b3376dc7052a9ce2@saabgroup.com> Message-ID: Hi Jukka, On Wed, Dec 7, 2022 at 12:18 PM Rahkonen Jukka < jukka.rahkonen at maanmittauslaitos.fi> wrote: > ?OGR layers can utilize tile indexes in a similar fashion to Shapefile > based layers. The TILEINDEX keyword should contain the connection string > for the tile index file. The tile index file may be any supported OGR > format, including shapefiles.? > > > > So this is what I used in LAYER and it worked both for WMS and WFS: > > > CONNECTIONTYPE OGR > TILEINDEX "c:\data\000\mapservertest\tindex.gpkg" > Thanks for your message, it is very helpful! I am now struggling how to use an SQL query of my choosing when the OGR TILEINDEX is in a Postgis database. I can get a TILEINDEX working using the OGR format. Ultimately my TILEINDEX lives in Postgis. I can make a postgis table and populate it with items like so: create table testtable (id int, location text, geom geometry(Polygon,4326)); insert into testtable (id, location, geom) values (1, '/test_data/test.geojson,0', 'POLYGON((122.01377475333321 29.96355712017804,122.01424752183958 29.915620560607106,122.06927507957919 29.91602043815968,122.0688286928125 29.963957768165944,122.01377475333321 29.96355712017804))'::geometry); and then reference my Postgis TILEINDEX of vectors in this fashion: LAYER DEBUG 5 NAME "vector_via_postgis" TYPE POLYGON TILEINDEX "PG:\"host='localhost' user='postgres' dbname='mydatabase' password='mypwd' tables=testtable(geom)\"" CONNECTIONTYPE OGR STATUS OFF END and now I can query my vector index of tiles: mapserv -nh QUERY_STRING='service=WFS&VERSION=1.0.0&REQUEST=getfeature&map=/app/mapfiles/test2.map&typename=vector_via_postgis&OUTPUTFORMAT=geojson' I can query the database with the OGR driver by passing the `-sql` option: ogrinfo -ro PG:"host='localhost' user='postgres' dbname='mydatabase' password='mypwd'" -sql 'SELECT * FROM testtable' but let's say my query was more complicated than `SELECT * FROM testtable;`. I could make a Postgres view, but I'm hoping there is some way to override the default SQL query used. How do I specify such a query using the OGR PG driver as a Mapserver layer to be used as a TILEINDEX of OGR vector files? Perhaps this is more of a GDAL question... or how does Mapserver's use of OGR TILEINDEX of OGR vector files allow custom SQL? Note that as a TILEINDEX of Rasters the TILEINDEX can point to a Mapserver Layer, so I /can/ add custom SQL queries in that case. But I don't know how to do it as a OGR TILEINDEX pointing to OGR vectors. Thanks, Pete -------------- next part -------------- An HTML attachment was scrubbed... URL: From even.rouault at spatialys.com Wed Dec 7 15:17:37 2022 From: even.rouault at spatialys.com (Even Rouault) Date: Thu, 8 Dec 2022 00:17:37 +0100 Subject: [MapServer-users] [EXTERNAL] Vector tileindex with connectiontype OGR In-Reply-To: References: <0c6ff3ba957a4736b3376dc7052a9ce2@saabgroup.com> Message-ID: <327a7dea-295c-6451-aa6b-2ae12a70572f@spatialys.com> Pete, > How do I specify such a query using the OGR PG driver as a Mapserver > layer to be used as a TILEINDEX of OGR vector files? A potential solution would be to create a OGR VRT file that contains your SQL request, and reference that VRT file in the TILEINDEX ??? ??????? PG:"host='localhost' user='postgres' dbname='mydatabase' password='mypwd' ??????? SELECT * FROM testtable Actually you may be able to inline the VRT file as the TILEINDEX value (it is a bit tricky regarding quoting however, but there's an example of that in https://mapserver.org/input/vector/VirtualSpatialData.html as the value of CONNECTION, not TILEINDEX, but that shouldn't make a difference)), since the OGR VRT XML content can be used as a valid OGR dataset name. > > Perhaps this is more of a GDAL question... or how does Mapserver's?use > of OGR TILEINDEX of OGR vector files allow custom SQL?? Note that as a > TILEINDEX of Rasters the TILEINDEX can point to a Mapserver Layer, so > I /can/ add custom SQL queries in that case.? But I don't know how to > do it as a OGR TILEINDEX pointing to OGR vectors. For vector layer, it doesn't look like it is possible to have TILEINDEX pointing to a MapServer vector layer (contrary to rasters), at least I can't see any related tests in mapserver regression test suite Even -- http://www.spatialys.com My software is free, but my time generally not. -------------- next part -------------- An HTML attachment was scrubbed... URL: From pschmitt at gmail.com Wed Dec 7 16:31:47 2022 From: pschmitt at gmail.com (Peter Schmitt) Date: Wed, 7 Dec 2022 17:31:47 -0700 Subject: [MapServer-users] [EXTERNAL] Vector tileindex with connectiontype OGR In-Reply-To: <327a7dea-295c-6451-aa6b-2ae12a70572f@spatialys.com> References: <0c6ff3ba957a4736b3376dc7052a9ce2@saabgroup.com> <327a7dea-295c-6451-aa6b-2ae12a70572f@spatialys.com> Message-ID: On Wed, Dec 7, 2022 at 4:17 PM Even Rouault wrote: > How do I specify such a query using the OGR PG driver as a Mapserver layer > to be used as a TILEINDEX of OGR vector files? > > A potential solution would be to create a OGR VRT file that contains your > SQL request, and reference that VRT file in the TILEINDEX > > Brilliant! This indeed works: LAYER NAME "vector_via_vrt" TYPE POLYGON TILEINDEX " PG:host='localhost' user='postgres' dbname='mydatabase' password='mypwd' SELECT * FROM testtable " CONNECTIONTYPE OGR STATUS OFF END and now requests like http://localhost:8000/wfs?service=WFS&VERSION=1.0.0&REQUEST=getfeature&map=/app/mapfiles/test.map&typename=vector_via_vrt&OUTPUTFORMAT=geojson return the vectors pointed by the vector tileindex of vectors. I will attempt to submit a PR to add this example to the docs when I can. VRTs: Is there anything they can't do!? Cheers, Pete -------------- next part -------------- An HTML attachment was scrubbed... URL: From jukka.rahkonen at maanmittauslaitos.fi Wed Dec 7 23:55:53 2022 From: jukka.rahkonen at maanmittauslaitos.fi (Rahkonen Jukka) Date: Thu, 8 Dec 2022 07:55:53 +0000 Subject: [MapServer-users] [EXTERNAL] Vector tileindex with connectiontype OGR In-Reply-To: References: <0c6ff3ba957a4736b3376dc7052a9ce2@saabgroup.com> <327a7dea-295c-6451-aa6b-2ae12a70572f@spatialys.com> Message-ID: Hi, We are using the ?layer-as-a-tileindex? method right now with a bit older Mapserver version and with native POSTGIS connection type. In the orthophoto layer we use LAYER GROUP "ortokuva" NAME "ortokuva_r16" STATUS ON TILEINDEX "ortokuva_r16_postgis_tileindex" TILESRS "crs" and in the "ortokuva_r16_postgis_tileindex" layer LAYER NAME "ortokuva_r16_postgis_tileindex" STATUS ON TYPE POLYGON UNITS METERS SIZEUNITS PIXELS CONNECTIONTYPE POSTGIS CONNECTION "dbname=db user=user password=password" DATA "the_geom from (SELECT fid, '/beginning/of/path/'||location as location, crs, resolution, the_geom FROM ortokuva_16m) as subquery using unique fid" I hope that this still works with Mapserver 8. It would be nice if you could make a test and compare OGR vs POSTGIS connection types. -Jukka Rahkonen- L?hett?j?: Peter Schmitt L?hetetty: torstai 8. joulukuuta 2022 2.32 Vastaanottaja: Even Rouault Kopio: Rahkonen Jukka ; Mapserver-Users (mapserver-users at lists.osgeo.org) Aihe: Re: [MapServer-users] [EXTERNAL] Vector tileindex with connectiontype OGR On Wed, Dec 7, 2022 at 4:17 PM Even Rouault > wrote: How do I specify such a query using the OGR PG driver as a Mapserver layer to be used as a TILEINDEX of OGR vector files? A potential solution would be to create a OGR VRT file that contains your SQL request, and reference that VRT file in the TILEINDEX Brilliant! This indeed works: LAYER NAME "vector_via_vrt" TYPE POLYGON TILEINDEX " PG:host='localhost' user='postgres' dbname='mydatabase' password='mypwd' SELECT * FROM testtable " CONNECTIONTYPE OGR STATUS OFF END and now requests like http://localhost:8000/wfs?service=WFS&VERSION=1.0.0&REQUEST=getfeature&map=/app/mapfiles/test.map&typename=vector_via_vrt&OUTPUTFORMAT=geojson return the vectors pointed by the vector tileindex of vectors. I will attempt to submit a PR to add this example to the docs when I can. VRTs: Is there anything they can't do!? Cheers, Pete -------------- next part -------------- An HTML attachment was scrubbed... URL: From mniemyjski at cloudferro.com Thu Dec 8 03:07:00 2022 From: mniemyjski at cloudferro.com (Marcin Niemyjski) Date: Thu, 8 Dec 2022 11:07:00 +0000 Subject: [MapServer-users] Can't pass features attributes to GetFeatureInfo output Message-ID: Hello, I encountered the problem with GetFeatureInfo, namely: only one attribute value is passed to GetFeatureInfo output - value of attribute used in mapfile's expression. My GetFeatureInfo Output: https://pasteboard.co/lAtZ5HBp1FuT.png How I defined template: https://pasteboard.co/uPG1DnJpgE5q.png and how my mapfile is constructed: https://pastecode.io/s/txa03nfw I have checked mentioning another attribute in expression - after that its value was passed into GetFeatureinfo output. Best, Marcin -------------- next part -------------- An HTML attachment was scrubbed... URL: From pschmitt at gmail.com Thu Dec 8 07:44:28 2022 From: pschmitt at gmail.com (Peter Schmitt) Date: Thu, 8 Dec 2022 08:44:28 -0700 Subject: [MapServer-users] [EXTERNAL] Vector tileindex with connectiontype OGR In-Reply-To: References: <0c6ff3ba957a4736b3376dc7052a9ce2@saabgroup.com> <327a7dea-295c-6451-aa6b-2ae12a70572f@spatialys.com> Message-ID: On Thu, Dec 8, 2022 at 12:55 AM Rahkonen Jukka < jukka.rahkonen at maanmittauslaitos.fi> wrote: > > > We are using the ?layer-as-a-tileindex? method right now with a bit older > Mapserver version and with native POSTGIS connection type. In the > orthophoto layer we use > > > > I hope that this still works with Mapserver 8. It would be nice if you > could make a test and compare OGR vs POSTGIS connection types. > > > This test is the closest I could find of ?layer-as-a-tileindex of vectors" that makes me think it should work: https://github.com/MapServer/MapServer/blob/1a45e6074b71738e576563ac39f60fd96ded50eb/msautotest/wxs/contour_tileindex.map#L70-L101 What version of MapServer are you using? Can you try this mapfile on your version of Mapserver? ### tindex.geojson { "type":"FeatureCollection","features":[{"type":"Feature","properties":{"location":"/app/mapfiles/test.geojson"},"geometry":{"type":"Polygon","coordinates":[[[122.013774753,29.96355712],[122.014247522,29.915620561],[122.06927508,29.916020438],[122.068828693,29.963957768],[122.013774753,29.96355712]]]}}]} ### test.geojson {"type":"Feature","properties":{},"geometry":{"coordinates":[[[122.04067791363536,29.944772490597998],[122.03620089848994,29.94141730774004],[122.03819740524398,29.937852301951125],[122.0446709271447,29.938166866424368],[122.04648593328471,29.940211511256464],[122.04067791363536,29.944772490597998]]],"type":"Polygon"}} ### test2.map MAP OUTPUTFORMAT NAME "geojson" DRIVER "OGR/GEOJSON" MIMETYPE "application/json; subtype=geojson" FORMATOPTION "STORAGE=memory" FORMATOPTION "FORM=SIMPLE" FORMATOPTION "LCO:RFC7946=NO" FORMATOPTION "FILENAME=result.json" END WEB METADATA "ows_enable_request" "*" "wfs_getfeature_formatlist" "ogrgml,geojson" END END CONFIG "MS_ERRORFILE" "stderr" PROJECTION "init=epsg:4326" END # mapserv -nh QUERY_STRING='service=WFS&VERSION=1.0.0&REQUEST=getfeature&map=/app/mapfiles/test2.map&typename=vector_directly&OUTPUTFORMAT=geojson' # returns the contents of 'test.geojson'! LAYER NAME "vector_directly" TYPE POLYGON TILEINDEX "/app/mapfiles/tindex.geojson" CONNECTIONTYPE OGR STATUS OFF END # mapserv -nh QUERY_STRING='service=WFS&VERSION=1.0.0&REQUEST=getfeature&map=/app/mapfiles/test2.map&typename=tindex_ogr&OUTPUTFORMAT=geojson' # returns contents of tindex.geojson! LAYER DEBUG 5 NAME "tindex_ogr" TYPE POLYGON CONNECTIONTYPE OGR CONNECTION "/app/mapfiles/tindex.geojson" STATUS OFF END # mapserv -nh QUERY_STRING='service=WFS&VERSION=1.0.0&REQUEST=getfeature&map=/app/mapfiles/test2.map&typename=vector_tindex&OUTPUTFORMAT=geojson' # returns 'msTiledSHPOpenFile(): Shapefile error. Tileindex layer must be a shapefile.' LAYER NAME "vector_via_tindex" TYPE POLYGON TILEINDEX tindex_ogr STATUS OFF END # mapserv -nh QUERY_STRING='service=WFS&VERSION=1.0.0&REQUEST=getfeature&map=/app/mapfiles/test2.map&typename=vector_via_ogr&OUTPUTFORMAT=geojson' # returns 'msOGRFileOpen(): OGR error. Open failed for OGR connection in layer `vector_via_ogr'. File not found or unsupported format. Check server logs.' LAYER DEBUG 5 NAME "vector_via_ogr" TYPE POLYGON TILEINDEX tindex_ogr CONNECTIONTYPE OGR STATUS OFF END END # mapfile -------------- next part -------------- An HTML attachment was scrubbed... URL: From even.rouault at spatialys.com Thu Dec 8 08:08:25 2022 From: even.rouault at spatialys.com (Even Rouault) Date: Thu, 8 Dec 2022 17:08:25 +0100 Subject: [MapServer-users] [EXTERNAL] Vector tileindex with connectiontype OGR In-Reply-To: References: <0c6ff3ba957a4736b3376dc7052a9ce2@saabgroup.com> <327a7dea-295c-6451-aa6b-2ae12a70572f@spatialys.com> Message-ID: <64144a75-2e86-23e7-319d-03cbe3bf97d4@spatialys.com> Pete, actually this is documented in https://mapserver.org/input/vector/ogr.html#tileindex-with-ogr and tested in https://github.com/MapServer/MapServer/blob/1a45e6074b71738e576563ac39f60fd96ded50eb/msautotest/wxs/wfs_ogr_tileindexmixedsrs.map So for a OGR vector layer, the value of TILEINDEX must be a shapefile or a OGR datasource name, not a MapServer layer, contrary to raster support (contour layers use raster logic underneath). Even Le 08/12/2022 ? 16:44, Peter Schmitt a ?crit?: > > On Thu, Dec 8, 2022 at 12:55 AM Rahkonen Jukka > wrote: > > > We are using the ?layer-as-a-tileindex? method right now with a > bit older Mapserver version and with native POSTGIS connection > type. In the orthophoto layer we use > > I hope that this still works with Mapserver 8. It would be nice if > you could make a test and compare OGR vs POSTGIS connection types. > > > > This test is the closest I could find of ?layer-as-a-tileindex of > vectors" that makes me think it should work: > https://github.com/MapServer/MapServer/blob/1a45e6074b71738e576563ac39f60fd96ded50eb/msautotest/wxs/contour_tileindex.map#L70-L101 > > What version of MapServer are you using? > > Can you try this mapfile on your version of Mapserver? > > ### tindex.geojson > { > "type":"FeatureCollection","features":[{"type":"Feature","properties":{"location":"/app/mapfiles/test.geojson"},"geometry":{"type":"Polygon","coordinates":[[[122.013774753,29.96355712],[122.014247522,29.915620561],[122.06927508,29.916020438],[122.068828693,29.963957768],[122.013774753,29.96355712]]]}}]} > > ### test.geojson > {"type":"Feature","properties":{},"geometry":{"coordinates":[[[122.04067791363536,29.944772490597998],[122.03620089848994,29.94141730774004],[122.03819740524398,29.937852301951125],[122.0446709271447,29.938166866424368],[122.04648593328471,29.940211511256464],[122.04067791363536,29.944772490597998]]],"type":"Polygon"}} > > ### test2.map > > MAP > ? OUTPUTFORMAT > ? ? NAME "geojson" > ? ? DRIVER "OGR/GEOJSON" > ? ? MIMETYPE "application/json; subtype=geojson" > ? ? FORMATOPTION "STORAGE=memory" > ? ? FORMATOPTION "FORM=SIMPLE" > ? ? FORMATOPTION "LCO:RFC7946=NO" > ? ? FORMATOPTION "FILENAME=result.json" > ? END > > ? WEB > ? ? METADATA > ? ? ? "ows_enable_request" ? ? ? ? ? ? ?"*" > ? ? ? "wfs_getfeature_formatlist" ? ? ? "ogrgml,geojson" > ? ? END > ? END > ? CONFIG "MS_ERRORFILE" "stderr" > > ? PROJECTION > ? ? "init=epsg:4326" > ? END > > > ? # mapserv -nh > QUERY_STRING='service=WFS&VERSION=1.0.0&REQUEST=getfeature&map=/app/mapfiles/test2.map&typename=vector_directly&OUTPUTFORMAT=geojson' > ? # returns the contents of 'test.geojson'! > ? LAYER > ? ? NAME "vector_directly" > ? ? TYPE POLYGON > ? ? TILEINDEX "/app/mapfiles/tindex.geojson" > ? ? CONNECTIONTYPE OGR > ? ? STATUS OFF > ? END > > ? # mapserv -nh > QUERY_STRING='service=WFS&VERSION=1.0.0&REQUEST=getfeature&map=/app/mapfiles/test2.map&typename=tindex_ogr&OUTPUTFORMAT=geojson' > ? # returns contents of tindex.geojson! > ? LAYER > ? ? DEBUG 5 > ? ? NAME "tindex_ogr" > ? ? TYPE POLYGON > ? ? CONNECTIONTYPE OGR > ? ? CONNECTION "/app/mapfiles/tindex.geojson" > ? ? STATUS OFF > ? END > > ? # mapserv -nh > QUERY_STRING='service=WFS&VERSION=1.0.0&REQUEST=getfeature&map=/app/mapfiles/test2.map&typename=vector_tindex&OUTPUTFORMAT=geojson' > ? # returns 'msTiledSHPOpenFile(): Shapefile error. Tileindex layer > must be a shapefile.' > ? LAYER > ? ? NAME "vector_via_tindex" > ? ? TYPE POLYGON > ? ? TILEINDEX tindex_ogr > ? ? STATUS OFF > ? END > > ? # ?mapserv -nh > QUERY_STRING='service=WFS&VERSION=1.0.0&REQUEST=getfeature&map=/app/mapfiles/test2.map&typename=vector_via_ogr&OUTPUTFORMAT=geojson' > ? # returns 'msOGRFileOpen(): OGR error. Open failed for OGR > connection in layer `vector_via_ogr'.? File not found or > unsupported format. Check server logs.' > ? ? LAYER > ? ? ? ? DEBUG 5 > ? ? ? ? NAME "vector_via_ogr" > ? ? ? ? TYPE POLYGON > ? ? ? ? TILEINDEX tindex_ogr > ? ? ? ? CONNECTIONTYPE OGR > ? ? ? ? STATUS OFF > ? ? END > > END # mapfile > -- http://www.spatialys.com My software is free, but my time generally not. -------------- next part -------------- An HTML attachment was scrubbed... URL: From mniemyjski at cloudferro.com Fri Dec 9 02:54:57 2022 From: mniemyjski at cloudferro.com (Marcin Niemyjski) Date: Fri, 9 Dec 2022 10:54:57 +0000 Subject: [MapServer-users] Mapcache seeder - failed to parse file /var/www/aed_world.xml. Is it valid XML? on valid xml Message-ID: Hello, I have a problem, namely: I created .xml file, which is used to cache tiles into s3 bucket, here it is: https://pastebin.com/RwPAESUG while starting seeder the error is recived: failed to parse file /var/www/aed_world.xml. Is it valid XML? I've checked content of XML in online validator - no error was detected. Maybe somebody knows how to overcome this situation? Thank you, Marcin -------------- next part -------------- An HTML attachment was scrubbed... URL: From mniemyjski at cloudferro.com Fri Dec 9 06:01:35 2022 From: mniemyjski at cloudferro.com (Marcin Niemyjski) Date: Fri, 9 Dec 2022 14:01:35 +0000 Subject: [MapServer-users] Mapcache s3 - server replied: Not Found Message-ID: Hello, my mapcache xml to s3 bucket is working now but while trying to connect it to qgis using url created in xml (https://s3.waw3-1.cloudferro.com/mapcache/{tileset}/{grid}/{z}/{x}/{y}/{ext}) qgis returns: Failed to download capabilities: Download of capabilities failed: Error transferring https://s3.waw3-1.cloudferro.com/mapcache/%7Btileset%7D/%7Bgrid%7D/%7Bz%7D/%7Bx%7D/%7By%7D/%7Bext%7D?SERVICE=WMS&REQUEST=GetCapabilities - server replied: Not Found How can I start using my tiles? Best, Marcin -------------- next part -------------- An HTML attachment was scrubbed... URL: From jukka.rahkonen at maanmittauslaitos.fi Fri Dec 9 06:24:41 2022 From: jukka.rahkonen at maanmittauslaitos.fi (Rahkonen Jukka) Date: Fri, 9 Dec 2022 14:24:41 +0000 Subject: [MapServer-users] Mapcache s3 - server replied: Not Found In-Reply-To: References: Message-ID: Hi, It seems that you have tried to make a new WMS connection but you do not run any WMS server in s3. Instead, you have there tiles. Try this XYZ approach https://silverspringenergy.com/adding-xyz-tiles-to-a-qgis-project/. -Jukka Rahkonen- L?hett?j?: MapServer-users Puolesta Marcin Niemyjski via MapServer-users L?hetetty: perjantai 9. joulukuuta 2022 16.02 Vastaanottaja: Marcin Niemyjski via MapServer-users Aihe: [MapServer-users] Mapcache s3 - server replied: Not Found Hello, my mapcache xml to s3 bucket is working now but while trying to connect it to qgis using url created in xml (https://s3.waw3-1.cloudferro.com/mapcache/{tileset}/{grid}/{z}/{x}/{y}/{ext}) qgis returns: Failed to download capabilities: Download of capabilities failed: Error transferring https://s3.waw3-1.cloudferro.com/mapcache/%7Btileset%7D/%7Bgrid%7D/%7Bz%7D/%7Bx%7D/%7By%7D/%7Bext%7D?SERVICE=WMS&REQUEST=GetCapabilities - server replied: Not Found How can I start using my tiles? Best, Marcin -------------- next part -------------- An HTML attachment was scrubbed... URL: From mniemyjski at cloudferro.com Fri Dec 9 06:56:45 2022 From: mniemyjski at cloudferro.com (Marcin Niemyjski) Date: Fri, 9 Dec 2022 14:56:45 +0000 Subject: [MapServer-users] Slow Point Cluster Loading Message-ID: Hello, I would like to ask you to try out my newest WMS which is produced in partnership with OSM Poland. WMS link: http://64.225.130.48/?map=/etc/mapserver/aed_world.map What I would appreciate the most is advice how to speed up loading of WMS on low zoom levels, as you can see clustering of so many points take times. Thank you for your help, Marcin -------------- next part -------------- An HTML attachment was scrubbed... URL: From jbo-ads at mailo.com Fri Dec 9 07:01:55 2022 From: jbo-ads at mailo.com (jbo-ads at mailo.com) Date: Fri, 9 Dec 2022 16:01:55 +0100 (CET) Subject: [MapServer-users] Slow Point Cluster Loading In-Reply-To: Message-ID: I got: "mapserv(): Web application error. Traditional BROWSE mode requires a TEMPLATE in the WEB section, but none was provided." De : Marcin Niemyjski via MapServer-users ? : Marcin Niemyjski via MapServer-users Sujet : [MapServer-users] Slow Point Cluster Loading Date : 09/12/2022 15:56:45 Europe/Paris Hello, I would like to ask you to try out my newest WMS which is produced in partnership with OSM Poland. WMS link: http://64.225.130.48/?map=/etc/mapserver/aed_world.map What I would appreciate the most is advice how to speed up loading of WMS on low zoom levels, as you can see clustering of so many points take times. Thank you for your help, Marcin _______________________________________________ MapServer-users mailing list MapServer-users at lists.osgeo.org https://lists.osgeo.org/mailman/listinfo/mapserver-users -------------- next part -------------- An HTML attachment was scrubbed... URL: From jukka.rahkonen at maanmittauslaitos.fi Fri Dec 9 07:39:56 2022 From: jukka.rahkonen at maanmittauslaitos.fi (Rahkonen Jukka) Date: Fri, 9 Dec 2022 15:39:56 +0000 Subject: [MapServer-users] Slow Point Cluster Loading In-Reply-To: References: Message-ID: Hi, Of course you get that message from Mapserver because that is just the WMS base url. You or rather your WMS client like QGIS must add some WMS parameters to the request. http://64.225.130.48/?map=/etc/mapserver/aed_world.map&REQUEST=GetMap&SERVICE=WMS&VERSION=1.3.0&WIDTH=1000&HEIGHT=505&LAYERS=Latest&TRANSPARENT=TRUE&FORMAT=image%2Fpng&BBOX=-3.97009900990099E7,-2.0049E7,3.97009900990099E7,2.0049E7&CRS=EPSG:3857&STYLES=default -Jukka Rahkonen- L?hett?j?: MapServer-users Puolesta jbo-ads at mailo.com L?hetetty: perjantai 9. joulukuuta 2022 17.02 Vastaanottaja: Marcin Niemyjski via MapServer-users Aihe: Re: [MapServer-users] Slow Point Cluster Loading I got: "mapserv(): Web application error. Traditional BROWSE mode requires a TEMPLATE in the WEB section, but none was provided." De : Marcin Niemyjski via MapServer-users > ? : Marcin Niemyjski via MapServer-users > Sujet : [MapServer-users] Slow Point Cluster Loading Date : 09/12/2022 15:56:45 Europe/Paris Hello, I would like to ask you to try out my newest WMS which is produced in partnership with OSM Poland. WMS link: http://64.225.130.48/?map=/etc/mapserver/aed_world.map What I would appreciate the most is advice how to speed up loading of WMS on low zoom levels, as you can see clustering of so many points take times. Thank you for your help, Marcin _______________________________________________ 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 Michael.Kalbermatten at ne.ch Mon Dec 12 06:22:26 2022 From: Michael.Kalbermatten at ne.ch (=?iso-8859-1?Q?Kalbermatten_Micha=EBl?=) Date: Mon, 12 Dec 2022 14:22:26 +0000 Subject: [MapServer-users] Setting up Mapserver 8 on Windows Message-ID: Hi everbody, I just spend a couple of hours trying to set up Mapserver 8.0 on Windows. To do that, I downloaded the latest stable release from GisInternals. I am using Apache and FastCGI as webserver. Everything went smoothly until I tried to make Mapserver load the new needed configuration file. It was just always claiming that it couln't load this file ("msLoadConfig(): Unable to access file."), but I had set "SetEnv MAPSERVER_CONFIG_FILE" in my Apache configuration. Even setting MAPSERVER_CONFIG_FILE in a global system variable did not solve the issue. After quite a while, I found this issue on Mapserver's issue tracker: https://github.com/MapServer/MapServer/issues/6411 This had not a lot to do with my issue, but I discovered the existence of FcgidInitialEnv. Setting this variable (FcgidInitialEnv MAPSERVER_CONFIG_FILE "C:/whereever/mapserver.conf") solved the issue. So, is it mandatory to set FcgidInitialEnv when using Mapserver with FastCGI? If yes, wouldn't it be good to add something to the documentation (https://mapserver.org/mapfile/config.html). Moreover, I spied in the ms4w 5 package. It seemed to me that they were using FastCGI as well, but I could not find anything regarding FcgidInitialEnv, thus my question... Thanks a lot to anyone who would have some information regarding that. Best regards Michael -------------- next part -------------- An HTML attachment was scrubbed... URL: From joerg.thomsen at wheregroup.com Mon Dec 12 07:13:06 2022 From: joerg.thomsen at wheregroup.com (=?UTF-8?Q?J=c3=b6rg_Thomsen_=28WhereGroup=29?=) Date: Mon, 12 Dec 2022 16:13:06 +0100 Subject: [MapServer-users] Setting up Mapserver 8 on Windows In-Reply-To: References: Message-ID: Hi Micha?l, you are right, it depends on the cgi-mode. SetEnv in apache is used f?r cgi-variables and cgidInitialEnv is used f?r fast-cgi-variabes it's a general issue not only windows and more a webserver issue than one of MapServer. J?rg Am 12.12.22 um 15:22 schrieb Kalbermatten Micha?l: > Hi everbody, > > I just spend a couple of hours trying to set up Mapserver 8.0 on > Windows. To do that, I downloaded the latest stable release from > GisInternals. > > I am using Apache and FastCGI as webserver. > > Everything went smoothly until I tried to make Mapserver load the new > needed configuration file. It was just always claiming that it couln?t > load this file (?msLoadConfig(): Unable to access file.?), but I had set > ?SetEnv MAPSERVER_CONFIG_FILE? in my Apache configuration. Even setting > MAPSERVER_CONFIG_FILE in a global system variable did not solve the issue. > > After quite a while, I found this issue on Mapserver?s issue tracker: > https://github.com/MapServer/MapServer/issues/6411 > > > This had not a lot to do with my issue, but I discovered the existence > of FcgidInitialEnv. Setting this variable (FcgidInitialEnv > MAPSERVER_CONFIG_FILE "C:/whereever/mapserver.conf") solved the issue. > > So, is it mandatory to set FcgidInitialEnv when using Mapserver with > FastCGI? If yes, wouldn?t it be good to add something to the > documentation (https://mapserver.org/mapfile/config.html > ). > > Moreover, I spied in the ms4w 5 package. It seemed to me that they were > using FastCGI as well, but I could not find anything regarding > FcgidInitialEnv, thus my question? > > Thanks a lot to anyone who would have some information regarding that. > > Best regards > > Michael > > > _______________________________________________ > MapServer-users mailing list > MapServer-users at lists.osgeo.org > https://lists.osgeo.org/mailman/listinfo/mapserver-users -- Viele Gr??e, J?rg Thomsen --------------------------------------------- Where2B Konferenz 2022 15. Dezember 2022 in Bonn und Online where2b-conference.com --------------------------------------------- J?rg Thomsen WhereGroup GmbH Bundesallee 23 10717 Berlin Germany Tel: +49 (0)30 / 5130 278 74 Fax: +49 (0)30 / 5130 278 11 joerg.thomsen at wheregroup.com www.wheregroup.com Gesch?ftsf?hrer: Olaf Knopp, Peter Stamm Amtsgericht Bonn, HRB 9885 ------------------------------- Folgen Sie der WhereGroup auf twitter: http://twitter.com/WhereGroup_com From bob.basques at ci.stpaul.mn.us Mon Dec 12 11:33:31 2022 From: bob.basques at ci.stpaul.mn.us (Basques, Bob (CI-StPaul)) Date: Mon, 12 Dec 2022 19:33:31 +0000 Subject: [MapServer-users] OSGeo Local Chapter Meeting for Twin Cities (aka TCMUG) Message-ID: All, Next meeting will be at the Keg & Case on 7th Street in Saint Paul. We're going to try something a little different this time. There will be a 30 Min. virtual presentation to begin the meeting (@ ~4:30) and then continue with a F at F meeting until breakup. Presentation will be on Web Service Scraping with OGR by Jim Klassen and how it's being used in the UnderGround Utilities Mapping Project (UUMP) by Bob Basques. When: Dec. 14th, 2022, 4:30 Where: Keg & Case Virtual: meet.jit.si/osgeo_tcmug See you there. Bobb -------------- next part -------------- A non-text attachment was scrubbed... Name: winmail.dat Type: application/ms-tnef Size: 15824 bytes Desc: not available URL: From mniemyjski at cloudferro.com Wed Dec 14 03:23:07 2022 From: mniemyjski at cloudferro.com (Marcin Niemyjski) Date: Wed, 14 Dec 2022 11:23:07 +0000 Subject: [MapServer-users] Tileindex in format different than SHP? Message-ID: Hello, Can I use format different than SHP while using tileindex of rasters? When using Mapfile with configuration as below: LAYER ?????NAME "2021-01-02_high" STATUS ON TILEINDEX "/DyskPlanetiler/Sentinel1COG/2021/01/02/2021-01-02.gpkg" TILEITEM "location" TYPE RASTER MAXSCALEDENOM 4000000 GROUP "2021-01-02" PROJECTION "init=epsg:4326" END END error is recived: msShapefileOpen(): Unable to access file. (/DyskPlanetiler/Sentinel1COG/2021/01/01/2021-01-01.gpkg) is there a way to use geopackage or flatgeobuf as indexes or do I have to go back to shp? Best, Marcin -------------- next part -------------- An HTML attachment was scrubbed... URL: From jukka.rahkonen at maanmittauslaitos.fi Wed Dec 14 04:01:03 2022 From: jukka.rahkonen at maanmittauslaitos.fi (Rahkonen Jukka) Date: Wed, 14 Dec 2022 12:01:03 +0000 Subject: [MapServer-users] Tileindex in format different than SHP? In-Reply-To: References: Message-ID: Hi, We should improve our documentation about tileindexes and differences between raster tileindex and OGR tileindex, and shapefile index and indexes using other formats. At least I do not find correct information easily even after using tileindexes for 15 years or more. For rasters, if the tileindex in not SHP then user must first create a vector layer from the tileindex source. Then this layer is used as a tileindex for the raster layer. I found this example from the wiki https://trac.osgeo.org/mapserver/wiki/DatabaseTileIndex It should be clear enough to be used as a template if you don?t pay attention to Oracle raster specific details. I recommend to publish the vector layer first into WMS and check with a WMS client that the layer really works and you can see the footprints of the images first. Make also sure that the LOCATION gets selected. With GeoPackage you should have something like this in your mapfile CONNECTIONTYPE OGR CONNECTION "path/to/geopackage.gpkg" #DATA "my_layer" or if you want more control to the layer DATA "SELECT geometry, location FROM my_layer" If you now read carefully LAYER ? MapServer 8.0.0 documentation from the TILEINDEX keyword again you do see the information about two alternatives filename|layername, and that a filename works only for shapefiles. -Jukka Rahkonen- L?hett?j?: MapServer-users Puolesta Marcin Niemyjski via MapServer-users L?hetetty: keskiviikko 14. joulukuuta 2022 13.23 Vastaanottaja: Marcin Niemyjski via MapServer-users Aihe: [MapServer-users] Tileindex in format different than SHP? Hello, Can I use format different than SHP while using tileindex of rasters? When using Mapfile with configuration as below: LAYER ?????NAME "2021-01-02_high" STATUS ON TILEINDEX "/DyskPlanetiler/Sentinel1COG/2021/01/02/2021-01-02.gpkg" TILEITEM "location" TYPE RASTER MAXSCALEDENOM 4000000 GROUP "2021-01-02" PROJECTION "init=epsg:4326" END END error is recived: msShapefileOpen(): Unable to access file. (/DyskPlanetiler/Sentinel1COG/2021/01/01/2021-01-01.gpkg) is there a way to use geopackage or flatgeobuf as indexes or do I have to go back to shp? Best, Marcin -------------- next part -------------- An HTML attachment was scrubbed... URL: From jmckenna at gatewaygeomatics.com Wed Dec 14 04:51:37 2022 From: jmckenna at gatewaygeomatics.com (Jeff McKenna) Date: Wed, 14 Dec 2022 08:51:37 -0400 Subject: [MapServer-users] Tileindex in format different than SHP? In-Reply-To: References: Message-ID: <403ea018-8e7b-1b54-dfc6-dcc0f8237f7b@gatewaygeomatics.com> I had recently spent a few weeks of effort on updating the documentation for TILEINDEX, with many examples, see : https://mapserver.org/optimization/tileindex.html -jeff -- Jeff McKenna GatewayGeo: Developers of MS4W, MapServer Consulting and Training co-founder of FOSS4G http://gatewaygeo.com/ On 2022-12-14 7:23 a.m., Marcin Niemyjski via MapServer-users wrote: > Hello, > > Can I use format different than SHP while using tileindex of rasters? > > When using Mapfile with configuration as below: > > LAYER > ? ? ? ??????NAME "2021-01-02_high" > ? ? ? ? STATUS ON > ? ? ? ? TILEINDEX "/DyskPlanetiler/Sentinel1COG/2021/01/02/2021-01-02.gpkg" > ? ? ? ? TILEITEM "location" > ? ? ? ? TYPE RASTER > ? ? ? ? MAXSCALEDENOM 4000000 > ? ? ? ? GROUP "2021-01-02" > ? ? ? ? PROJECTION > ? ? ? ? ? ? "init=epsg:4326" > ? ? ? ? END > END > > error is recived: > msShapefileOpen(): Unable to access file. > (/DyskPlanetiler/Sentinel1COG/2021/01/01/2021-01-01.gpkg) > > is there a way to use geopackage or flatgeobuf as indexes or do I have > to go back to shp? > > Best, > Marcin > > _______________________________________________ > MapServer-users mailing list > MapServer-users at lists.osgeo.org > https://lists.osgeo.org/mailman/listinfo/mapserver-users From mniemyjski at cloudferro.com Wed Dec 14 05:07:47 2022 From: mniemyjski at cloudferro.com (Marcin Niemyjski) Date: Wed, 14 Dec 2022 13:07:47 +0000 Subject: [MapServer-users] Tileindex in format different than SHP? In-Reply-To: <403ea018-8e7b-1b54-dfc6-dcc0f8237f7b@gatewaygeomatics.com> References: <403ea018-8e7b-1b54-dfc6-dcc0f8237f7b@gatewaygeomatics.com> Message-ID: Jeff, I checked TILEINDEX documentation before writing to you. I found no information's about other formats except that shapefile is usually used. Jukka, I created an extra layer as you suggested, thanks - it works, but I will stay with Shapefiles on this one. When working with tileindex as extra layer it takes 2x more time for mapserver to render the layer. Thank you all, Marcin ________________________________ From: MapServer-users on behalf of Jeff McKenna Sent: Wednesday, December 14, 2022 1:51 PM To: mapserver-users at lists.osgeo.org Subject: Re: [MapServer-users] Tileindex in format different than SHP? I had recently spent a few weeks of effort on updating the documentation for TILEINDEX, with many examples, see : https://mapserver.org/optimization/tileindex.html -jeff -- Jeff McKenna GatewayGeo: Developers of MS4W, MapServer Consulting and Training co-founder of FOSS4G http://gatewaygeo.com/ On 2022-12-14 7:23 a.m., Marcin Niemyjski via MapServer-users wrote: > Hello, > > Can I use format different than SHP while using tileindex of rasters? > > When using Mapfile with configuration as below: > > LAYER > ?????NAME "2021-01-02_high" > STATUS ON > TILEINDEX "/DyskPlanetiler/Sentinel1COG/2021/01/02/2021-01-02.gpkg" > TILEITEM "location" > TYPE RASTER > MAXSCALEDENOM 4000000 > GROUP "2021-01-02" > PROJECTION > "init=epsg:4326" > END > END > > error is recived: > msShapefileOpen(): Unable to access file. > (/DyskPlanetiler/Sentinel1COG/2021/01/01/2021-01-01.gpkg) > > is there a way to use geopackage or flatgeobuf as indexes or do I have > to go back to shp? > > Best, > Marcin > > _______________________________________________ > MapServer-users mailing list > MapServer-users at lists.osgeo.org > https://lists.osgeo.org/mailman/listinfo/mapserver-users _______________________________________________ MapServer-users mailing list MapServer-users at lists.osgeo.org https://lists.osgeo.org/mailman/listinfo/mapserver-users -------------- next part -------------- An HTML attachment was scrubbed... URL: From jukka.rahkonen at maanmittauslaitos.fi Wed Dec 14 05:36:31 2022 From: jukka.rahkonen at maanmittauslaitos.fi (Rahkonen Jukka) Date: Wed, 14 Dec 2022 13:36:31 +0000 Subject: [MapServer-users] Tileindex in format different than SHP? In-Reply-To: References: <403ea018-8e7b-1b54-dfc6-dcc0f8237f7b@gatewaygeomatics.com> Message-ID: Hi, You are wrong, a GeoPackage layer as a tileindex is about as fast as a shapefile in common bbox filtering that WMS is, and faster than shapefile index if you want to filter or sort the data by other attributes. That is based on my measurements from some years ago with an orthophoto layer having about 80000 rows in the index. Your data can be different but make a proper test and then jugde by the facts. There is no need to render the tileindex layer once you have made it to work. However, it does offer a handy way for letting your users to query metadata from the individual images with GetFeatureInfo if you happen to have that kind of needs. -Jukka Rahkonen- L?hett?j?: MapServer-users Puolesta Marcin Niemyjski via MapServer-users L?hetetty: keskiviikko 14. joulukuuta 2022 15.08 Vastaanottaja: Jeff McKenna ; mapserver-users at lists.osgeo.org Aihe: Re: [MapServer-users] Tileindex in format different than SHP? Jeff, I checked TILEINDEX documentation before writing to you. I found no information's about other formats except that shapefile is usually used. Jukka, I created an extra layer as you suggested, thanks - it works, but I will stay with Shapefiles on this one. When working with tileindex as extra layer it takes 2x more time for mapserver to render the layer. Thank you all, Marcin ________________________________ From: MapServer-users > on behalf of Jeff McKenna > Sent: Wednesday, December 14, 2022 1:51 PM To: mapserver-users at lists.osgeo.org > Subject: Re: [MapServer-users] Tileindex in format different than SHP? I had recently spent a few weeks of effort on updating the documentation for TILEINDEX, with many examples, see : https://mapserver.org/optimization/tileindex.html -jeff -- Jeff McKenna GatewayGeo: Developers of MS4W, MapServer Consulting and Training co-founder of FOSS4G http://gatewaygeo.com/ On 2022-12-14 7:23 a.m., Marcin Niemyjski via MapServer-users wrote: > Hello, > > Can I use format different than SHP while using tileindex of rasters? > > When using Mapfile with configuration as below: > > LAYER > ?????NAME "2021-01-02_high" > STATUS ON > TILEINDEX "/DyskPlanetiler/Sentinel1COG/2021/01/02/2021-01-02.gpkg" > TILEITEM "location" > TYPE RASTER > MAXSCALEDENOM 4000000 > GROUP "2021-01-02" > PROJECTION > "init=epsg:4326" > END > END > > error is recived: > msShapefileOpen(): Unable to access file. > (/DyskPlanetiler/Sentinel1COG/2021/01/01/2021-01-01.gpkg) > > is there a way to use geopackage or flatgeobuf as indexes or do I have > to go back to shp? > > Best, > Marcin > > _______________________________________________ > 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 mniemyjski at cloudferro.com Wed Dec 14 05:48:03 2022 From: mniemyjski at cloudferro.com (Marcin Niemyjski) Date: Wed, 14 Dec 2022 13:48:03 +0000 Subject: [MapServer-users] Tileindex in format different than SHP? In-Reply-To: References: <403ea018-8e7b-1b54-dfc6-dcc0f8237f7b@gatewaygeomatics.com> Message-ID: Jukka, thanks, I will do more tests. Marcin ________________________________ From: Rahkonen Jukka Sent: Wednesday, December 14, 2022 2:36 PM To: Marcin Niemyjski ; Jeff McKenna ; mapserver-users at lists.osgeo.org Subject: VS: [MapServer-users] Tileindex in format different than SHP? Hi, You are wrong, a GeoPackage layer as a tileindex is about as fast as a shapefile in common bbox filtering that WMS is, and faster than shapefile index if you want to filter or sort the data by other attributes. That is based on my measurements from some years ago with an orthophoto layer having about 80000 rows in the index. Your data can be different but make a proper test and then jugde by the facts. There is no need to render the tileindex layer once you have made it to work. However, it does offer a handy way for letting your users to query metadata from the individual images with GetFeatureInfo if you happen to have that kind of needs. -Jukka Rahkonen- L?hett?j?: MapServer-users Puolesta Marcin Niemyjski via MapServer-users L?hetetty: keskiviikko 14. joulukuuta 2022 15.08 Vastaanottaja: Jeff McKenna ; mapserver-users at lists.osgeo.org Aihe: Re: [MapServer-users] Tileindex in format different than SHP? Jeff, I checked TILEINDEX documentation before writing to you. I found no information's about other formats except that shapefile is usually used. Jukka, I created an extra layer as you suggested, thanks - it works, but I will stay with Shapefiles on this one. When working with tileindex as extra layer it takes 2x more time for mapserver to render the layer. Thank you all, Marcin ________________________________ From: MapServer-users > on behalf of Jeff McKenna > Sent: Wednesday, December 14, 2022 1:51 PM To: mapserver-users at lists.osgeo.org > Subject: Re: [MapServer-users] Tileindex in format different than SHP? I had recently spent a few weeks of effort on updating the documentation for TILEINDEX, with many examples, see : https://mapserver.org/optimization/tileindex.html -jeff -- Jeff McKenna GatewayGeo: Developers of MS4W, MapServer Consulting and Training co-founder of FOSS4G http://gatewaygeo.com/ On 2022-12-14 7:23 a.m., Marcin Niemyjski via MapServer-users wrote: > Hello, > > Can I use format different than SHP while using tileindex of rasters? > > When using Mapfile with configuration as below: > > LAYER > ?????NAME "2021-01-02_high" > STATUS ON > TILEINDEX "/DyskPlanetiler/Sentinel1COG/2021/01/02/2021-01-02.gpkg" > TILEITEM "location" > TYPE RASTER > MAXSCALEDENOM 4000000 > GROUP "2021-01-02" > PROJECTION > "init=epsg:4326" > END > END > > error is recived: > msShapefileOpen(): Unable to access file. > (/DyskPlanetiler/Sentinel1COG/2021/01/01/2021-01-01.gpkg) > > is there a way to use geopackage or flatgeobuf as indexes or do I have > to go back to shp? > > Best, > Marcin > > _______________________________________________ > 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 arnold.nicholas at mastersystem.co.id Wed Dec 14 05:50:29 2022 From: arnold.nicholas at mastersystem.co.id (Arnold Nicholas Tua Sibuea) Date: Wed, 14 Dec 2022 20:50:29 +0700 Subject: [MapServer-users] WMS Server In-Reply-To: References: Message-ID: Hi , Does anywant can give recommendation of the Hardware spec for WMS Server? Thanks in advance Arnold -----Original Message----- From: MapServer-users On Behalf Of mapserver-users-request at lists.osgeo.org Sent: 14 December 2022 20:48 To: mapserver-users at lists.osgeo.org Subject: MapServer-users Digest, Vol 179, Issue 22 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. Re: Tileindex in format different than SHP? (Marcin Niemyjski) ---------------------------------------------------------------------- Message: 1 Date: Wed, 14 Dec 2022 13:48:03 +0000 From: Marcin Niemyjski To: Rahkonen Jukka , "mapserver-users at lists.osgeo.org" Subject: Re: [MapServer-users] Tileindex in format different than SHP? Message-ID: Content-Type: text/plain; charset="utf-8" Jukka, thanks, I will do more tests. Marcin ________________________________ From: Rahkonen Jukka Sent: Wednesday, December 14, 2022 2:36 PM To: Marcin Niemyjski ; Jeff McKenna ; mapserver-users at lists.osgeo.org Subject: VS: [MapServer-users] Tileindex in format different than SHP? Hi, You are wrong, a GeoPackage layer as a tileindex is about as fast as a shapefile in common bbox filtering that WMS is, and faster than shapefile index if you want to filter or sort the data by other attributes. That is based on my measurements from some years ago with an orthophoto layer having about 80000 rows in the index. Your data can be different but make a proper test and then jugde by the facts. There is no need to render the tileindex layer once you have made it to work. However, it does offer a handy way for letting your users to query metadata from the individual images with GetFeatureInfo if you happen to have that kind of needs. -Jukka Rahkonen- L?hett?j?: MapServer-users Puolesta Marcin Niemyjski via MapServer-users L?hetetty: keskiviikko 14. joulukuuta 2022 15.08 Vastaanottaja: Jeff McKenna ; mapserver-users at lists.osgeo.org Aihe: Re: [MapServer-users] Tileindex in format different than SHP? Jeff, I checked TILEINDEX documentation before writing to you. I found no information's about other formats except that shapefile is usually used. Jukka, I created an extra layer as you suggested, thanks - it works, but I will stay with Shapefiles on this one. When working with tileindex as extra layer it takes 2x more time for mapserver to render the layer. Thank you all, Marcin ________________________________ From: MapServer-users > on behalf of Jeff McKenna > Sent: Wednesday, December 14, 2022 1:51 PM To: mapserver-users at lists.osgeo.org > Subject: Re: [MapServer-users] Tileindex in format different than SHP? I had recently spent a few weeks of effort on updating the documentation for TILEINDEX, with many examples, see : https://mapserver.org/optimization/tileindex.html -jeff -- Jeff McKenna GatewayGeo: Developers of MS4W, MapServer Consulting and Training co-founder of FOSS4G http://gatewaygeo.com/ On 2022-12-14 7:23 a.m., Marcin Niemyjski via MapServer-users wrote: > Hello, > > Can I use format different than SHP while using tileindex of rasters? > > When using Mapfile with configuration as below: > > LAYER > ?????NAME "2021-01-02_high" > STATUS ON > TILEINDEX "/DyskPlanetiler/Sentinel1COG/2021/01/02/2021-01-02.gpkg" > TILEITEM "location" > TYPE RASTER > MAXSCALEDENOM 4000000 > GROUP "2021-01-02" > PROJECTION > "init=epsg:4326" > END > END > > error is recived: > msShapefileOpen(): Unable to access file. > (/DyskPlanetiler/Sentinel1COG/2021/01/01/2021-01-01.gpkg) > > is there a way to use geopackage or flatgeobuf as indexes or do I have > to go back to shp? > > Best, > Marcin > > _______________________________________________ > MapServer-users mailing list > MapServer-users at lists.osgeo.org > > https://lists.osgeo.org/mailman/listinfo/mapserver-users .safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.osgeo.org%2 > Fmailman%2Flistinfo%2Fmapserver-users&data=05%7C01%7Cjukka.rahkonen%40 > maanmittauslaitos.fi%7C97a0ff74ad814a33ecf308daddd43c70%7Cc4f8a6325580 > 4a1c92371d5a571b71fa%7C0%7C0%7C638066200868945991%7CUnknown%7CTWFpbGZs > b3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D > %7C3000%7C%7C%7C&sdata=uBO9pSmK8xEv5WITuBjAfQJ26kes%2FdMM4gS4KQdH85o%3 > D&reserved=0> _______________________________________________ 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: ------------------------------ 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 179, Issue 22 ************************************************ From bob.basques at ci.stpaul.mn.us Wed Dec 14 07:33:07 2022 From: bob.basques at ci.stpaul.mn.us (Basques, Bob (CI-StPaul)) Date: Wed, 14 Dec 2022 15:33:07 +0000 Subject: [MapServer-users] [REMINDER] OSGeo Local Chapter Meeting for Twin Cities (aka TCMUG) Message-ID: <0DA2DCBD-6168-4C1A-BE72-100EA248B3D9@ci.stpaul.mn.us> All, We?re still a go for this meeting this afternoon. I looked at the weather and things should be ok traffic wise later this afternoon. Bobb All, Next meeting will be at the Keg & Case on 7th Street in Saint Paul. We?re going to try something a little different this time. There will be a 30 Min. virtual presentation to begin the meeting (@ ~4:30) and then continue with a F at F meeting until breakup. Presentation will be on Web Service Scraping with OGR by Jim Klassen and how it?s being used in the UnderGround Utilities Mapping Project (UUMP) by Bob Basques. When: Dec. 14th, 2022, 4:30 Where: Keg & Case Virtual: meet.jit.si/osgeo_tcmug See you there. Bobb -------------- next part -------------- An HTML attachment was scrubbed... URL: From tchaddad at gmail.com Fri Dec 16 14:12:03 2022 From: tchaddad at gmail.com (TC Haddad) Date: Fri, 16 Dec 2022 14:12:03 -0800 Subject: [MapServer-users] Format of numeric query results in GML Message-ID: Hi all, I have a MapServer WMS that is returning GML query results, and all works well except that non-integer numeric fields are returning in scientific notation, eg.: 4.86010000000e+02 1100 3.58893542070e+01 -1.20962789560e+02 7.50000000000e-01 I see there is a metadata setting "*gml_[item name]_precision*" [1] that should allow specifying precision of these fields, but it seems it is not intended for GML output. Is this correct? For example I tried setting this for the SIZE field: 'gml_SIZE_type' 'Real' 'gml_SIZE_precision' '2' but this had no effect on the GML output: 7.50000000000e-01 Is there another way that I can accomplish better output from this service? The source data format is a shapefile, and unlikely to change in this case. thanks for any suggestions, Tanya [1] https://mapserver.org/ogc/wfs_server.html -------------- next part -------------- An HTML attachment was scrubbed... URL: From steve.lime at state.mn.us Sat Dec 17 07:32:35 2022 From: steve.lime at state.mn.us (Lime, Steve D (MNIT)) Date: Sat, 17 Dec 2022 15:32:35 +0000 Subject: [MapServer-users] Format of numeric query results in GML In-Reply-To: References: Message-ID: Hi Tanya: You might want to try using an OGR output format (https://mapserver.org/output/ogr_output.html#ogr-output). It supports GML as well and should provide a little more control and does respect the precision metadata. --Steve From: MapServer-users On Behalf Of TC Haddad Sent: Friday, December 16, 2022 4:12 PM To: Mapserver Subject: [MapServer-users] Format of numeric query results in GML Hi all, I have a MapServer WMS that is returning GML query results, and all works well except that non-integer numeric fields are returning in scientific notation, eg.: 4.86010000000e+02 1100 3.58893542070e+01 -1.20962789560e+02 7.50000000000e-01 I see there is a metadata setting "gml_[item name]_precision" [1] that should allow specifying precision of these fields, but it seems it is not intended for GML output. Is this correct? For example I tried setting this for the SIZE field: 'gml_SIZE_type' 'Real' 'gml_SIZE_precision' '2' but this had no effect on the GML output: 7.50000000000e-01 Is there another way that I can accomplish better output from this service? The source data format is a shapefile, and unlikely to change in this case. thanks for any suggestions, Tanya [1] https://mapserver.org/ogc/wfs_server.html -------------- next part -------------- An HTML attachment was scrubbed... URL: From bob.basques at ci.stpaul.mn.us Mon Dec 19 11:20:55 2022 From: bob.basques at ci.stpaul.mn.us (Basques, Bob (CI-StPaul)) Date: Mon, 19 Dec 2022 19:20:55 +0000 Subject: [MapServer-users] .symbol file and multiple FONT calls . . . Message-ID: All, I'm getting funny error when trying to reference two different FONT files from inside of the same .SYMBOL file. I have these symbols: SYMBOL NAME 'co_highway_front' TYPE TRUETYPE FONT 'shields-co' CHARACTER 'V' ANTIALIAS TRUE END SYMBOL NAME 'co_highway_back' TYPE TRUETYPE FONT 'shields-co' CHARACTER 'U' ANTIALIAS TRUE END SYMBOL NAME 'interstate1_wide_back' TYPE TRUETYPE FONT 'shields' CHARACTER '7' ANTIALIAS TRUE END SYMBOL NAME 'interstate1_wide_front' TYPE TRUETYPE FONT 'shields' CHARACTER '8' ANTIALIAS TRUE END Whenever I try to reference one of the SYMBOL names that goes to the 'sheilds_co' font I get this error: msLoadMSRasterBufferFromFile(): General error message. unable to open file /srv/www/datasets/PUBLIC/TRANSPORTATION/STP_CENTERLINE/co_highway_front for reading All the symbols work for the 'shields' font. I'm not sure how the SYMBOL NAME is being passed as a filename to Mapserver either . . . Here is the .font definitions: shields ./DDVMN01B.TTF shields-co ./DDVMN19B.TTF arial-bold ./ARIALBD.TTF action ./Action_Bold.ttf bluehigh ./bluehigh.ttf The two font files in question both open up in the font explorer just fine. Any thoughts? Thanks. I think I'm missing something simple. Bobb My machine - - - PW19-S295-C024 -------------- next part -------------- A non-text attachment was scrubbed... Name: winmail.dat Type: application/ms-tnef Size: 21199 bytes Desc: not available URL: From mniemyjski at cloudferro.com Tue Dec 20 00:42:24 2022 From: mniemyjski at cloudferro.com (Marcin Niemyjski) Date: Tue, 20 Dec 2022 08:42:24 +0000 Subject: [MapServer-users] Failed to download capabilities:Download of capabilities failed: Connection on mapfile with more than 1000 layers Message-ID: Hello, I have a mapfile which constist of 1200 layers. While loading to qgis error "Failed to download capabilities:Download of capabilities failed: Connection" is recived. Does this happen becaues of quantitu of layers in mapfile? Is there any workaround? Best, Marcin -------------- next part -------------- An HTML attachment was scrubbed... URL: From jukka.rahkonen at maanmittauslaitos.fi Tue Dec 20 00:52:39 2022 From: jukka.rahkonen at maanmittauslaitos.fi (Rahkonen Jukka) Date: Tue, 20 Dec 2022 08:52:39 +0000 Subject: [MapServer-users] Failed to download capabilities:Download of capabilities failed: Connection on mapfile with more than 1000 layers In-Reply-To: References: Message-ID: Hi, With that information we cannot really say. Can you get the GetCapabilities document by making the request with a browser or with curl? Is QGIS happy with 500 layers? I suppose that the default request timeout of Apache http server (do you use it?) is 60 seconds, have you tried to increase that? Are you sure that you are trying to correct the right thing? Do you really need more than 1000 layers? Could you perhaps do the same thing with less layers with filtering? If you need +1000 layers you could consider saving the GetCapabilities response into a static file that is much faster to serve. Just remember to update the static file when your layers change. -Jukka Rahkonen- L?hett?j?: MapServer-users Puolesta Marcin Niemyjski via MapServer-users L?hetetty: tiistai 20. joulukuuta 2022 10.42 Vastaanottaja: Marcin Niemyjski via MapServer-users Aihe: [MapServer-users] Failed to download capabilities:Download of capabilities failed: Connection on mapfile with more than 1000 layers Hello, I have a mapfile which constist of 1200 layers. While loading to qgis error "Failed to download capabilities:Download of capabilities failed: Connection" is recived. Does this happen becaues of quantitu of layers in mapfile? Is there any workaround? Best, Marcin -------------- next part -------------- An HTML attachment was scrubbed... URL: From joerg.thomsen at wheregroup.com Tue Dec 20 00:59:10 2022 From: joerg.thomsen at wheregroup.com (=?UTF-8?Q?J=c3=b6rg_Thomsen_=28WhereGroup=29?=) Date: Tue, 20 Dec 2022 09:59:10 +0100 Subject: [MapServer-users] Failed to download capabilities:Download of capabilities failed: Connection on mapfile with more than 1000 layers In-Reply-To: References: Message-ID: <6cd85892-6aae-a549-4d5e-0d51bdf36194@wheregroup.com> Hi, funny, how you type twelve. 1200 are very much and I guess no one has tried this before. So to your question: I would say yes. I suggest to split it into several services / mapfiles. The capability-xml ist very big I think and most clients will habe problems with it. The usability is bad, the users have to scroll through 1200 Layers, puh. And I don't know whether a getMap with http-get will work (is there a current length-limit in http-get?). J?rg Am 20.12.22 um 09:42 schrieb Marcin Niemyjski via MapServer-users: > Hello, > > I have a mapfile which constist of 1200 layers. While loading to qgis > error "Failed to download capabilities:Download of capabilities failed: > Connection" is recived. > > Does this happen becaues of quantitu of layers in mapfile? Is there any > workaround? > > Best, > Marcin > > _______________________________________________ > 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! 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 jmckenna at gatewaygeomatics.com Tue Dec 20 04:05:52 2022 From: jmckenna at gatewaygeomatics.com (Jeff McKenna) Date: Tue, 20 Dec 2022 07:05:52 -0500 Subject: [MapServer-users] Failed to download capabilities:Download of capabilities failed: Connection on mapfile with more than 1000 layers In-Reply-To: References: Message-ID: On 2022-12-20 3:42 a.m., Marcin Niemyjski via MapServer-users wrote: > Failed to download capabilities:Download of capabilities failed I would take QGIS out of the equation, as recent MapServer does not have a layer limit, see my instructions to test the exact QGIS requests in your browser instead, at https://github.com/MapServer/MapServer/wiki/Get-the-Raw-WMS-Request-Generated-by-QGIS (also note the mention of QGIS caching the GetCapabilities there, and the workaround, as you modify your services) Wishing all, the MapServer community, a wonderful Christmas with your families. -jeff -- Jeff McKenna GatewayGeo: Developers of MS4W, MapServer Consulting and Training co-founder of FOSS4G http://gatewaygeo.com/ From oskar.ravhed at t-kartor.com Tue Dec 20 04:08:34 2022 From: oskar.ravhed at t-kartor.com (Oskar Ravhed) Date: Tue, 20 Dec 2022 13:08:34 +0100 Subject: [MapServer-users] Failed to download capabilities:Download of capabilities failed: Connection on mapfile with more than 1000 layers In-Reply-To: <6cd85892-6aae-a549-4d5e-0d51bdf36194@wheregroup.com> References: <6cd85892-6aae-a549-4d5e-0d51bdf36194@wheregroup.com> Message-ID: <128ccc90-93b3-0009-f33f-87351048b194@t-kartor.com> Hello! I have 3234 layers in a service and it works fine. also works fine with 10.000 layers 1 try the getcap in browser 2a if step 1 is success change network timeout in qgis 2b if step 1 does not work change timeouts on server and check mapserver log On 20/12/2022 09:59, J?rg Thomsen (WhereGroup) wrote: > Hi, > > funny, how you type twelve. > > 1200 are very much and I guess no one has tried this before. > So to your question: I would say yes. > > I suggest to split it into several services / mapfiles. The > capability-xml ist very big I think and most clients will habe > problems with it. The usability is bad, the users have to scroll > through 1200 Layers, puh. And I don't know whether a getMap with > http-get will work (is there a current length-limit in http-get?). > > > J?rg > > > ?Am 20.12.22 um 09:42 schrieb Marcin Niemyjski via MapServer-users: >> Hello, >> >> I have a mapfile which constist of 1200 layers. While loading to qgis >> error "Failed to download capabilities:Download of capabilities >> failed: Connection" is recived. >> >> Does this happen becaues of quantitu of layers in mapfile? Is there >> any workaround? >> >> Best, >> Marcin >> >> _______________________________________________ >> MapServer-users mailing list >> MapServer-users at lists.osgeo.org >> https://lists.osgeo.org/mailman/listinfo/mapserver-users > From mniemyjski at cloudferro.com Tue Dec 20 06:17:49 2022 From: mniemyjski at cloudferro.com (Marcin Niemyjski) Date: Tue, 20 Dec 2022 14:17:49 +0000 Subject: [MapServer-users] Failed to download capabilities:Download of capabilities failed: Connection on mapfile with more than 1000 layers In-Reply-To: <128ccc90-93b3-0009-f33f-87351048b194@t-kartor.com> References: <6cd85892-6aae-a549-4d5e-0d51bdf36194@wheregroup.com> <128ccc90-93b3-0009-f33f-87351048b194@t-kartor.com> Message-ID: Great advice, thank you Oskar. Could you tell me how long it takes to load the WMS into qgis or GetCap with that many layers? I am also interested in what purpose you are using the WMS with this amount of data. Could you share it? In my case it is daily Sentinel-1 imagery for the whole world from the beginning of 2021. Merry Christmas to all, Marcin ________________________________ From: MapServer-users on behalf of Oskar Ravhed Sent: Tuesday, December 20, 2022 1:08 PM To: mapserver-users at lists.osgeo.org Subject: Re: [MapServer-users] Failed to download capabilities:Download of capabilities failed: Connection on mapfile with more than 1000 layers Hello! I have 3234 layers in a service and it works fine. also works fine with 10.000 layers 1 try the getcap in browser 2a if step 1 is success change network timeout in qgis 2b if step 1 does not work change timeouts on server and check mapserver log On 20/12/2022 09:59, J?rg Thomsen (WhereGroup) wrote: > Hi, > > funny, how you type twelve. > > 1200 are very much and I guess no one has tried this before. > So to your question: I would say yes. > > I suggest to split it into several services / mapfiles. The > capability-xml ist very big I think and most clients will habe > problems with it. The usability is bad, the users have to scroll > through 1200 Layers, puh. And I don't know whether a getMap with > http-get will work (is there a current length-limit in http-get?). > > > J?rg > > > Am 20.12.22 um 09:42 schrieb Marcin Niemyjski via MapServer-users: >> Hello, >> >> I have a mapfile which constist of 1200 layers. While loading to qgis >> error "Failed to download capabilities:Download of capabilities >> failed: Connection" is recived. >> >> Does this happen becaues of quantitu of layers in mapfile? Is there >> any workaround? >> >> Best, >> Marcin >> >> _______________________________________________ >> MapServer-users mailing list >> MapServer-users at lists.osgeo.org >> https://lists.osgeo.org/mailman/listinfo/mapserver-users > _______________________________________________ MapServer-users mailing list MapServer-users at lists.osgeo.org https://lists.osgeo.org/mailman/listinfo/mapserver-users -------------- next part -------------- An HTML attachment was scrubbed... URL: From jukka.rahkonen at maanmittauslaitos.fi Tue Dec 20 06:38:53 2022 From: jukka.rahkonen at maanmittauslaitos.fi (Rahkonen Jukka) Date: Tue, 20 Dec 2022 14:38:53 +0000 Subject: [MapServer-users] Failed to download capabilities:Download of capabilities failed: Connection on mapfile with more than 1000 layers In-Reply-To: References: <6cd85892-6aae-a549-4d5e-0d51bdf36194@wheregroup.com> <128ccc90-93b3-0009-f33f-87351048b194@t-kartor.com> Message-ID: Hi, The time is not a constant (number of layers * x milliseconds). For example, it is faster to generate the layer BoundingBox into GetCapabilities if the wms_extent metadata is set for the layer https://www.mapserver.org/ogc/wms_server.html but how much faster it is depends on the data source. I think that instead of 1200 layers you could have just one time enabled layer https://www.mapserver.org/ogc/wms_time.html. -Jukka Rahkonen- L?hett?j?: MapServer-users Puolesta Marcin Niemyjski via MapServer-users L?hetetty: tiistai 20. joulukuuta 2022 16.18 Vastaanottaja: Oskar Ravhed ; mapserver-users at lists.osgeo.org Aihe: Re: [MapServer-users] Failed to download capabilities:Download of capabilities failed: Connection on mapfile with more than 1000 layers Great advice, thank you Oskar. Could you tell me how long it takes to load the WMS into qgis or GetCap with that many layers? I am also interested in what purpose you are using the WMS with this amount of data. Could you share it? In my case it is daily Sentinel-1 imagery for the whole world from the beginning of 2021. Merry Christmas to all, Marcin ________________________________ From: MapServer-users > on behalf of Oskar Ravhed > Sent: Tuesday, December 20, 2022 1:08 PM To: mapserver-users at lists.osgeo.org > Subject: Re: [MapServer-users] Failed to download capabilities:Download of capabilities failed: Connection on mapfile with more than 1000 layers Hello! I have 3234 layers in a service and it works fine. also works fine with 10.000 layers 1 try the getcap in browser 2a if step 1 is success change network timeout in qgis 2b if step 1 does not work change timeouts on server and check mapserver log On 20/12/2022 09:59, J?rg Thomsen (WhereGroup) wrote: > Hi, > > funny, how you type twelve. > > 1200 are very much and I guess no one has tried this before. > So to your question: I would say yes. > > I suggest to split it into several services / mapfiles. The > capability-xml ist very big I think and most clients will habe > problems with it. The usability is bad, the users have to scroll > through 1200 Layers, puh. And I don't know whether a getMap with > http-get will work (is there a current length-limit in http-get?). > > > J?rg > > > Am 20.12.22 um 09:42 schrieb Marcin Niemyjski via MapServer-users: >> Hello, >> >> I have a mapfile which constist of 1200 layers. While loading to qgis >> error "Failed to download capabilities:Download of capabilities >> failed: Connection" is recived. >> >> Does this happen becaues of quantitu of layers in mapfile? Is there >> any workaround? >> >> Best, >> Marcin >> >> _______________________________________________ >> 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 oskar.ravhed at t-kartor.com Tue Dec 20 07:01:10 2022 From: oskar.ravhed at t-kartor.com (Oskar Ravhed) Date: Tue, 20 Dec 2022 16:01:10 +0100 Subject: [MapServer-users] Failed to download capabilities:Download of capabilities failed: Connection on mapfile with more than 1000 layers In-Reply-To: References: <6cd85892-6aae-a549-4d5e-0d51bdf36194@wheregroup.com> <128ccc90-93b3-0009-f33f-87351048b194@t-kartor.com> Message-ID: <714b639a-f9d5-f8d8-d36d-800f4818c82d@t-kartor.com> Hi it took 40 s Merry Christmas On 20/12/2022 15:38, Rahkonen Jukka wrote: > > Hi, > > The time is not a constant (number of layers * x milliseconds). For > example, it is faster to generate the layer BoundingBox into > GetCapabilities if the wms_extent metadata is set for the layer > https://www.mapserver.org/ogc/wms_server.html but how much faster it > is depends on the data source. > > I think that instead of 1200 layers you could have just one time > enabled layer https://www.mapserver.org/ogc/wms_time.html. > > -Jukka Rahkonen- > > *L?hett?j?:* MapServer-users > *Puolesta *Marcin Niemyjski via MapServer-users > *L?hetetty:* tiistai 20. joulukuuta 2022 16.18 > *Vastaanottaja:* Oskar Ravhed ; > mapserver-users at lists.osgeo.org > *Aihe:* Re: [MapServer-users] Failed to download capabilities:Download > of capabilities failed: Connection on mapfile with more than 1000 layers > > Great advice, thank you Oskar. > > Could you tell me how long it takes to load the WMS into qgis or > GetCap with that many layers? > > I am also interested in what purpose you are using the WMS with this > amount of data. Could you share it? In my case it is daily Sentinel-1 > imagery for the whole world from the beginning of 2021. > > Merry Christmas to all, > > Marcin > > ------------------------------------------------------------------------ > > *From:*MapServer-users on > behalf of Oskar Ravhed > *Sent:* Tuesday, December 20, 2022 1:08 PM > *To:* mapserver-users at lists.osgeo.org > *Subject:* Re: [MapServer-users] Failed to download > capabilities:Download of capabilities failed: Connection on mapfile > with more than 1000 layers > > Hello! > > I have 3234 layers in a service and it works fine. also works fine with > 10.000 layers > > 1 try the getcap in browser > 2a if step 1 is success change network timeout in qgis > 2b if step 1 does not work change timeouts on server and check mapserver > log > > On 20/12/2022 09:59, J?rg Thomsen (WhereGroup) wrote: > > Hi, > > > > funny, how you type twelve. > > > > 1200 are very much and I guess no one has tried this before. > > So to your question: I would say yes. > > > > I suggest to split it into several services / mapfiles. The > > capability-xml ist very big I think and most clients will habe > > problems with it. The usability is bad, the users have to scroll > > through 1200 Layers, puh. And I don't know whether a getMap with > > http-get will work (is there a current length-limit in http-get?). > > > > > > J?rg > > > > > > ?Am 20.12.22 um 09:42 schrieb Marcin Niemyjski via MapServer-users: > >> Hello, > >> > >> I have a mapfile which constist of 1200 layers. While loading to qgis > >> error "Failed to download capabilities:Download of capabilities > >> failed: Connection" is recived. > >> > >> Does this happen becaues of quantitu of layers in mapfile? Is there > >> any workaround? > >> > >> Best, > >> Marcin > >> > >> _______________________________________________ > >> 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 Tom.Kralidis at ec.gc.ca Tue Dec 20 11:33:24 2022 From: Tom.Kralidis at ec.gc.ca (Kralidis,Tom (ECCC)) Date: Tue, 20 Dec 2022 19:33:24 +0000 Subject: [MapServer-users] Failed to download capabilities:Download of capabilities failed: Connection on mapfile with more than 1000 layers In-Reply-To: <714b639a-f9d5-f8d8-d36d-800f4818c82d@t-kartor.com> References: <6cd85892-6aae-a549-4d5e-0d51bdf36194@wheregroup.com> <128ccc90-93b3-0009-f33f-87351048b194@t-kartor.com> <714b639a-f9d5-f8d8-d36d-800f4818c82d@t-kartor.com> Message-ID: Option: we could consider adding a mapfile directive to point to a GetCapabilities file (oh disk), which can act as an early out (instead of generating Capabilities XML on the fly). We would want to test how effective this would be for larger mapfiles (i.e. reading mapfile vs. rendering Capabilities XML). Feel free to open an issue if this could be helpful/is of interest. Thanks ..Tom From: MapServer-users On Behalf Of Oskar Ravhed Sent: Tuesday, December 20, 2022 10:01 To: Rahkonen Jukka ; Marcin Niemyjski ; mapserver-users at lists.osgeo.org Subject: Re: [MapServer-users] Failed to download capabilities:Download of capabilities failed: Connection on mapfile with more than 1000 layers You don't often get email from oskar.ravhed at t-kartor.com. Learn why this is important Hi it took 40 s Merry Christmas On 20/12/2022 15:38, Rahkonen Jukka wrote: Hi, The time is not a constant (number of layers * x milliseconds). For example, it is faster to generate the layer BoundingBox into GetCapabilities if the wms_extent metadata is set for the layer https://www.mapserver.org/ogc/wms_server.html but how much faster it is depends on the data source. I think that instead of 1200 layers you could have just one time enabled layer https://www.mapserver.org/ogc/wms_time.html. -Jukka Rahkonen- L?hett?j?: MapServer-users Puolesta Marcin Niemyjski via MapServer-users L?hetetty: tiistai 20. joulukuuta 2022 16.18 Vastaanottaja: Oskar Ravhed ; mapserver-users at lists.osgeo.org Aihe: Re: [MapServer-users] Failed to download capabilities:Download of capabilities failed: Connection on mapfile with more than 1000 layers Great advice, thank you Oskar. Could you tell me how long it takes to load the WMS into qgis or GetCap with that many layers? I am also interested in what purpose you are using the WMS with this amount of data. Could you share it? In my case it is daily Sentinel-1 imagery for the whole world from the beginning of 2021. Merry Christmas to all, Marcin ________________________________ From: MapServer-users > on behalf of Oskar Ravhed > Sent: Tuesday, December 20, 2022 1:08 PM To: mapserver-users at lists.osgeo.org > Subject: Re: [MapServer-users] Failed to download capabilities:Download of capabilities failed: Connection on mapfile with more than 1000 layers Hello! I have 3234 layers in a service and it works fine. also works fine with 10.000 layers 1 try the getcap in browser 2a if step 1 is success change network timeout in qgis 2b if step 1 does not work change timeouts on server and check mapserver log On 20/12/2022 09:59, J?rg Thomsen (WhereGroup) wrote: > Hi, > > funny, how you type twelve. > > 1200 are very much and I guess no one has tried this before. > So to your question: I would say yes. > > I suggest to split it into several services / mapfiles. The > capability-xml ist very big I think and most clients will habe > problems with it. The usability is bad, the users have to scroll > through 1200 Layers, puh. And I don't know whether a getMap with > http-get will work (is there a current length-limit in http-get?). > > > J?rg > > > Am 20.12.22 um 09:42 schrieb Marcin Niemyjski via MapServer-users: >> Hello, >> >> I have a mapfile which constist of 1200 layers. While loading to qgis >> error "Failed to download capabilities:Download of capabilities >> failed: Connection" is recived. >> >> Does this happen becaues of quantitu of layers in mapfile? Is there >> any workaround? >> >> Best, >> Marcin >> >> _______________________________________________ >> 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 michael.smith.erdc at gmail.com Tue Dec 20 11:36:14 2022 From: michael.smith.erdc at gmail.com (Michael Smith) Date: Tue, 20 Dec 2022 14:36:14 -0500 Subject: [MapServer-users] Failed to download capabilities:Download of capabilities failed: Connection on mapfile with more than 1000 layers In-Reply-To: References: <6cd85892-6aae-a549-4d5e-0d51bdf36194@wheregroup.com> <128ccc90-93b3-0009-f33f-87351048b194@t-kartor.com> <714b639a-f9d5-f8d8-d36d-800f4818c82d@t-kartor.com> Message-ID: One could do this already without changing mapserver, just at the web server config. It would be hard to control in mapserver when you?d want to do this. Mike -- Michael Smith US Army Corps of Engineers Remote Sensing/GIS Center From: MapServer-users on behalf of "Kralidis,Tom (ECCC)" Date: Tuesday, December 20, 2022 at 2:33 PM To: Oskar Ravhed , Rahkonen Jukka , Marcin Niemyjski , "mapserver-users at lists.osgeo.org" Subject: Re: [MapServer-users] Failed to download capabilities:Download of capabilities failed: Connection on mapfile with more than 1000 layers Option: we could consider adding a mapfile directive to point to a GetCapabilities file (oh disk), which can act as an early out (instead of generating Capabilities XML on the fly). We would want to test how effective this would be for larger mapfiles (i.e. reading mapfile vs. rendering Capabilities XML). Feel free to open an issue if this could be helpful/is of interest. Thanks ..Tom From: MapServer-users On Behalf Of Oskar Ravhed Sent: Tuesday, December 20, 2022 10:01 To: Rahkonen Jukka ; Marcin Niemyjski ; mapserver-users at lists.osgeo.org Subject: Re: [MapServer-users] Failed to download capabilities:Download of capabilities failed: Connection on mapfile with more than 1000 layers You don't often get email from oskar.ravhed at t-kartor.com. Learn why this is important Hi it took 40 s Merry Christmas On 20/12/2022 15:38, Rahkonen Jukka wrote: Hi, The time is not a constant (number of layers * x milliseconds). For example, it is faster to generate the layer BoundingBox into GetCapabilities if the wms_extent metadata is set for the layer https://www.mapserver.org/ogc/wms_server.html but how much faster it is depends on the data source. I think that instead of 1200 layers you could have just one time enabled layer https://www.mapserver.org/ogc/wms_time.html. -Jukka Rahkonen- L?hett?j?: MapServer-users Puolesta Marcin Niemyjski via MapServer-users L?hetetty: tiistai 20. joulukuuta 2022 16.18 Vastaanottaja: Oskar Ravhed ; mapserver-users at lists.osgeo.org Aihe: Re: [MapServer-users] Failed to download capabilities:Download of capabilities failed: Connection on mapfile with more than 1000 layers Great advice, thank you Oskar. Could you tell me how long it takes to load the WMS into qgis or GetCap with that many layers? I am also interested in what purpose you are using the WMS with this amount of data. Could you share it? In my case it is daily Sentinel-1 imagery for the whole world from the beginning of 2021. Merry Christmas to all, Marcin From: MapServer-users on behalf of Oskar Ravhed Sent: Tuesday, December 20, 2022 1:08 PM To: mapserver-users at lists.osgeo.org Subject: Re: [MapServer-users] Failed to download capabilities:Download of capabilities failed: Connection on mapfile with more than 1000 layers Hello! I have 3234 layers in a service and it works fine. also works fine with 10.000 layers 1 try the getcap in browser 2a if step 1 is success change network timeout in qgis 2b if step 1 does not work change timeouts on server and check mapserver log On 20/12/2022 09:59, J?rg Thomsen (WhereGroup) wrote: > Hi, > > funny, how you type twelve. > > 1200 are very much and I guess no one has tried this before. > So to your question: I would say yes. > > I suggest to split it into several services / mapfiles. The > capability-xml ist very big I think and most clients will habe > problems with it. The usability is bad, the users have to scroll > through 1200 Layers, puh. And I don't know whether a getMap with > http-get will work (is there a current length-limit in http-get?). > > > J?rg > > > Am 20.12.22 um 09:42 schrieb Marcin Niemyjski via MapServer-users: >> Hello, >> >> I have a mapfile which constist of 1200 layers. While loading to qgis >> error "Failed to download capabilities:Download of capabilities >> failed: Connection" is recived. >> >> Does this happen becaues of quantitu of layers in mapfile? Is there >> any workaround? >> >> Best, >> Marcin >> >> _______________________________________________ >> MapServer-users mailing list >> MapServer-users at lists.osgeo.org >> https://lists.osgeo.org/mailman/listinfo/mapserver-users > _______________________________________________ MapServer-users mailing list MapServer-users at lists.osgeo.org https://lists.osgeo.org/mailman/listinfo/mapserver-users _______________________________________________ MapServer-users mailing list MapServer-users at lists.osgeo.org https://lists.osgeo.org/mailman/listinfo/mapserver-users -------------- next part -------------- An HTML attachment was scrubbed... URL: From public at postholer.com Tue Dec 20 12:26:16 2022 From: public at postholer.com (Scott) Date: Tue, 20 Dec 2022 12:26:16 -0800 Subject: [MapServer-users] Failed to download capabilities:Download of capabilities failed: Connection on mapfile with more than 1000 layers In-Reply-To: References: <6cd85892-6aae-a549-4d5e-0d51bdf36194@wheregroup.com> <128ccc90-93b3-0009-f33f-87351048b194@t-kartor.com> <714b639a-f9d5-f8d8-d36d-800f4818c82d@t-kartor.com> Message-ID: <74c81c6a-a944-3892-6402-3996909156b4@postholer.com> Yet another reason to put a wrapper around you mapserv binary. I have hundreds of layers and block GetCapabilities outright and return a proper warning stating such. Obviously, this is not a solution for everyone. Adding this, some security traps and whatever else you need to your wrapper is really beneficial. On 12/20/22 11:33, Kralidis,Tom (ECCC) wrote: > Option: we could consider adding a mapfile directive to point to a > GetCapabilities file (oh disk), which can act as an early out (instead > of generating Capabilities XML on the fly).? We would want to test how > effective this would be for larger mapfiles (i.e. reading mapfile vs. > rendering Capabilities XML). > > Feel free to open an issue if this could be helpful/is of interest. > > Thanks > > ..Tom > > *From:* MapServer-users *On > Behalf Of *Oskar Ravhed > *Sent:* Tuesday, December 20, 2022 10:01 > *To:* Rahkonen Jukka ; Marcin > Niemyjski ; mapserver-users at lists.osgeo.org > *Subject:* Re: [MapServer-users] Failed to download > capabilities:Download of capabilities failed: Connection on mapfile with > more than 1000 layers > > > > You don't often get email from oskar.ravhed at t-kartor.com > . Learn why this is important > > > > > Hi it took 40 s > > Merry Christmas > > On 20/12/2022 15:38, Rahkonen Jukka wrote: > > Hi, > > The time is not a constant (number of layers * x milliseconds). For > example, it is faster to generate the layer BoundingBox into > GetCapabilities if the wms_extent metadata is set for the layer > https://www.mapserver.org/ogc/wms_server.html > but how much faster it is depends on the data source. > > I think that instead of 1200 layers you could have just one time > enabled layer https://www.mapserver.org/ogc/wms_time.html > . > > -Jukka Rahkonen- > > *L?hett?j?:* MapServer-users > > *Puolesta *Marcin > Niemyjski via MapServer-users > *L?hetetty:* tiistai 20. joulukuuta 2022 16.18 > *Vastaanottaja:* Oskar Ravhed > ; mapserver-users at lists.osgeo.org > > *Aihe:* Re: [MapServer-users] Failed to download > capabilities:Download of capabilities failed: Connection on mapfile > with more than 1000 layers > > Great advice, thank you Oskar. > > Could you tell me how long it takes to load the WMS into qgis or > GetCap with that many layers? > > I am also interested in what purpose you are using the WMS with this > amount of data. Could you share it? In my case it is daily > Sentinel-1 imagery for the whole world from the beginning of 2021. > > Merry Christmas to all, > > Marcin > > ------------------------------------------------------------------------ > > *From:*MapServer-users > on behalf of Oskar > Ravhed > > *Sent:* Tuesday, December 20, 2022 1:08 PM > *To:* mapserver-users at lists.osgeo.org > > > > *Subject:* Re: [MapServer-users] Failed to download > capabilities:Download of capabilities failed: Connection on mapfile > with more than 1000 layers > > Hello! > > I have 3234 layers in a service and it works fine. also works fine with > 10.000 layers > > 1 try the getcap in browser > 2a if step 1 is success change network timeout in qgis > 2b if step 1 does not work change timeouts on server and check > mapserver > log > > On 20/12/2022 09:59, J?rg Thomsen (WhereGroup) wrote: > > Hi, > > > > funny, how you type twelve. > > > > 1200 are very much and I guess no one has tried this before. > > So to your question: I would say yes. > > > > I suggest to split it into several services / mapfiles. The > > capability-xml ist very big I think and most clients will habe > > problems with it. The usability is bad, the users have to scroll > > through 1200 Layers, puh. And I don't know whether a getMap with > > http-get will work (is there a current length-limit in http-get?). > > > > > > J?rg > > > > > > ?Am 20.12.22 um 09:42 schrieb Marcin Niemyjski via MapServer-users: > >> Hello, > >> > >> I have a mapfile which constist of 1200 layers. While loading to > qgis > >> error "Failed to download capabilities:Download of capabilities > >> failed: Connection" is recived. > >> > >> Does this happen becaues of quantitu of layers in mapfile? Is there > >> any workaround? > >> > >> Best, > >> Marcin > >> > >> _______________________________________________ > >> MapServer-users mailing list > >> MapServer-users at lists.osgeo.org > > >> https://lists.osgeo.org/mailman/listinfo/mapserver-users > > > > > _______________________________________________ > MapServer-users mailing list > MapServer-users at lists.osgeo.org > https://lists.osgeo.org/mailman/listinfo/mapserver-users > > > > _______________________________________________ > MapServer-users mailing list > MapServer-users at lists.osgeo.org > https://lists.osgeo.org/mailman/listinfo/mapserver-users From bahbouba.909 at gmail.com Wed Dec 21 09:40:10 2022 From: bahbouba.909 at gmail.com (Boubacar Bah) Date: Wed, 21 Dec 2022 18:40:10 +0100 Subject: [MapServer-users] ASKING HELP Message-ID: good evening? I hope that you all are ok. by the way i have a problem with the tinyows server. which does not work. proof the link to their site does a redirect: http://www.tinyows.org/ so I would like to know if there is another server alternative for the wfs-T TRANSFER DATA transaction from the website to the POSTGIS database. waiting for your reply cordially. -------------- next part -------------- An HTML attachment was scrubbed... URL: From mniemyjski at cloudferro.com Thu Dec 22 03:01:46 2022 From: mniemyjski at cloudferro.com (Marcin Niemyjski) Date: Thu, 22 Dec 2022 11:01:46 +0000 Subject: [MapServer-users] Symbol image on s3 bucket? Message-ID: Hello, is it possible to keep my symbols images on S3 bucket and connect to them via vsis3? This way doesn't work: SYMBOL NAME "fuel" TYPE pixmap IMAGE "/vsis3/Cyprus/fuel.png" END Mapserver returns "msLoadMSRasterBufferFromFile(): General error message. unable to open file /vsis3/Cyprus/fuel.png for reading" Best, Marcin -------------- next part -------------- An HTML attachment was scrubbed... URL: From mniemyjski at cloudferro.com Thu Dec 22 06:49:57 2022 From: mniemyjski at cloudferro.com (Marcin Niemyjski) Date: Thu, 22 Dec 2022 14:49:57 +0000 Subject: [MapServer-users] security of S3 credentials in Mapfile Message-ID: Hello, because of using private bucket as a place where I keep my rasters I'm putting credentials in my mapfile as Enviromental Variables. The question is - Is it safe? Obviously, I do not want anyone mess with my data. Are there any tips beyond Apache aliases to hide mapfile path? I already checked https://mapserver.org/optimization/limit_mapfile_access.html#limit-mapfile-access The main goal is to keep credentials safe! Best, Marcin -------------- next part -------------- An HTML attachment was scrubbed... URL: From even.rouault at spatialys.com Thu Dec 22 06:59:15 2022 From: even.rouault at spatialys.com (Even Rouault) Date: Thu, 22 Dec 2022 15:59:15 +0100 Subject: [MapServer-users] security of S3 credentials in Mapfile In-Reply-To: References: Message-ID: <3705541a-07f1-369d-bf09-eccca1da812a@spatialys.com> GDAL can read S3 credentials from the ~/.aws/credentials file that is used by the aws command line utility. You would also probably want to create credentials with read-only permission for use by Apache. Le 22/12/2022 ? 15:49, Marcin Niemyjski via MapServer-users a ?crit?: > Hello, > > because of using private bucket as a place where I keep my rasters I'm > putting credentials in my mapfile as Enviromental Variables. > > The question is - Is it safe? > > Obviously, I do not want anyone mess with my data. Are there any tips > beyond Apache aliases to hide mapfile path? > > I already checked > https://mapserver.org/optimization/limit_mapfile_access.html#limit-mapfile-access > > The main goal is to keep credentials safe! > > Best, > Marcin > > _______________________________________________ > 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 mniemyjski at cloudferro.com Thu Dec 22 07:41:55 2022 From: mniemyjski at cloudferro.com (Marcin Niemyjski) Date: Thu, 22 Dec 2022 15:41:55 +0000 Subject: [MapServer-users] security of S3 credentials in Mapfile In-Reply-To: <3705541a-07f1-369d-bf09-eccca1da812a@spatialys.com> References: <3705541a-07f1-369d-bf09-eccca1da812a@spatialys.com> Message-ID: Even, is it safer than keeping credentials in mapfile or is it just another way of providing them to mapserver? Please tell me. Is keeping credentials in mapfile optimal and safe way? Thank you, Marcin ________________________________ From: Even Rouault Sent: Thursday, December 22, 2022 3:59 PM To: Marcin Niemyjski ; Marcin Niemyjski via MapServer-users Subject: Re: [MapServer-users] security of S3 credentials in Mapfile GDAL can read S3 credentials from the ~/.aws/credentials file that is used by the aws command line utility. You would also probably want to create credentials with read-only permission for use by Apache. Le 22/12/2022 ? 15:49, Marcin Niemyjski via MapServer-users a ?crit : Hello, because of using private bucket as a place where I keep my rasters I'm putting credentials in my mapfile as Enviromental Variables. The question is - Is it safe? Obviously, I do not want anyone mess with my data. Are there any tips beyond Apache aliases to hide mapfile path? I already checked https://mapserver.org/optimization/limit_mapfile_access.html#limit-mapfile-access The main goal is to keep credentials safe! Best, Marcin _______________________________________________ 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 jmckenna at gatewaygeomatics.com Thu Dec 22 12:25:34 2022 From: jmckenna at gatewaygeomatics.com (Jeff McKenna) Date: Thu, 22 Dec 2022 15:25:34 -0500 Subject: [MapServer-users] ASKING HELP In-Reply-To: References: Message-ID: <6ae8dd86-87e0-a3d8-6ed5-a11372bf236f@gatewaygeomatics.com> Good afternoon, the TinyOWS home is at : https://mapserver.org/tinyows/index.html Wishing you a merry Christmas, -jeff -- Jeff McKenna GatewayGeo: Developers of MS4W, MapServer Consulting and Training co-founder of FOSS4G http://gatewaygeo.com/ On 2022-12-21 12:40 p.m., Boubacar Bah wrote: > good evening? I hope that you all are ok. by the way i have a problem > with the tinyows server. which does not work. proof the link to their > site does a redirect: http://www.tinyows.org/ > so I would like to know if there is another server alternative for the > wfs-T TRANSFER DATA transaction from the website to the POSTGIS database. > waiting for your reply cordially. > From pschmitt at gmail.com Thu Dec 22 12:29:21 2022 From: pschmitt at gmail.com (Peter Schmitt) Date: Thu, 22 Dec 2022 13:29:21 -0700 Subject: [MapServer-users] security of S3 credentials in Mapfile In-Reply-To: References: <3705541a-07f1-369d-bf09-eccca1da812a@spatialys.com> Message-ID: On Thu, Dec 22, 2022 at 8:42 AM Marcin Niemyjski via MapServer-users < mapserver-users at lists.osgeo.org> wrote: > > is it safer than keeping credentials in mapfile or is it just another way > of providing them to mapserver? > > Please tell me. Is keeping credentials in mapfile optimal and safe way? > > I would try to avoid ever using AWS credentials directly as environment variables. Instead, let GDAL use properly configured credentials from ~/.aws/config or when running on an EC2 instance, GDAL can fetch instance profile credentials. If AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY are accidentally leaked, an attacker could get whatever access is allowed through those keys. In cases where those keys allow IAM access, bad things can happen. Most tooling (the AWS CLI, AWS SDKs, GDAL) should allow for authentication without ever having to copy/paste AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY directly. See the section starting "Several authentication methods are possible" from https://gdal.org/user/virtual_file_systems.html#vsis3-aws-s3-files Cheers, Pete -------------- next part -------------- An HTML attachment was scrubbed... URL: From mniemyjski at cloudferro.com Fri Dec 23 04:38:44 2022 From: mniemyjski at cloudferro.com (Marcin Niemyjski) Date: Fri, 23 Dec 2022 12:38:44 +0000 Subject: [MapServer-users] Mapserver Apache2 Rewrite not working Message-ID: Hello, I'm trying to shorten my mapfile url from https://www.****.eu/cgi-bin/mapserv?map=/DyskPlanetiler/MAPFILEs/Sentinel2Ukraine.map to https://www.****.eu/Sentinel2Ukraine. I'm doing it by writing RewriteEngine onRewriteRule Sentinel2Ukraine?(.*) /cgi-bin/mapserv?map=/DyskPlanetiler/MAPFILEs/Sentinel2Ukraine.map&$1 into apache2.conf but there is no result (I do restart apach after each edition of apache2.conf). QGIS while connecting to WMS returns "Download of capabilities failed: Error transferring https://www.****.eu/Sentinel2Ukraine?SERVICE=WMS&REQUEST=GetCapabilities - server replied: Not Found" What am I doing wrong? Best, Marcin -------------- next part -------------- An HTML attachment was scrubbed... URL: From richard.greenwood at gmail.com Fri Dec 23 12:17:50 2022 From: richard.greenwood at gmail.com (Richard Greenwood) Date: Fri, 23 Dec 2022 13:17:50 -0700 Subject: [MapServer-users] Mapserver Apache2 Rewrite not working In-Reply-To: References: Message-ID: You might try [QSA] Query String Append https://cwiki.apache.org/confluence/display/HTTPD/RewriteFlags+QSA Something like: RewriteRule Sentinel2Ukraine /cgi-bin/mapserv?map=/DyskPlanetiler/MAPFILEs/Sentinel2Ukraine.map [QSA] Or maybe: RewriteRule ^Sentinel2Ukraine$ /cgi-bin/mapserv?map=/DyskPlanetiler/MAPFILEs/Sentinel2Ukraine.map [QSA] You could also put your map file in an Apache environment variable in your apache2.conf file like: SetEnv Sentinel2Ukraine /DyskPlanetiler/MAPFILEs/Sentinel2Ukraine.map And then reference it like: map=Sentinel2Ukraine If you do that then you can add a little security by setting another Apache env var: SetEnv MS_MAP_NO_PATH "foo" as described here https://mapserver.org/environment_variables.html#environment-variables Hope that helps, Rich On Fri, Dec 23, 2022 at 5:38 AM Marcin Niemyjski via MapServer-users < mapserver-users at lists.osgeo.org> wrote: > Hello, > I'm trying to shorten my mapfile url from https://www.****.eu/cgi-bin/mapserv?map=/DyskPlanetiler/MAPFILEs/Sentinel2Ukraine.map > to > https://www.****.eu/Sentinel2Ukraine. > > I'm doing it by writing > RewriteEngine onRewriteRule Sentinel2Ukraine?(.*) > /cgi-bin/mapserv?map=/DyskPlanetiler/MAPFILEs/Sentinel2Ukraine.map&$1 > into apache2.conf but there is no result (I do restart apach after each > edition of apache2.conf). QGIS while connecting to WMS returns "Download of > capabilities failed: Error transferring https://www.****.eu/Sentinel2Ukraine?SERVICE=WMS&REQUEST=GetCapabilities > - server replied: Not Found" > > What am I doing wrong? > Best, > Marcin > _______________________________________________ > 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 bahbouba.909 at gmail.com Fri Dec 23 13:55:24 2022 From: bahbouba.909 at gmail.com (Boubacar Bah) Date: Fri, 23 Dec 2022 22:55:24 +0100 Subject: [MapServer-users] Asking help Message-ID: Good evening Jeff, by the way I used all the instructions on the mapserver page for tinyows : https://mapserver.org/tinyows/index.html , but unfortunately the problem still persists, that's why I doubt that the tinyows server will work because the link to their site makes a redirection you can check the link of the official site of tinyows of which here is the link above : http://www.tinyows.org/. Cordially. -------------- next part -------------- An HTML attachment was scrubbed... URL: From mniemyjski at cloudferro.com Tue Dec 27 01:13:26 2022 From: mniemyjski at cloudferro.com (Marcin Niemyjski) Date: Tue, 27 Dec 2022 09:13:26 +0000 Subject: [MapServer-users] Hiding layer in Mapfile Message-ID: Hello, Is it possible to hide a layer in Mapfile? Let's say I have two layers one is enabled at low zoom levels and the other is enabled at high zoom levels. These layers are in the same group. I want to hide the two layers that are making the group and only show the group itself as a layer. Best, Marcin -------------- next part -------------- An HTML attachment was scrubbed... URL: From bfraser at geoanalytic.com Fri Dec 30 14:34:06 2022 From: bfraser at geoanalytic.com (Brent Fraser) Date: Fri, 30 Dec 2022 15:34:06 -0700 Subject: [MapServer-users] Link in SLD doc returns an exception Message-ID: <4c84a2ac917e417aa7b5759e1d78135f@geoanalytic.com> Hi All, I'm experimenting with SLD and reading the MapServer doc. On the SLD page under Server Side Support, it says "Test the remote SLD request" with a link to https://demo.mapserver.org/cgi-bin/wms?SERVICE=wms&VERSION=1.1.1&REQUEST=GetMap&LAYERS=country_bounds&FORMAT=png&WIDTH=400&HEIGHT=300&SRS=EPSG:4326&STYLES=&BBOX=-180.0,-90.0,180.0,90.0&TRANSPARENT=TRUE&SLD=https://demo.mapserver.org/ogc-demos/map/sld/sld_line_simple.xml The link looks good but it returns an exception: msSLDApplySLDURL: WMS server error. Could not open SLD https://demo.mapserver.org/ogc-demos/map/sld/sld_line_simple.xml and save it in a temporary file. Please make sure that the sld url is valid and that the temporary path is set. The temporary path can be defined for example by setting TEMPPATH in the map file. Please check the MapServer documentation on temporary path settings. msHTTPExecuteRequests(): HTTP request error. HTTP GET request failed with status 404 () for https://demo.mapserver.org/ogc-demos/map/sld/sld_line_simple.xml Is the demo in a repo somewhere or does someone have some insight? Thanks! Best regards, Brent Fraser -------------- next part -------------- An HTML attachment was scrubbed... URL: From bjorn.ove at grotan.com Sat Dec 31 04:22:17 2022 From: bjorn.ove at grotan.com (=?utf-8?B?QmrDuHJuIE92ZSBHcsO4dGFu?=) Date: Sat, 31 Dec 2022 13:22:17 +0100 Subject: [MapServer-users] Link in SLD doc returns an exception In-Reply-To: <4c84a2ac917e417aa7b5759e1d78135f@geoanalytic.com> References: <4c84a2ac917e417aa7b5759e1d78135f@geoanalytic.com> Message-ID: Brent Fraser: > Hi All, > > I'm experimenting with SLD and reading the MapServer doc. On the SLD page under Server Side Support, it says "Test the remote SLD request" with a link to > > https://demo.mapserver.org/cgi-bin/wms?SERVICE=wms&VERSION=1.1.1&REQUEST=GetMap&LAYERS=country_bounds&FORMAT=png&WIDTH=400&HEIGHT=300&SRS=EPSG:4326&STYLES=&BBOX=-180.0,-90.0,180.0,90.0&TRANSPARENT=TRUE&SLD=https://demo.mapserver.org/ogc-demos/map/sld/sld_line_simple.xml > > The link looks good but it returns an exception: > > > > > > msSLDApplySLDURL: WMS server error. Could not open SLD https://demo.mapserver.org/ogc-demos/map/sld/sld_line_simple.xml and save it in a temporary file. Please make sure that the sld url is valid and that the temporary path is set. The temporary path can be defined for example by setting TEMPPATH in the map file. Please check the MapServer documentation on temporary path settings. > msHTTPExecuteRequests(): HTTP request error. HTTP GET request failed with status 404 () for https://demo.mapserver.org/ogc-demos/map/sld/sld_line_simple.xml > > > > Is the demo in a repo somewhere or does someone have some insight? Thanks! The error message is correct, https://demo.mapserver.org/ogc-demos/map/sld/sld_line_simple.xml returns a 404 Page not found, The root folder at /ogc-demos/ has been removed at some point. Be aware though, that not all WMS-servers allow (by configuration) external hosted SLD-files due to potential XXE (XML eXternal Entity) vulnerability, Also might be of interrest: the Mapserver implementation of GetStyle-request (return SLD for a given layer) has some limitations on line-symbols where images (png) are placed along the line symbol, and same with polygon fills using a repeated png-file as fill - but simple polygon symbologies with a solid fill color works as expected. -- Kind regards Bj?rn Ove Gr?tan From bfraser at geoanalytic.com Sat Dec 31 09:13:08 2022 From: bfraser at geoanalytic.com (Brent Fraser) Date: Sat, 31 Dec 2022 10:13:08 -0700 Subject: [MapServer-users] Link in SLD doc returns an exception In-Reply-To: References: <4c84a2ac917e417aa7b5759e1d78135f@geoanalytic.com> Message-ID: <60a89b66c79a4b2587a1c55212292df3@geoanalytic.com> Bj?rn, Thanks for the info. I'm not sure if I should file an Issue on the doc for the broken link, or on the demo for the missing file (no public GitHub repository for the demo?). While testing the GeoMoose/OpenLayers client, I did see foreign WMS servers (not under my control) cause a "Cross-Origin Request Blocked" error. This was unexpected as I had encoded the XML SLD document and included it in the GET request parameter SLD_BODY. I could understand getting the error if I had used the alternative method of instead using SLD=http://... to reference an SLD document somewhere on the web, but I did not use that method. I even removed the reference links in the header of the SLD, but I got the same error. Thanks again! Brent Fraser ---------------------------------------- From: "Bj?rn Ove Gr?tan" Sent: 12/31/22 5:47 AM To: Brent Fraser Cc: "mapserver-users at lists.osgeo.org" Subject: Re: [MapServer-users] Link in SLD doc returns an exception Brent Fraser: > Hi All, > > I'm experimenting with SLD and reading the MapServer doc. On the SLD page under Server Side Support, it says "Test the remote SLD request" with a link to > > https://demo.mapserver.org/cgi-bin/wms?SERVICE=wms&VERSION=1.1.1&REQUEST=GetMap&LAYERS=country_bounds&FORMAT=png&WIDTH=400&HEIGHT=300&SRS=EPSG:4326&STYLES=&BBOX=-180.0,-90.0,180.0,90.0&TRANSPARENT=TRUE&SLD=https://demo.mapserver.org/ogc-demos/map/sld/sld_line_simple.xml > > The link looks good but it returns an exception: > > > > > > msSLDApplySLDURL: WMS server error. Could not open SLD https://demo.mapserver.org/ogc-demos/map/sld/sld_line_simple.xml and save it in a temporary file. Please make sure that the sld url is valid and that the temporary path is set. The temporary path can be defined for example by setting TEMPPATH in the map file. Please check the MapServer documentation on temporary path settings. > msHTTPExecuteRequests(): HTTP request error. HTTP GET request failed with status 404 () for https://demo.mapserver.org/ogc-demos/map/sld/sld_line_simple.xml > > > > Is the demo in a repo somewhere or does someone have some insight? Thanks! The error message is correct, https://demo.mapserver.org/ogc-demos/map/sld/sld_line_simple.xml returns a 404 Page not found, The root folder at /ogc-demos/ has been removed at some point. Be aware though, that not all WMS-servers allow (by configuration) external hosted SLD-files due to potential XXE (XML eXternal Entity) vulnerability, Also might be of interrest: the Mapserver implementation of GetStyle-request (return SLD for a given layer) has some limitations on line-symbols where images (png) are placed along the line symbol, and same with polygon fills using a repeated png-file as fill - but simple polygon symbologies with a solid fill color works as expected. -- Kind regards Bj?rn Ove Gr?tan -------------- next part -------------- An HTML attachment was scrubbed... URL: