From ahmettemiz88 at gmail.com Fri Feb 4 05:26:19 2022 From: ahmettemiz88 at gmail.com (Ahmet Temiz) Date: Fri, 4 Feb 2022 16:26:19 +0300 Subject: [mapserver-users] Creation of raster layer legend Message-ID: Hi, Is creation of raster layer legend posible ?( with or without wms) Here is the layer part of my mapfile LAYER NAME deprem METADATA "wms_srs" "EPSG:3857 EPSG:4326 " "wms_name" "deprem" "wms_server_version" "1.1.1" "wms_format" "image/png" END TYPE RASTER ### required STATUS OFF DATA tr_dep2.tif PROCESSING "BANDS=1" PROJECTION "init=epsg:3857" END COMPOSITE OPACITY 70 END CLASS EXPRESSION ([pixel] >= 0 AND [pixel] < 0.85) STYLE COLORRANGE 255 237 160 189 0 38 DATARANGE 0.0 0.85 RANGEITEM "pixel" END END END regards -- Ahmet Temiz Jeoloji M?h. Afet ve Acil Durum Y?netimi Ba?kanl??? Deprem Dairesi Ba?kanl??? ________________________ Ahmet Temiz Geological Eng. Disaster and Emergency Management of Presidency -------------- next part -------------- An HTML attachment was scrubbed... URL: From jukka.rahkonen at maanmittauslaitos.fi Fri Feb 4 07:18:10 2022 From: jukka.rahkonen at maanmittauslaitos.fi (Rahkonen Jukka (MML)) Date: Fri, 4 Feb 2022 15:18:10 +0000 Subject: [mapserver-users] Creation of raster layer legend In-Reply-To: References: Message-ID: <3df63bab8c8c4b398567c09d5ee8e852@maanmittauslaitos.fi> Hi, Named classes appear in the legend and add least with CLASS-KEYIMAGE you can define the icon for the class. LAYER TYPE RASTER ? CLASS NAME "TEST" KEYIMAGE "c:\ms4w_data\legend.png" ? END -Jukka Rahkonen- L?hett?j?: MapServer-users Puolesta Ahmet Temiz L?hetetty: perjantai 4. helmikuuta 2022 15.26 Vastaanottaja: mapserver-users Aihe: [mapserver-users] Creation of raster layer legend Hi, Is creation of raster layer legend posible ?( with or without wms) Here is the layer part of my mapfile LAYER NAME deprem METADATA "wms_srs" "EPSG:3857 EPSG:4326 " "wms_name" "deprem" "wms_server_version" "1.1.1" "wms_format" "image/png" END TYPE RASTER ### required STATUS OFF DATA tr_dep2.tif PROCESSING "BANDS=1" PROJECTION "init=epsg:3857" END COMPOSITE OPACITY 70 END CLASS EXPRESSION ([pixel] >= 0 AND [pixel] < 0.85) STYLE COLORRANGE 255 237 160 189 0 38 DATARANGE 0.0 0.85 RANGEITEM "pixel" END END END regards -- Ahmet Temiz Jeoloji M?h. Afet ve Acil Durum Y?netimi Ba?kanl??? Deprem Dairesi Ba?kanl??? ________________________ Ahmet Temiz Geological Eng. Disaster and Emergency Management of Presidency -------------- next part -------------- An HTML attachment was scrubbed... URL: From aborruso at gmail.com Sat Feb 5 09:13:33 2022 From: aborruso at gmail.com (andy) Date: Sat, 5 Feb 2022 18:13:33 +0100 Subject: [mapserver-users] mapserv cli and run-time substitution Message-ID: Hi, I have this map file [1] in which I use this simple class expression "EXPRESSION ([year] < 1976)". Starting from it, I'm able to create the png output I want, running: mapserv -nh "QUERY_STRING=map=data.map&mode=map" >out.png But if I replace the hard coded year value with '%year%', and then I run this command mapserv -nh "QUERY_STRING=map=data.map&mode=map&year=1976" >out.png I have a wrong PNG output, in which the layer that has the run-time substitution variable is not rendered properly, because it seems that the value is not collected. What's wrong with my steps? How to use run-time substitution via cli? Thank you, Andrea [1] https://gist.github.com/aborruso/f40da26ec0cb9daa8cb7b308189ce3b3 -- ___________________ Andrea Borruso website: https://medium.com/tantotanto 38? 7' 48" N, 13? 21' 9" E, EPSG:4326 ___________________ "cercare e saper riconoscere chi e cosa, in mezzo all?inferno, non ? inferno, e farlo durare, e dargli spazio" Italo Calvino -------------- next part -------------- An HTML attachment was scrubbed... URL: From sdlime at gmail.com Sat Feb 5 09:29:14 2022 From: sdlime at gmail.com (Steve Lime) Date: Sat, 5 Feb 2022 11:29:14 -0600 Subject: [mapserver-users] mapserv cli and run-time substitution In-Reply-To: References: Message-ID: Hmmmm... Looks right to me. Will need to run a test locally and report back. On Sat, Feb 5, 2022 at 11:14 AM andy wrote: > Hi, > I have this map file [1] in which I use this simple class expression > "EXPRESSION ([year] < 1976)". > Starting from it, I'm able to create the png output I want, running: > > mapserv -nh "QUERY_STRING=map=data.map&mode=map" >out.png > > But if I replace the hard coded year value with '%year%', and then I run > this command > > mapserv -nh "QUERY_STRING=map=data.map&mode=map&year=1976" >out.png > > I have a wrong PNG output, in which the layer that has the run-time > substitution variable is not rendered properly, because it seems that the > value is not collected. > > What's wrong with my steps? How to use run-time substitution via cli? > > Thank you, > > Andrea > > [1] https://gist.github.com/aborruso/f40da26ec0cb9daa8cb7b308189ce3b3 > > > -- > ___________________ > > Andrea Borruso > website: https://medium.com/tantotanto > 38? 7' 48" N, 13? 21' 9" E, EPSG:4326 > ___________________ > > "cercare e saper riconoscere chi e cosa, > in mezzo all?inferno, non ? inferno, > e farlo durare, e dargli spazio" > > Italo Calvino > _______________________________________________ > 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 aborruso at gmail.com Sat Feb 5 09:50:07 2022 From: aborruso at gmail.com (andy) Date: Sat, 5 Feb 2022 18:50:07 +0100 Subject: [mapserver-users] mapserv cli and run-time substitution In-Reply-To: References: Message-ID: Hi Steve, and thank you. It seems right also to me. Moreover there is a related paragraph in the documentation: https://mapserver.org/el/mapfile/validation.html#test-with-commandline I want to add that I'm using MapServer version 7.6.2 -- ___________________ Andrea Borruso website: https://medium.com/tantotanto 38? 7' 48" N, 13? 21' 9" E, EPSG:4326 ___________________ "cercare e saper riconoscere chi e cosa, in mezzo all?inferno, non ? inferno, e farlo durare, e dargli spazio" Italo Calvino -------------- next part -------------- An HTML attachment was scrubbed... URL: From aborruso at gmail.com Sat Feb 5 10:52:07 2022 From: aborruso at gmail.com (andy) Date: Sat, 5 Feb 2022 19:52:07 +0100 Subject: [mapserver-users] mapserv cli and run-time substitution In-Reply-To: References: Message-ID: In this compressed file the files I'm using: https://github.com/aborruso/blackboard/blob/gh-pages/trash/processing.7z -- ___________________ Andrea Borruso website: https://medium.com/tantotanto 38? 7' 48" N, 13? 21' 9" E, EPSG:4326 ___________________ "cercare e saper riconoscere chi e cosa, in mezzo all?inferno, non ? inferno, e farlo durare, e dargli spazio" Italo Calvino -------------- next part -------------- An HTML attachment was scrubbed... URL: From sethg at geographika.co.uk Sun Feb 6 00:34:56 2022 From: sethg at geographika.co.uk (Seth G) Date: Sun, 06 Feb 2022 09:34:56 +0100 Subject: [mapserver-users] mapserv cli and run-time substitution In-Reply-To: References: Message-ID: <0fb61c65-941c-416b-a4d6-b02fc4aaf275@www.fastmail.com> Hi, Shouldn't the variable be wrapped in percentage signs? EXPRESSION (%year% < 1976) Seth -- web:http://geographika.net twitter: @geographika On Sat, Feb 5, 2022, at 6:13 PM, andy wrote: > Hi, > I have this map file [1] in which I use this simple class expression "EXPRESSION ([year] < 1976)". > Starting from it, I'm able to create the png output I want, running: > > mapserv -nh "QUERY_STRING=map=data.map&mode=map" >out.png > > But if I replace the hard coded year value with '%year%', and then I run this command > > mapserv -nh "QUERY_STRING=map=data.map&mode=map&year=1976" >out.png > > I have a wrong PNG output, in which the layer that has the run-time substitution variable is not rendered properly, because it seems that the value is not collected. > > What's wrong with my steps? How to use run-time substitution via cli? > > Thank you, > > Andrea > > [1] https://gist.github.com/aborruso/f40da26ec0cb9daa8cb7b308189ce3b3 > > > -- > ___________________ > > Andrea Borruso > website: https://medium.com/tantotanto > 38? 7' 48" N, 13? 21' 9" E, EPSG:4326 > ___________________ > > "cercare e saper riconoscere chi e cosa, > in mezzo all?inferno, non ? inferno, > e farlo durare, e dargli spazio" > > Italo Calvino > _______________________________________________ > 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 aborruso at gmail.com Sun Feb 6 00:50:28 2022 From: aborruso at gmail.com (andy) Date: Sun, 6 Feb 2022 09:50:28 +0100 Subject: [mapserver-users] mapserv cli and run-time substitution In-Reply-To: <0fb61c65-941c-416b-a4d6-b02fc4aaf275@www.fastmail.com> References: <0fb61c65-941c-416b-a4d6-b02fc4aaf275@www.fastmail.com> Message-ID: Hi Seth, On Sun, 6 Feb 2022 at 09:35, Seth G wrote: > Shouldn't the variable be wrapped in percentage signs? > > EXPRESSION (%year% < 1976) > my goal is another one. My hardcorded expression is "EXPRESSION ([year] < 1976)". I want to use run-time substitution to use "EXPRESSION ([year] < '%year%')", in the same way described here: https://mapserver.org/el/mapfile/validation.html#test-with-commandline Thank you -- ___________________ Andrea Borruso website: https://medium.com/tantotanto 38? 7' 48" N, 13? 21' 9" E, EPSG:4326 ___________________ "cercare e saper riconoscere chi e cosa, in mezzo all?inferno, non ? inferno, e farlo durare, e dargli spazio" Italo Calvino -------------- next part -------------- An HTML attachment was scrubbed... URL: From sethg at geographika.co.uk Sun Feb 6 01:08:26 2022 From: sethg at geographika.co.uk (Seth G) Date: Sun, 06 Feb 2022 10:08:26 +0100 Subject: [mapserver-users] mapserv cli and run-time substitution In-Reply-To: References: <0fb61c65-941c-416b-a4d6-b02fc4aaf275@www.fastmail.com> Message-ID: <55393110-769a-4c49-87b8-ed2e09ed49e9@www.fastmail.com> Ah ok I was looking at the mapfile. Passing &YEAR=1976 in from the command line should work fine. Maybe the value is being treated as a string, so you could test if the following worked (equals rather than less than): EXPRESSION ("[year]" = "%year%") Also maybe try with a different parameter name e.g. MYYEAR just in case YEAR is treated differently as it is used for various OGC services. Seth -- web:https://geographika.net twitter: @geographika On Sun, Feb 6, 2022, at 9:50 AM, andy wrote: > Hi Seth, > > On Sun, 6 Feb 2022 at 09:35, Seth G wrote: > >> Shouldn't the variable be wrapped in percentage signs? >> >> EXPRESSION (%year% < 1976) > > my goal is another one. My hardcorded expression is "EXPRESSION ([year] < 1976)". > > I want to use run-time substitution to use "EXPRESSION ([year] < '%year%')", in the same way described here: > https://mapserver.org/el/mapfile/validation.html#test-with-commandline > > Thank you > > -- > ___________________ > > Andrea Borruso > website: https://medium.com/tantotanto > 38? 7' 48" N, 13? 21' 9" E, EPSG:4326 > ___________________ > > "cercare e saper riconoscere chi e cosa, > in mezzo all?inferno, non ? inferno, > e farlo durare, e dargli spazio" > > Italo Calvino -------------- next part -------------- An HTML attachment was scrubbed... URL: From aborruso at gmail.com Sun Feb 6 01:28:04 2022 From: aborruso at gmail.com (andy) Date: Sun, 6 Feb 2022 10:28:04 +0100 Subject: [mapserver-users] mapserv cli and run-time substitution In-Reply-To: <55393110-769a-4c49-87b8-ed2e09ed49e9@www.fastmail.com> References: <0fb61c65-941c-416b-a4d6-b02fc4aaf275@www.fastmail.com> <55393110-769a-4c49-87b8-ed2e09ed49e9@www.fastmail.com> Message-ID: Hi Seth, and thank you. On Sun, 6 Feb 2022 at 10:08, Seth G wrote: > > Maybe the value is being treated as a string, so you could test if the > following worked (equals rather than less than): > > EXPRESSION ("[year]" = "%year%") > This works, but there are some points that seem strange to me: - if in the map file I set "[year] < 1976", it works. Than year is a number; - my layer source is a virtual file, a CSV, in which I set "" So why do I have to set it as a string, if it is already set as a number and if it works as a number when I do not use run-time substitution? My files are in this compressed one: https://github.com/aborruso/blackboard/blob/gh-pages/trash/processing.7z Best regards -- ___________________ Andrea Borruso website: https://medium.com/tantotanto 38? 7' 48" N, 13? 21' 9" E, EPSG:4326 ___________________ "cercare e saper riconoscere chi e cosa, in mezzo all?inferno, non ? inferno, e farlo durare, e dargli spazio" Italo Calvino -------------- next part -------------- An HTML attachment was scrubbed... URL: From sethg at geographika.co.uk Sun Feb 6 02:32:08 2022 From: sethg at geographika.co.uk (Seth G) Date: Sun, 06 Feb 2022 11:32:08 +0100 Subject: [mapserver-users] mapserv cli and run-time substitution In-Reply-To: References: <0fb61c65-941c-416b-a4d6-b02fc4aaf275@www.fastmail.com> <55393110-769a-4c49-87b8-ed2e09ed49e9@www.fastmail.com> Message-ID: <244ace50-b224-4fe1-8be5-2802ced29b4f@www.fastmail.com> So does the following also work? Without quotes should mean it is treated as a number: EXPRESSION ([year] = %year%) -- web:https://geographika.net twitter: @geographika On Sun, Feb 6, 2022, at 10:28 AM, andy wrote: > Hi Seth, > and thank you. > > On Sun, 6 Feb 2022 at 10:08, Seth G wrote: >> __ >> >> Maybe the value is being treated as a string, so you could test if the following worked (equals rather than less than): >> >> EXPRESSION ("[year]" = "%year%") > > This works, but there are some points that seem strange to me: > > - if in the map file I set "[year] < 1976", it works. Than year is a number; > - my layer source is a virtual file, a CSV, in which I set "" > > So why do I have to set it as a string, if it is already set as a number and if it works as a number when I do not use run-time substitution? > My files are in this compressed one: > https://github.com/aborruso/blackboard/blob/gh-pages/trash/processing.7z > > Best regards > > -- > ___________________ > > Andrea Borruso > website: https://medium.com/tantotanto > 38? 7' 48" N, 13? 21' 9" E, EPSG:4326 > ___________________ > > "cercare e saper riconoscere chi e cosa, > in mezzo all?inferno, non ? inferno, > e farlo durare, e dargli spazio" > > Italo Calvino -------------- next part -------------- An HTML attachment was scrubbed... URL: From sdlime at gmail.com Sun Feb 6 06:21:25 2022 From: sdlime at gmail.com (Steve Lime) Date: Sun, 6 Feb 2022 08:21:25 -0600 Subject: [mapserver-users] mapserv cli and run-time substitution In-Reply-To: <244ace50-b224-4fe1-8be5-2802ced29b4f@www.fastmail.com> References: <0fb61c65-941c-416b-a4d6-b02fc4aaf275@www.fastmail.com> <55393110-769a-4c49-87b8-ed2e09ed49e9@www.fastmail.com> <244ace50-b224-4fe1-8be5-2802ced29b4f@www.fastmail.com> Message-ID: This should be the way to do it. No quotes around %year% in either expression. On Sun, Feb 6, 2022 at 4:32 AM Seth G wrote: > So does the following also work? Without quotes should mean it is treated > as a number: > > EXPRESSION ([year] = %year%) > > -- > web:https://geographika.net > twitter: @geographika > > > On Sun, Feb 6, 2022, at 10:28 AM, andy wrote: > > Hi Seth, > and thank you. > > On Sun, 6 Feb 2022 at 10:08, Seth G wrote: > > > > Maybe the value is being treated as a string, so you could test if the > following worked (equals rather than less than): > > EXPRESSION ("[year]" = "%year%") > > > This works, but there are some points that seem strange to me: > > - if in the map file I set "[year] < 1976", it works. Than year is a > number; > - my layer source is a virtual file, a CSV, in which I set " name="year" src="year" type="integer"/>" > > So why do I have to set it as a string, if it is already set as a number > and if it works as a number when I do not use run-time substitution? > My files are in this compressed one: > https://github.com/aborruso/blackboard/blob/gh-pages/trash/processing.7z > > Best regards > > -- > ___________________ > > Andrea Borruso > website: https://medium.com/tantotanto > 38? 7' 48" N, 13? 21' 9" E, EPSG:4326 > ___________________ > > "cercare e saper riconoscere chi e cosa, > in mezzo all?inferno, non ? inferno, > e farlo durare, e dargli spazio" > > Italo Calvino > > > _______________________________________________ > 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 aborruso at gmail.com Sun Feb 6 07:22:29 2022 From: aborruso at gmail.com (andy) Date: Sun, 6 Feb 2022 16:22:29 +0100 Subject: [mapserver-users] mapserv cli and run-time substitution In-Reply-To: References: <0fb61c65-941c-416b-a4d6-b02fc4aaf275@www.fastmail.com> <55393110-769a-4c49-87b8-ed2e09ed49e9@www.fastmail.com> <244ace50-b224-4fe1-8be5-2802ced29b4f@www.fastmail.com> Message-ID: On Sun, 6 Feb 2022 at 15:21, Steve Lime wrote: > This should be the way to do it. No quotes around %year% in either > expression. > Yes, it works thank you Seth and Steve!! -- ___________________ Andrea Borruso website: https://medium.com/tantotanto 38? 7' 48" N, 13? 21' 9" E, EPSG:4326 ___________________ "cercare e saper riconoscere chi e cosa, in mezzo all?inferno, non ? inferno, e farlo durare, e dargli spazio" Italo Calvino -------------- next part -------------- An HTML attachment was scrubbed... URL: From jmckenna at gatewaygeomatics.com Mon Feb 7 11:21:58 2022 From: jmckenna at gatewaygeomatics.com (Jeff McKenna) Date: Mon, 7 Feb 2022 15:21:58 -0400 Subject: [mapserver-users] mapserv cli and run-time substitution In-Reply-To: References: <0fb61c65-941c-416b-a4d6-b02fc4aaf275@www.fastmail.com> <55393110-769a-4c49-87b8-ed2e09ed49e9@www.fastmail.com> <244ace50-b224-4fe1-8be5-2802ced29b4f@www.fastmail.com> Message-ID: <2938db9d-ae07-0ffc-efb7-e76be6d4717d@gatewaygeomatics.com> Thanks Andrea, I have added your working example to the documentation, and included the step of checking your data type through an ogrinfo command. Thanks again. https://mapserver.org/mapfile/validation.html -jeff On 2022-02-06 11:22 a.m., andy wrote: > > On Sun, 6 Feb 2022 at 15:21, Steve Lime > wrote: > > This should be the way to do it. No quotes around %year% in either > expression. > > > Yes, it works thank you Seth and Steve!! > > -- > ___________________ > > Andrea Borruso > website: https://medium.com/tantotanto > 38? 7' 48" N, 13? 21' 9" E, EPSG:4326 > ___________________ > > "cercare e saper riconoscere chi e cosa, > ?in mezzo all?inferno, non ? inferno, > e farlo durare, e dargli spazio" > > Italo Calvino > > _______________________________________________ > MapServer-users mailing list > MapServer-users at lists.osgeo.org > https://lists.osgeo.org/mailman/listinfo/mapserver-users -- Jeff McKenna GatewayGeo: Developers of MS4W, MapServer Consulting and Training co-founder of FOSS4G http://gatewaygeo.com/ From sander.pukk at gmail.com Wed Feb 9 01:26:14 2022 From: sander.pukk at gmail.com (Sander Pukk) Date: Wed, 9 Feb 2022 11:26:14 +0200 Subject: [mapserver-users] Mapserver URL request layer Message-ID: Hi there! Trying to use a geojson output from API directly in Mapserver layer. Geojson is per standard, 4326, but my Mapserver and OL (the client) is configured to 3301. We have hundreds of layers (mostly from Postgres) at the same time and the system works. No other direct API ones. The current MAP file's WEB part looks like this: WEB > METADATA > "wfs_title" "title" > "wfs_enable_request" "*" > "wms_enable_request" "*" > "wfs_encoding" "UTF-8" > "wms_title" "title" > "wms_encoding" "UTF-8" > "wms_onlineresource" > "url/mapserv?map=/app/gis/infokihid/infolayers_other.map&" > "wfs_onlineresource" > "url/mapserv?map=/app/gis/infokihid/infolayers_other.map&" > "ows_srs" "EPSG:3301 EPSG:3857 > EPSG:4326" > "ows_enable_request" "*" > "wfs_getfeature_formatlist" "gml,geojson" > "wms_feature_info_mime_type" > "application/json,application/json; > subtype=geojson,application/vnd.ogc.gml,text/plain" > END > END > PROJECTION > "init=epsg:3301" > END And the layer: PROJECTION > "init=epsg:4326" > END > > METADATA > "wfs_srs" "EPSG:3301" > "gml_msGeometry_type" "line" * #"ows_extent" "40500 5993000 1064500 7017000" copy paste lon and > lat from these 3301 coordinates from other layer's capabilites* > "ows_extent" "14.9318705986602 53.7681633673032 35.1060366818735 > 63.2747817924556" > "wfs_extent" "14.9318705986602 53.7681633673032 > 35.1060366818735 63.2747817924556" > "wms_extent" "14.9318705986602 53.7681633673032 > 35.1060366818735 63.2747817924556" > "ows_title" "road_restrictions" > "ows_abstract" "road_restrictions" > "ows_keywordlist" "road_restrictions" > "ows_include_items" "all" > "gml_include_items" "all" > "ows_featureid" "id" > "gml_exclude_items" "edges,geometry" > "ows_exclude_items" "edges,geometry" > END Couple of questions I have which I didnt really find answers for: 1. Had issues with 4326 to 3301 transformation,the extent and all that. (OpenLayers could manage but QGIS couldnt). Previously only had ows_extent. Is ows_extent even a thing? This only shows wms_extent https://mapserver.org/ogc/wms_server.html#layer-object-metadata Should you use wfs_extent and wms_extent instead? 2. My layer is doing an OGR connection directly to the API URL. Works fine. My question is, the API renews itself every 2 minutes (new data). How does Mapserver handle the request with that connection? I move the map (openlayers), there's a new Mapserver request - does Mapserver make a new request to the API endpoint and get a new json? Or is there some sort of cache? 3. Am I missing something else from the Metadata that I should consider? With kind regards, Sander -------------- next part -------------- An HTML attachment was scrubbed... URL: From jukka.rahkonen at maanmittauslaitos.fi Wed Feb 9 02:17:10 2022 From: jukka.rahkonen at maanmittauslaitos.fi (Rahkonen Jukka (MML)) Date: Wed, 9 Feb 2022 10:17:10 +0000 Subject: [mapserver-users] Mapserver URL request layer In-Reply-To: References: Message-ID: <83fc67454a8e4e60a140d109b7ea183c@maanmittauslaitos.fi> Hi, About ows_* from https://www.mapserver.org/ogc/wms_server.html (Note that each of the metadata below can also be referred to as ?ows_*? instead of ?wms_*?. MapServer tries the ?wms_*? metadata first, and if not found it tries the corresponding ?ows_*? name. Using this reduces the amount of duplication in mapfiles that support multiple OGC interfaces since ?ows_*? metadata can be used almost everywhere for common metadata items shared by multiple OGC interfaces.) -Jukka Rahkonen- L?hett?j?: MapServer-users Puolesta Sander Pukk L?hetetty: keskiviikko 9. helmikuuta 2022 11.26 Vastaanottaja: Jason Snyder Aihe: [mapserver-users] Mapserver URL request layer Hi there! Trying to use a geojson output from API directly in Mapserver layer. Geojson is per standard, 4326, but my Mapserver and OL (the client) is configured to 3301. We have hundreds of layers (mostly from Postgres) at the same time and the system works. No other direct API ones. The current MAP file's WEB part looks like this: WEB METADATA "wfs_title" "title" "wfs_enable_request" "*" "wms_enable_request" "*" "wfs_encoding" "UTF-8" "wms_title" "title" "wms_encoding" "UTF-8" "wms_onlineresource" "url/mapserv?map=/app/gis/infokihid/infolayers_other.map&" "wfs_onlineresource" "url/mapserv?map=/app/gis/infokihid/infolayers_other.map&" "ows_srs" "EPSG:3301 EPSG:3857 EPSG:4326" "ows_enable_request" "*" "wfs_getfeature_formatlist" "gml,geojson" "wms_feature_info_mime_type" "application/json,application/json; subtype=geojson,application/vnd.ogc.gml,text/plain" END END PROJECTION "init=epsg:3301" END And the layer: PROJECTION "init=epsg:4326" END METADATA "wfs_srs" "EPSG:3301" "gml_msGeometry_type" "line" #"ows_extent" "40500 5993000 1064500 7017000" copy paste lon and lat from these 3301 coordinates from other layer's capabilites "ows_extent" "14.9318705986602 53.7681633673032 35.1060366818735 63.2747817924556" "wfs_extent" "14.9318705986602 53.7681633673032 35.1060366818735 63.2747817924556" "wms_extent" "14.9318705986602 53.7681633673032 35.1060366818735 63.2747817924556" "ows_title" "road_restrictions" "ows_abstract" "road_restrictions" "ows_keywordlist" "road_restrictions" "ows_include_items" "all" "gml_include_items" "all" "ows_featureid" "id" "gml_exclude_items" "edges,geometry" "ows_exclude_items" "edges,geometry" END Couple of questions I have which I didnt really find answers for: 1. Had issues with 4326 to 3301 transformation,the extent and all that. (OpenLayers could manage but QGIS couldnt). Previously only had ows_extent. Is ows_extent even a thing? This only shows wms_extent https://mapserver.org/ogc/wms_server.html#layer-object-metadata Should you use wfs_extent and wms_extent instead? 2. My layer is doing an OGR connection directly to the API URL. Works fine. My question is, the API renews itself every 2 minutes (new data). How does Mapserver handle the request with that connection? I move the map (openlayers), there's a new Mapserver request - does Mapserver make a new request to the API endpoint and get a new json? Or is there some sort of cache? 3. Am I missing something else from the Metadata that I should consider? With kind regards, Sander -------------- next part -------------- An HTML attachment was scrubbed... URL: From joerg.thomsen at wheregroup.com Wed Feb 9 02:34:52 2022 From: joerg.thomsen at wheregroup.com (=?UTF-8?Q?J=c3=b6rg_Thomsen_=28WhereGroup=29?=) Date: Wed, 9 Feb 2022 11:34:52 +0100 Subject: [mapserver-users] Mapserver URL request layer In-Reply-To: References: Message-ID: <7c918dee-3012-c409-6773-dadd87f16dba@wheregroup.com> Hello Sander, > 1. Had issues with 4326 to 3301 transformation,the extent and all > that. (OpenLayers could manage but QGIS couldnt). Previously only > had ows_extent. > Is ows_extent even a thing? This only shows wms_extent > https://mapserver.org/ogc/wms_server.html#layer-object-metadata > Should you use wfs_extent and wms_extent instead? > the wms_ / wfs_ / ows_ / oga_ (coming in MapServer 8) Metadata-entry are aiming on your output. So, if you only want to serve wms, you only need the wms_*. wfs_* conigures your WFS-server. If you want to serv wms and wfs and the parameters are the same, you can use ows_ instead. > > 1. My layer is doing an OGR connection directly to the API URL. Works > fine. My question is, the API renews itself every 2 minutes (new > data). > How does Mapserver handle the request with that connection? I move > the map (openlayers), there's a new Mapserver request - does > Mapserver make a new request to the API endpoint and get a new json? > Or is there some sort of cache? > No cache by default. MapServer requests the data source every time mapserver gets itself a getmap or get feature info request (or getfeature when serving wfs). So your WMS serves the actual data any time. If you want a cache, you have to configure mapcache or mapproxy separately. > 1. Am I missing something else from the Metadata that I should consider? > I don't see anything missing J?rg Am 09.02.22 um 10:26 schrieb Sander Pukk: > Hi there! > > Trying to use a geojson output from API directly in Mapserver layer. > Geojson is per standard, 4326, but my Mapserver and OL (the client) is > configured to 3301. > We have hundreds of layers (mostly from Postgres) at the same time and > the system works. > No other direct API ones. > > The current MAP file's WEB part looks like this: > > WEB > ? ? ? METADATA > ? ? ? ? "wfs_title" ? ? ? ? ? ? ? ? ? ? "title" > ? ? ? ? "wfs_enable_request" ? ? ? ? ? ?"*" > ? ? ? ? "wms_enable_request" ? ? ? ? ? ?"*" > ? ? ? ? "wfs_encoding" ? ? ? ? ? ? ? ? ?"UTF-8" > ? ? ? ? "wms_title" ? ? ? ? ? ? ? ? ? ? "title" > ? ? ? ? "wms_encoding" ? ? ? ? ? ? ? ? ?"UTF-8" > ? ? ? ? "wms_onlineresource" > ?"url/mapserv?map=/app/gis/infokihid/infolayers_other.map&" > ? ? ? ? "wfs_onlineresource" > ?"url/mapserv?map=/app/gis/infokihid/infolayers_other.map&" > ? ? ? ? "ows_srs"? ? ? ? ? ? ? ? ? ? ? ? ? ? "EPSG:3301 EPSG:3857 > EPSG:4326" > ? ? ? ? "ows_enable_request" ? ? ? ? ? ?"*" > ? ? ? ? "wfs_getfeature_formatlist" ? ? "gml,geojson" > ? ? ? ? "wms_feature_info_mime_type" > ?"application/json,application/json; > subtype=geojson,application/vnd.ogc.gml,text/plain" > ? ? ? END > ? END > > PROJECTION > ? ? ? "init=epsg:3301" > ? END > > And the layer: > > ? PROJECTION > ? ? ? ? "init=epsg:4326" > ? ? END > > ? ? METADATA > ? ? ? ? "wfs_srs" ? ? ? ? ? ? ? "EPSG:3301" > ? ? ? ? "gml_msGeometry_type" "line" > > /? ? ? ?#"ows_extent" "40500 5993000 1064500 7017000" copy paste > lon and lat from these 3301 coordinates from other layer's > capabilites/ > ? ? ? ? "ows_extent" "14.9318705986602 53.7681633673032 > 35.1060366818735 63.2747817924556" > ? ? ? ? "wfs_extent" ? ? ? ?"14.9318705986602 53.7681633673032 > 35.1060366818735 63.2747817924556" > ? ? ? ? "wms_extent" ? ? ? ?"14.9318705986602 53.7681633673032 > 35.1060366818735 63.2747817924556" > ? ? ? ? "ows_title" "road_restrictions" > ? ? ? ? "ows_abstract" "road_restrictions" > ? ? ? ? "ows_keywordlist" "road_restrictions" > ? ? ? ? "ows_include_items" "all" > ? ? ? ? "gml_include_items" "all" > ? ? ? ? "ows_featureid" "id" > ? ? ? ? "gml_exclude_items" ? ? ? ? "edges,geometry" > ? ? ? ? "ows_exclude_items" ? ? ? ? "edges,geometry" > ? ? END > > > > ?Couple of questions?I have which I didnt really find answers for: > > 1. Had issues with 4326 to 3301 transformation,the extent and all > that. (OpenLayers could manage but QGIS couldnt). Previously only > had ows_extent. > Is ows_extent even a thing? This only shows wms_extent > https://mapserver.org/ogc/wms_server.html#layer-object-metadata > Should you use wfs_extent and wms_extent instead? > 2. My layer is doing an OGR connection directly to the API URL. Works > fine. My question is, the API renews itself every 2 minutes (new > data). > How does Mapserver handle the request with that connection? I move > the map (openlayers), there's a new Mapserver request - does > Mapserver make a new request to the API endpoint and get a new json? > Or is there some sort of cache? > 3. Am I missing something else from the Metadata that I should consider? > > With kind regards, > Sander > > _______________________________________________ > MapServer-users mailing list > MapServer-users at lists.osgeo.org > https://lists.osgeo.org/mailman/listinfo/mapserver-users -- Viele Gr??e, J?rg Thomsen --------------------------------------------- Schon gewusst? In unserem Blog geben wir Tipps & Tricks zu Open-Source-GIS-Software und berichten aus unserem Experten-Alltag: https://wheregroup.com/blog/ --------------------------------------------- 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 -------------- next part -------------- An HTML attachment was scrubbed... URL: From sander.pukk at gmail.com Wed Feb 9 02:44:39 2022 From: sander.pukk at gmail.com (Sander Pukk) Date: Wed, 9 Feb 2022 12:44:39 +0200 Subject: [mapserver-users] Mapserver URL request layer In-Reply-To: <7c918dee-3012-c409-6773-dadd87f16dba@wheregroup.com> References: <7c918dee-3012-c409-6773-dadd87f16dba@wheregroup.com> Message-ID: Hei! I got my answers. Thanks guys! Sander On Wed, Feb 9, 2022 at 12:35 PM J?rg Thomsen (WhereGroup) < joerg.thomsen at wheregroup.com> wrote: > Hello Sander, > > > 1. Had issues with 4326 to 3301 transformation,the extent and all > that. (OpenLayers could manage but QGIS couldnt). Previously only had > ows_extent. > Is ows_extent even a thing? This only shows wms_extent > https://mapserver.org/ogc/wms_server.html#layer-object-metadata > Should you use wfs_extent and wms_extent instead? > > the wms_ / wfs_ / ows_ / oga_ (coming in MapServer 8) Metadata-entry are > aiming on your output. So, if you only want to serve wms, you only need the > wms_*. > wfs_* conigures your WFS-server. If you want to serv wms and wfs and the > parameters are the same, you can use ows_ instead. > > > 1. My layer is doing an OGR connection directly to the API URL. Works > fine. My question is, the API renews itself every 2 minutes (new data). > How does Mapserver handle the request with that connection? I move the > map (openlayers), there's a new Mapserver request - does Mapserver make a > new request to the API endpoint and get a new json? > Or is there some sort of cache? > > No cache by default. MapServer requests the data source every time > mapserver gets itself a getmap or get feature info request (or getfeature > when serving wfs). So your WMS serves the actual data any time. If you want > a cache, you have to configure mapcache or mapproxy separately. > > > 1. Am I missing something else from the Metadata that I should > consider? > > I don't see anything missing > > J?rg > > Am 09.02.22 um 10:26 schrieb Sander Pukk: > > Hi there! > > Trying to use a geojson output from API directly in Mapserver layer. > Geojson is per standard, 4326, but my Mapserver and OL (the client) is > configured to 3301. > We have hundreds of layers (mostly from Postgres) at the same time and the > system works. > No other direct API ones. > > The current MAP file's WEB part looks like this: > > WEB >> METADATA >> "wfs_title" "title" >> "wfs_enable_request" "*" >> "wms_enable_request" "*" >> "wfs_encoding" "UTF-8" >> "wms_title" "title" >> "wms_encoding" "UTF-8" >> "wms_onlineresource" >> "url/mapserv?map=/app/gis/infokihid/infolayers_other.map&" >> "wfs_onlineresource" >> "url/mapserv?map=/app/gis/infokihid/infolayers_other.map&" >> "ows_srs" "EPSG:3301 EPSG:3857 >> EPSG:4326" >> "ows_enable_request" "*" >> "wfs_getfeature_formatlist" "gml,geojson" >> "wms_feature_info_mime_type" >> "application/json,application/json; >> subtype=geojson,application/vnd.ogc.gml,text/plain" >> END >> END > > > >> PROJECTION >> "init=epsg:3301" >> END > > > > And the layer: > > PROJECTION >> "init=epsg:4326" >> END >> >> METADATA >> "wfs_srs" "EPSG:3301" >> "gml_msGeometry_type" "line" > > * #"ows_extent" "40500 5993000 1064500 7017000" copy paste lon and >> lat from these 3301 coordinates from other layer's capabilites* >> "ows_extent" "14.9318705986602 53.7681633673032 35.1060366818735 >> 63.2747817924556" >> "wfs_extent" "14.9318705986602 53.7681633673032 >> 35.1060366818735 63.2747817924556" >> "wms_extent" "14.9318705986602 53.7681633673032 >> 35.1060366818735 63.2747817924556" >> "ows_title" "road_restrictions" >> "ows_abstract" "road_restrictions" >> "ows_keywordlist" "road_restrictions" >> "ows_include_items" "all" >> "gml_include_items" "all" >> "ows_featureid" "id" >> "gml_exclude_items" "edges,geometry" >> "ows_exclude_items" "edges,geometry" >> END > > > > Couple of questions I have which I didnt really find answers for: > > > 1. Had issues with 4326 to 3301 transformation,the extent and all > that. (OpenLayers could manage but QGIS couldnt). Previously only had > ows_extent. > Is ows_extent even a thing? This only shows wms_extent > https://mapserver.org/ogc/wms_server.html#layer-object-metadata > Should you use wfs_extent and wms_extent instead? > 2. My layer is doing an OGR connection directly to the API URL. Works > fine. My question is, the API renews itself every 2 minutes (new data). > How does Mapserver handle the request with that connection? I move the > map (openlayers), there's a new Mapserver request - does Mapserver make a > new request to the API endpoint and get a new json? > Or is there some sort of cache? > 3. Am I missing something else from the Metadata that I should > consider? > > > With kind regards, > Sander > > _______________________________________________ > MapServer-users mailing listMapServer-users at lists.osgeo.orghttps://lists.osgeo.org/mailman/listinfo/mapserver-users > > > -- > Viele Gr??e, > J?rg Thomsen > > --------------------------------------------- > Schon gewusst? > In unserem Blog geben wir Tipps & Tricks zu Open-Source-GIS-Software > und berichten aus unserem Experten-Alltag: > https://wheregroup.com/blog/ > --------------------------------------------- > > 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.comwww.wheregroup.com > > Gesch?ftsf?hrer: > Olaf Knopp, Peter Stamm > Amtsgericht Bonn, HRB 9885 > > ------------------------------- > Folgen Sie der WhereGroup auf twitter: http://twitter.com/WhereGroup_com > > _______________________________________________ > MapServer-users mailing list > MapServer-users at lists.osgeo.org > https://lists.osgeo.org/mailman/listinfo/mapserver-users > -------------- next part -------------- An HTML attachment was scrubbed... URL: From trygve at aspenes.priv.no Wed Feb 9 03:09:53 2022 From: trygve at aspenes.priv.no (Trygve Aspenes) Date: Wed, 09 Feb 2022 12:09:53 +0100 Subject: [mapserver-users] Mapcache disk cache gives unexpected paths to tiles Message-ID: Hi I have a mapcache running using disk as cache method with config like this: /mapcache But here is what I get on disk: /mapcache//EPSG:3857/2022-02-05T00:12:00Z/05/000/000/038/000/000/043.png What I don't understand is below the zoom level (here 05) I get 000 followed by 000. Then the y followed by another double 000 before I get the x with my extension. Where does all these 000 sub directories comes from and what functions do they have? I don't think this affects the performance, but this must cause creating thousands and thousands of unnecessary sub directories? Thanks. Trygve From thomas.bonfort at gmail.com Wed Feb 9 03:24:09 2022 From: thomas.bonfort at gmail.com (thomas bonfort) Date: Wed, 9 Feb 2022 12:24:09 +0100 Subject: [mapserver-users] Mapcache disk cache gives unexpected paths to tiles In-Reply-To: References: Message-ID: You should remove the /mapcache from the >cache> block, as it takes precedence over your