[MapServer-users] security releases available: 8.2.0-beta3, 8.0.2, 7.6.6
The MapServer team announces security releases for 8.2.0-beta3, 8.0.2, 7.6.6 These releases address a security flaw of potential SQL injections related to regex validation (ticket #7075). Details of the ongoing 8.2.0 release can be found at https://mapserver.org/development/announce/8-2.html Here are the direct downloads for today's releases: - 8.2.0-beta3: https://download.osgeo.org/mapserver/mapserver-8.2.0-beta3.tar.gz - 8.0.3: https://download.osgeo.org/mapserver/mapserver-8.0.2.tar.gz - 7.6.6: https://download.osgeo.org/mapserver/mapserver-7.6.6.tar.gz (all services on demo.mapserver.org have been upgraded as well) Thanks, -- The MapServer Team ___ MapServer-users mailing list MapServer-users@lists.osgeo.org https://lists.osgeo.org/mailman/listinfo/mapserver-users
[MapServer-users] SOLVED Re: Cluster style crashes MapServer 8
Hi, well, that was a journey. I was able to grap a .dmp-file created by a mapserver-crash (not so easy cause it gets deleted very fast automatically by windows) and windbg revealed, that the crash happens in the libpq.dll of the MapServer-Distribution of gisinternals, caused by the uacrtbase.dll. Microsoft claims, that regardless of how many uacrtbase.dll's there are at different locations on your machine, only the OS-Version somewhere in the windows-directory is used. Since i couldn't change this dll i searched for another version of the libpq.dll and after testing many, the libpq.dll from the current OSGeo4W - QGis-Install-Directory solves the problem (just replace the orginal with the OSGeo4W-Version). After copying the file the clustered and all other postgis layers worked again as expected. It seems to be dependend on the version of the uacrtbase.dll on your system. The version on our windows server is 10.0.20348.2461 and it works with libpq.dll v16.2. BR Stefan Am 11.06.2024 um 10:14 schrieb Jaques Tati via MapServer-users: Hi Seth, layer has an EXTEND (ensured this after reading the results of a search through this mailing list). I also did a mapserver 8 setup with a postgis layer and the same layer definition on my private laptop also with a postgis source and it works flawless. - but it uses IIS as webserver. I wrote, that according to logging the data comes back from the postgreSQL source and when i do comment out the CLUSTER the data is correctly displayed. But, i will try to test your idea about the shapefile source, will come back then. thanks anyway and BR Stefan Am 11.06.2024 um 09:51 schrieb Seth G: Hi, A couple of things to try to narrow down the issue: 1. If you are able to export the PostGIS layer to a shapefile, then you can change the DATA of the layer and see if there is still a crash. 2. Is there an EXTENT set on the layer? I ran into an issue using MS SQL [1] and clustering. Try adding one manually. Seth [1] https://github.com/MapServer/MapServer/pull/6278 -- web:https://geographika.net & https://mapserverstudio.net twitter: @geographika On Tue, Jun 11, 2024, at 9:31 AM, Jaques Tati via MapServer-users wrote: Hi There, in our application we're upgrading our v7.6 MapServer to v8.01. Everything seems to work good so far but we have one layer that uses Clustering of points and whenever this layer should be displayed MapServer 8 crashes reproducably. This layer works flawless in v7.6 and clustering is setup exactly from the book. When i comment clustering out, the layer is displayed, so all other style features do work. Datasource is a PostGIS layer, webserver is Apache 2.4.59. Looking at the debug output, the data comes back as expected from the database, even clustering is logged and no error in the MapServer-Logfile. The crash is reported in Windows Application-Eventlog with only cryptic reasons that do not really result in any valid answers when googling. ..there is a word "StackHash" included that might point to DEP (DataExecutionPrevention) of Windows, - but since all other layers do work with the MapServer-Exe it would be hard to understand why windows does prevent the output of clustered layers. We're using Windows Server 2022 21H2 Datacenter Edition, 8 CPU 32GB RAM. Anyone heard of this crude behaviour, I'm running out of ideas? Thanks in advance for any hint SH ___ MapServer-users mailing list MapServer-users@lists.osgeo.org https://lists.osgeo.org/mailman/listinfo/mapserver-users ___ MapServer-users mailing list MapServer-users@lists.osgeo.org https://lists.osgeo.org/mailman/listinfo/mapserver-users ___ MapServer-users mailing list MapServer-users@lists.osgeo.org https://lists.osgeo.org/mailman/listinfo/mapserver-users
Re: [MapServer-users] Cluster style crashes MapServer 8
Hi Seth, layer has an EXTEND (ensured this after reading the results of a search through this mailing list). I also did a mapserver 8 setup with a postgis layer and the same layer definition on my private laptop also with a postgis source and it works flawless. - but it uses IIS as webserver. I wrote, that according to logging the data comes back from the postgreSQL source and when i do comment out the CLUSTER the data is correctly displayed. But, i will try to test your idea about the shapefile source, will come back then. thanks anyway and BR Stefan Am 11.06.2024 um 09:51 schrieb Seth G: Hi, A couple of things to try to narrow down the issue: 1. If you are able to export the PostGIS layer to a shapefile, then you can change the DATA of the layer and see if there is still a crash. 2. Is there an EXTENT set on the layer? I ran into an issue using MS SQL [1] and clustering. Try adding one manually. Seth [1] https://github.com/MapServer/MapServer/pull/6278 -- web:https://geographika.net & https://mapserverstudio.net twitter: @geographika On Tue, Jun 11, 2024, at 9:31 AM, Jaques Tati via MapServer-users wrote: Hi There, in our application we're upgrading our v7.6 MapServer to v8.01. Everything seems to work good so far but we have one layer that uses Clustering of points and whenever this layer should be displayed MapServer 8 crashes reproducably. This layer works flawless in v7.6 and clustering is setup exactly from the book. When i comment clustering out, the layer is displayed, so all other style features do work. Datasource is a PostGIS layer, webserver is Apache 2.4.59. Looking at the debug output, the data comes back as expected from the database, even clustering is logged and no error in the MapServer-Logfile. The crash is reported in Windows Application-Eventlog with only cryptic reasons that do not really result in any valid answers when googling. ..there is a word "StackHash" included that might point to DEP (DataExecutionPrevention) of Windows, - but since all other layers do work with the MapServer-Exe it would be hard to understand why windows does prevent the output of clustered layers. We're using Windows Server 2022 21H2 Datacenter Edition, 8 CPU 32GB RAM. Anyone heard of this crude behaviour, I'm running out of ideas? Thanks in advance for any hint SH ___ MapServer-users mailing list MapServer-users@lists.osgeo.org https://lists.osgeo.org/mailman/listinfo/mapserver-users ___ MapServer-users mailing list MapServer-users@lists.osgeo.org https://lists.osgeo.org/mailman/listinfo/mapserver-users
Re: [MapServer-users] Cluster style crashes MapServer 8
Hi, A couple of things to try to narrow down the issue: 1. If you are able to export the PostGIS layer to a shapefile, then you can change the DATA of the layer and see if there is still a crash. 2. Is there an EXTENT set on the layer? I ran into an issue using MS SQL [1] and clustering. Try adding one manually. Seth [1] https://github.com/MapServer/MapServer/pull/6278 -- web:https://geographika.net & https://mapserverstudio.net twitter: @geographika On Tue, Jun 11, 2024, at 9:31 AM, Jaques Tati via MapServer-users wrote: > Hi There, > > in our application we're upgrading our v7.6 MapServer to v8.01. > Everything seems to work good so far but we have one layer that uses > Clustering of points > and whenever this layer should be displayed MapServer 8 crashes > reproducably. > > This layer works flawless in v7.6 and clustering is setup exactly from > the book. > When i comment clustering out, the layer is displayed, so all other > style features do work. > Datasource is a PostGIS layer, webserver is Apache 2.4.59. > > Looking at the debug output, the data comes back as expected from the > database, > even clustering is logged and no error in the MapServer-Logfile. > The crash is reported in Windows Application-Eventlog with only cryptic > reasons that do > not really result in any valid answers when googling. > ..there is a word "StackHash" included that might point to DEP > (DataExecutionPrevention) > of Windows, - but since all other layers do work with the MapServer-Exe > it would be hard > to understand why windows does prevent the output of clustered layers. > > We're using Windows Server 2022 21H2 Datacenter Edition, 8 CPU 32GB RAM. > > Anyone heard of this crude behaviour, I'm running out of ideas? > > Thanks in advance for any hint > > SH > ___ > MapServer-users mailing list > MapServer-users@lists.osgeo.org > https://lists.osgeo.org/mailman/listinfo/mapserver-users ___ MapServer-users mailing list MapServer-users@lists.osgeo.org https://lists.osgeo.org/mailman/listinfo/mapserver-users
[MapServer-users] Cluster style crashes MapServer 8
Hi There, in our application we're upgrading our v7.6 MapServer to v8.01. Everything seems to work good so far but we have one layer that uses Clustering of points and whenever this layer should be displayed MapServer 8 crashes reproducably. This layer works flawless in v7.6 and clustering is setup exactly from the book. When i comment clustering out, the layer is displayed, so all other style features do work. Datasource is a PostGIS layer, webserver is Apache 2.4.59. Looking at the debug output, the data comes back as expected from the database, even clustering is logged and no error in the MapServer-Logfile. The crash is reported in Windows Application-Eventlog with only cryptic reasons that do not really result in any valid answers when googling. ..there is a word "StackHash" included that might point to DEP (DataExecutionPrevention) of Windows, - but since all other layers do work with the MapServer-Exe it would be hard to understand why windows does prevent the output of clustered layers. We're using Windows Server 2022 21H2 Datacenter Edition, 8 CPU 32GB RAM. Anyone heard of this crude behaviour, I'm running out of ideas? Thanks in advance for any hint SH ___ MapServer-users mailing list MapServer-users@lists.osgeo.org https://lists.osgeo.org/mailman/listinfo/mapserver-users
Re: [MapServer-users] Font file gets locked by the mapserv process
Hi Petrovicz, Is this running using CGI or FastCGI? Why do you need to overwrite the font file? If it is to redeploy MapServer applications, I normally stop IIS first as part of the deployment script, and add a wait/sleep so it is actually stopped before copying over new files. Seth -- web:https://geographika.net & https://mapserverstudio.net twitter: @geographika On Mon, Jun 10, 2024, at 10:25 AM, Benedek Petrovicz via MapServer-users wrote: > Hi! > > When trying to make a new deploy on our server we get an error that the font > file which is being used for WMS requests is locked by the mapserv process > and cannot be overwritten. > I re-created the issue on a local test environment. (OS: Windows, mapserv is > running on IIS) > > I send a WMS request to mapserv, where I use an arial.ttf font file. > After the request is fulfilled, IIS keeps the process running for a while to > be prepared for any additional requests. > Even though no requests are coming in, mapserv keeps a lock on the font file. > I can delete/overwrite any other files (mapfiles, fontset.list, etc.), but > not that single font file. > After the process reaches its idle time limit (which is set in IIS) and > terminates, the file is not being locked anymore. > > Is there a specific reason for keeping that font file locked while idling? > Can I prevent this somehow? > > Thanks > Petrovicz > ___ > MapServer-users mailing list > MapServer-users@lists.osgeo.org > https://lists.osgeo.org/mailman/listinfo/mapserver-users > ___ MapServer-users mailing list MapServer-users@lists.osgeo.org https://lists.osgeo.org/mailman/listinfo/mapserver-users
[MapServer-users] [ANNOUNCEMENT] Twin Cities Local Chapter (aka TCMUG) Meeting
Hello, Our next meeting will be at the Wandering Leaf Brewery <https://wanderingleafbrewing.com/>. Time: 4:30 - 6:00 Date: June 12th, 2024 Location: Sibley Plaza <https://www.google.com/maps/place/Wandering+Leaf+Brewing+Company/@44.9028711,-93.1753702,17.02z/data=!4m6!3m5!1s0x87f62b4bda6a2009:0x688830515c0a36bc!8m2!3d44.9028641!4d-93.1705532!16s%2Fg%2F11tnhgl5c1?entry=ttu> See you there. bobb -- Bob Basques bbasq...@sharedgeo.org 612.598.9210 ___ MapServer-users mailing list MapServer-users@lists.osgeo.org https://lists.osgeo.org/mailman/listinfo/mapserver-users
[MapServer-users] Font file gets locked by the mapserv process
Hi! When trying to make a new deploy on our server we get an error that the font file which is being used for WMS requests is locked by the mapserv process and cannot be overwritten. I re-created the issue on a local test environment. (OS: Windows, mapserv is running on IIS) I send a WMS request to mapserv, where I use an arial.ttf font file. After the request is fulfilled, IIS keeps the process running for a while to be prepared for any additional requests. Even though no requests are coming in, mapserv keeps a lock on the font file. I can delete/overwrite any other files (mapfiles, fontset.list, etc.), but not that single font file. After the process reaches its idle time limit (which is set in IIS) and terminates, the file is not being locked anymore. Is there a specific reason for keeping that font file locked while idling? Can I prevent this somehow? Thanks Petrovicz ___ MapServer-users mailing list MapServer-users@lists.osgeo.org https://lists.osgeo.org/mailman/listinfo/mapserver-users
[MapServer-users] 8.2.0-beta2 released
The MapServer team is excited to announce the second beta release of MapServer 8.2.0. Please help us test and let us know of any findings. Details of the new features, changelog, migration instructions, and download links can be found on the dedicated announcement page at https://mapserver.org/development/announce/8-2.html . (a few issues were quickly found in the first beta, so a quick second beta was released, as "release numbers are cheap") We're on schedule for a release candidate this coming Friday. -- The MapServer Team ___ MapServer-users mailing list MapServer-users@lists.osgeo.org https://lists.osgeo.org/mailman/listinfo/mapserver-users
[MapServer-users] mapserver union layer of type chart
Hello, just wondering weather it is possible to have union (by connectiontype) layer of type chart? Yesterday I have tried, but each time got an empty image. Configuration looks like: LAYER NAME union_layer_name TYPE CHART #PROCESSING "CHART_TYPE=pie" #PROCESSING "CHART_SIZE_RANGE=c 30 100 2 200 5" PROCESSING "ITEMS=province,c,n,y,ts,level_code" STYLEITEM "AUTO" STATUS DEFAULT CONNECTIONTYPE UNION CONNECTION "layer1,layer2 etc." METADATA ows_title "name" ows_include_items '*' gml_include_items "all" gml_geom_type "point" ows_enable_request '*' "wms_timeextent" "2009,2010,2011,2012,2013,2014,2015,2016,2017,2018,2019,2020,2021,2022,2023" "wms_timeitem" "ts" "wms_timedefault" "2009" END PROJECTION "init=epsg:4326" END VALIDATION 'time' '[0-9]{4}' 'default_time' '2009' END CLASS END END LAYER NAME layer1 CONNECTIONTYPE POSTGIS CONNECTION "host=x dbname=x user=x password=x" DATA "geom_p from (... ) foo using unique province using srid=4326" STATUS ON TYPE CHART PROCESSING "CHART_TYPE=pie" PROCESSING "CHART_SIZE_RANGE=c 30 100 2 200 5" STATUS ON PROCESSING "LABEL_NO_CLIP=True" PROJECTION "init=epsg:4326" END VALIDATION 'time' '[0-9]{4}' 'default_time' '2009' END METADATA wms_title "layer 1" gml_include_items "all" gml_geom_type "point" ows_include_items "all" ows_enable_request "*" "wms_timeextent" "2009,2010,2011,2012,2013,2014,2015,2016,2017,2018,2019,2020,2021,2022,2023" "wms_timeitem" "ts" "wms_timedefault" "2009" END MAXSCALEDENOM 1001 MINSCALEDENOM 121 FILTER ([level_code]=1) etc... If I uncomment these lines in union layer: #PROCESSING "CHART_TYPE=pie" #PROCESSING "CHART_SIZE_RANGE=c 30 100 2 200 5" This works but returns an empty image. And if these lines are not there , mapserver breaks with internal error. I have looked briefly through documentation but nowhere was mentioned that union layer doesn’t support type chart, so maybe there is something missing in my mapfile. Another thing is that may be there are other better option for me rather than using union layer. The thing is that I would like to draw map charts for different administrative units based on map scales, let’s say if I am in small map scale to draw chart for the country, if I zoom in — for district, and if I zoom further — for municipality. I have tried to keep it all in one layer of type chart and use this type of class definitions: class expression ([level_code]=1) minscaledenom 100 maxscaledenom 50 ….. But it didn’t work — apparently in layer of type chart keyword expression is not used in the same way as in other layers. So, would be grateful if someone could help me with this. Sincerely, Zmitser -- Zmitser Kozhukh___ MapServer-users mailing list MapServer-users@lists.osgeo.org https://lists.osgeo.org/mailman/listinfo/mapserver-users
Re: [MapServer-users] Getting msCGILoadMap(): Web application error. Required configuration value MS_MAP_PATTERN not set.
Here's the result of Cat /tmp/init_env | grep MS_ MS_ERRORFILE=stderr MS_MAP_PATTERN=/(.*?)mapfiles/(.*?).map MS_MAPFILE=/my_mapfiles/.map MS_DEBUGLEVEL=1 And here's the Dockerfile: FROM camptocamp/mapserver:8.0 # overwrite apache conf for custom url routes ADD mapserver.conf /etc/apache2/conf-enabled/mapserver.conf RUN chown root /etc/apache2/conf-enabled/mapserver.conf ADD 000-default.conf /etc/apache2/sites-available/000-default.conf # enable apache modules with symlinks RUN ln -s /etc/apache2/mods-available/dir.load /etc/apache2/mods-enabled/dir.load RUN ln -s /etc/apache2/mods-available/dir.conf /etc/apache2/mods-enabled/dir.conf RUN ln -s /etc/apache2/mods-available/autoindex.load /etc/apache2/mods-enabled/autoindex.load RUN ln -s /etc/apache2/mods-available/autoindex.conf /etc/apache2/mods-enabled/autoindex.conf RUN ln -s /etc/apache2/mods-available/rewrite.load /etc/apache2/mods-enabled/rewrite.load # re-apply disabled alias module conf for icons RUN ln -s /etc/apache2/mods-available/alias.conf /etc/apache2/mods-enabled/alias.conf # setup mapserver env variables ADD mapserv.env /docker-entrypoint.d/mapserv.env ENV MS_DEBUGLEVEL=1 ENV MS_ERRORFILE=stderr ENV MS_MAP_PATTERN="/(.*?)mapfiles/(.*?).map" ENV MS_MAPFILE="/my_mapfiles/.map" EXPOSE 80 The only difference between this and the one that works is the base image is 7.6, not 8.0 From: Seth G Sent: Wednesday, June 5, 2024 4:35 PM To: Rob Dennett ; MapServer Users Cc: Chris Repka Subject: Re: [MapServer-users] Getting msCGILoadMap(): Web application error. Required configuration value MS_MAP_PATTERN not set. External: Beware of links/attachments. Try setting MAPSERVER_CONFIG_FILE to point to a mapserver.conf in your own Dockerfile and setting MS_MAP_PATTERN in this config file. Without seeing your custom Dockerfile it is hard to know what could be removing an environment variable - it is simpler to control things with a config file. If you check the /tmp/init_env file you should see the variables that are passed to the Apache environment (which is different from the system environment). If you override the default CMD ["/usr/local/bin/start-server"] then these env variables won't be set. -- web:https://geographika.net & https://mapserverstudio.net twitter: @geographika On Wed, Jun 5, 2024, at 9:21 PM, Rob Dennett wrote: Not sure how uncommenting something in the conf from camptocamp would help when we're actually setting MS_MAP_PATTERN in our Dockerfile which relies on the camptocamp one as a base image. I created a github issue for this as well and they advised running Docker run env | grep MS_ And I see MS_MAP_PATTERN defined there along with MS_MAPFILE set to what I am expecting. Wouldn't this prove that the environment variables are set correctly? From: Seth G Sent: Tuesday, June 4, 2024 4:32 PM To: Rob Dennett ; MapServer Users Cc: Chris Repka Subject: Re: [MapServer-users] Getting msCGILoadMap(): Web application error. Required configuration value MS_MAP_PATTERN not set. External: Beware of links/attachments. Hi Rob, You could try uncommenting the MS_MAP_PATTERN in the mapserver.conf [1] file on your Docker image to see if that has an effect. You should also see a log file named /tmp/init_env that lists all the environment variables used by Apache (including MS_MAP_PATTERN), similar to below: export "MAPSERVER_CONFIG_FILE=/etc/mapserver/mapfiles/mapserver.conf" export "MAPSERVER_CATCH_SEGV=1" export "HOSTNAME=mapserver" export "APACHE_CONFDIR=/etc/apache2" export "BUSY_TIMEOUT=300" export "MS_ERRORFILE=mapserver-8.0.log" export "PWD=/etc/mapserver" export "IO_TIMEOUT=40" export "HOME=/root" export "APACHE_LOG_DIR=/var/log/apache2" export "MIN_PROCESSES=1" export "APACHE_PID_FILE=/tmp/apache2/apache2.pid" export "MS_MAP_PATTERN=^\/etc\/mapserver\/([^\.][-_A-Za-z0-9\.]+\/{1})*([-_A-Za-z0-9\.]+\.map)$" Seth [1] https://github.com/camptocamp/docker-mapserver/blob/cffc18f12146969ed914834b7eba4b798e9c24d9/runtime/etc/mapserver.conf#L15 [2] https://github.com/camptocamp/docker-mapserver/blob/31594debf18f091ad7ca5cf7126723bc014d9781/runtime/usr/local/bin/start-server#L8 -- web:https://geographika.net & https://mapserverstudio.net twitter: @geographika On Tue, Jun 4, 2024, at 11:08 PM, Rob Dennett via MapServer-users wrote: We're using the camptocamp MapServer image and I just tried changing the base image from 7.6 to 8.0, i.e. FROM camptocamp/mapserver:7.6 To FROM camptocamp/mapserver:8.0 in our own Dockerfile and when I try to deploy, We're seeing "msCGILoadMap(): Web application error. Required configuration value MS_MAP_PATTERN not set." on some endpoints (the ones ending in .map) The camptocamp image contains ENV MS_MAP
Re: [MapServer-users] Getting msCGILoadMap(): Web application error. Required configuration value MS_MAP_PATTERN not set.
Try setting MAPSERVER_CONFIG_FILE to point to a mapserver.conf in your own Dockerfile and setting MS_MAP_PATTERN in this config file. Without seeing your custom Dockerfile it is hard to know what could be removing an environment variable - it is simpler to control things with a config file. If you check the /tmp/init_env file you should see the variables that are passed to the Apache environment (which is different from the system environment). If you override the default CMD ["/usr/local/bin/start-server"] then these env variables won't be set. -- web:https://geographika.net & https://mapserverstudio.net twitter: @geographika On Wed, Jun 5, 2024, at 9:21 PM, Rob Dennett wrote: > Not sure how uncommenting something in the conf from camptocamp would help > when we're actually setting MS_MAP_PATTERN in our Dockerfile which relies on > the camptocamp one as a base image. I created a github issue for this as > well and they advised running > > Docker run env | grep MS_ > > And I see MS_MAP_PATTERN defined there along with MS_MAPFILE set to what I am > expecting. Wouldn't this prove that the environment variables are set > correctly? > > > *From:* Seth G > *Sent:* Tuesday, June 4, 2024 4:32 PM > *To:* Rob Dennett ; MapServer Users > > *Cc:* Chris Repka > *Subject:* Re: [MapServer-users] Getting msCGILoadMap(): Web application > error. Required configuration value MS_MAP_PATTERN not set. > > *External: Beware of links/attachments.* > > > > Hi Rob, > > You could try uncommenting the MS_MAP_PATTERN in the mapserver.conf [1] file > on your Docker image to see if that has an effect. > > You should also see a log file named /tmp/init_env that lists all the > environment variables used by Apache (including MS_MAP_PATTERN), similar to > below: > > export "MAPSERVER_CONFIG_FILE=/etc/mapserver/mapfiles/mapserver.conf" > export "MAPSERVER_CATCH_SEGV=1" > export "HOSTNAME=mapserver" > export "APACHE_CONFDIR=/etc/apache2" > export "BUSY_TIMEOUT=300" > export "MS_ERRORFILE=mapserver-8.0.log" > export "PWD=/etc/mapserver" > export "IO_TIMEOUT=40" > export "HOME=/root" > export "APACHE_LOG_DIR=/var/log/apache2" > export "MIN_PROCESSES=1" > export "APACHE_PID_FILE=/tmp/apache2/apache2.pid" > export > "MS_MAP_PATTERN=^\/etc\/mapserver\/([^\.][-_A-Za-z0-9\.]+\/{1})*([-_A-Za-z0-9\.]+\.map)$" > > Seth > > [1] > https://github.com/camptocamp/docker-mapserver/blob/cffc18f12146969ed914834b7eba4b798e9c24d9/runtime/etc/mapserver.conf#L15 > [2] > https://github.com/camptocamp/docker-mapserver/blob/31594debf18f091ad7ca5cf7126723bc014d9781/runtime/usr/local/bin/start-server#L8 > > -- > web:https://geographika.net & https://mapserverstudio.net > twitter: @geographika > > On Tue, Jun 4, 2024, at 11:08 PM, Rob Dennett via MapServer-users wrote: >> We're using the camptocamp MapServer image and I just tried changing the >> base image from 7.6 to 8.0, i.e. >> FROM camptocamp/mapserver:7.6 >> >> To >> >> FROM camptocamp/mapserver:8.0 >> >> in our own Dockerfile and when I try to deploy, We're seeing >> >> "msCGILoadMap(): Web application error. Required configuration value >> MS_MAP_PATTERN not set." >> >> on some endpoints (the ones ending in .map) >> >> The camptocamp image contains >> >> ENV >> MS_MAP_PATTERN=^\\/etc\\/mapserver\\/([^\\.][-_A-Za-z0-9\\.]+\\/{1})*([-_A-Za-z0-9\\.]+\\.map)$ >> >> (https://github.com/camptocamp/docker-mapserver/blob/8.0.0/Dockerfile#L85) >> >> and our own overwrites this env var anyway, along with MS_MAPFILE >> >> These haven't changed and they work fine as long as the base image is 7.6. >> The changelog mentions MS_MAPFILE, but as mentioned, we do define it. >> >> (https://github.com/camptocamp/docker-mapserver/blob/8.0.0/README.md#changelog) >> >> Any idea what might be happening? <https://github.com/camptocamp/docker-mapserver/blob/8.0.0/Dockerfile#L85> >> docker-mapserver/Dockerfile at 8.0.0 · camptocamp/docker-mapserver >> <https://github.com/camptocamp/docker-mapserver/blob/8.0.0/Dockerfile#L85> >> https://hub.docker.com/r/camptocamp/mapserver/. Contribute to >> camptocamp/docker-mapserver development by creating an account on GitHub. >> github.com >> <https://github.com/camptocamp/docker-mapserver/blob/8.0.0/Dockerfile#L85> >> docker-mapserver/Dockerfile at 8.0.0 · camptocamp/docker-mapserver >> <https://github.com/camptocamp/docker-mapserver/blob/8.0.0/Dockerfile#L85> >> https://hub.docker.com/r/camptocamp/mapserver/. Contribute to >> camptocamp/docker-mapserver development by creating an account on GitHub. >> github.com >> >> >> >> ___ >> MapServer-users mailing list >> MapServer-users@lists.osgeo.org >> https://lists.osgeo.org/mailman/listinfo/mapserver-users >> > ___ MapServer-users mailing list MapServer-users@lists.osgeo.org https://lists.osgeo.org/mailman/listinfo/mapserver-users
Re: [MapServer-users] Getting msCGILoadMap(): Web application error. Required configuration value MS_MAP_PATTERN not set.
Not sure how uncommenting something in the conf from camptocamp would help when we're actually setting MS_MAP_PATTERN in our Dockerfile which relies on the camptocamp one as a base image. I created a github issue for this as well and they advised running Docker run env | grep MS_ And I see MS_MAP_PATTERN defined there along with MS_MAPFILE set to what I am expecting. Wouldn't this prove that the environment variables are set correctly? From: Seth G Sent: Tuesday, June 4, 2024 4:32 PM To: Rob Dennett ; MapServer Users Cc: Chris Repka Subject: Re: [MapServer-users] Getting msCGILoadMap(): Web application error. Required configuration value MS_MAP_PATTERN not set. External: Beware of links/attachments. Hi Rob, You could try uncommenting the MS_MAP_PATTERN in the mapserver.conf [1] file on your Docker image to see if that has an effect. You should also see a log file named /tmp/init_env that lists all the environment variables used by Apache (including MS_MAP_PATTERN), similar to below: export "MAPSERVER_CONFIG_FILE=/etc/mapserver/mapfiles/mapserver.conf" export "MAPSERVER_CATCH_SEGV=1" export "HOSTNAME=mapserver" export "APACHE_CONFDIR=/etc/apache2" export "BUSY_TIMEOUT=300" export "MS_ERRORFILE=mapserver-8.0.log" export "PWD=/etc/mapserver" export "IO_TIMEOUT=40" export "HOME=/root" export "APACHE_LOG_DIR=/var/log/apache2" export "MIN_PROCESSES=1" export "APACHE_PID_FILE=/tmp/apache2/apache2.pid" export "MS_MAP_PATTERN=^\/etc\/mapserver\/([^\.][-_A-Za-z0-9\.]+\/{1})*([-_A-Za-z0-9\.]+\.map)$" Seth [1] https://github.com/camptocamp/docker-mapserver/blob/cffc18f12146969ed914834b7eba4b798e9c24d9/runtime/etc/mapserver.conf#L15 [2] https://github.com/camptocamp/docker-mapserver/blob/31594debf18f091ad7ca5cf7126723bc014d9781/runtime/usr/local/bin/start-server#L8 -- web:https://geographika.net & https://mapserverstudio.net twitter: @geographika On Tue, Jun 4, 2024, at 11:08 PM, Rob Dennett via MapServer-users wrote: We're using the camptocamp MapServer image and I just tried changing the base image from 7.6 to 8.0, i.e. FROM camptocamp/mapserver:7.6 To FROM camptocamp/mapserver:8.0 in our own Dockerfile and when I try to deploy, We're seeing "msCGILoadMap(): Web application error. Required configuration value MS_MAP_PATTERN not set." on some endpoints (the ones ending in .map) The camptocamp image contains ENV MS_MAP_PATTERN=^\\/etc\\/mapserver\\/([^\\.][-_A-Za-z0-9\\.]+\\/{1})*([-_A-Za-z0-9\\.]+\\.map)$ (https://github.com/camptocamp/docker-mapserver/blob/8.0.0/Dockerfile#L85) and our own overwrites this env var anyway, along with MS_MAPFILE These haven't changed and they work fine as long as the base image is 7.6. The changelog mentions MS_MAPFILE, but as mentioned, we do define it. (https://github.com/camptocamp/docker-mapserver/blob/8.0.0/README.md#changelog) Any idea what might be happening? [https://opengraph.githubassets.com/89914d21a14748d29e5eb2cb7cf59e720bd216e41863d0bff2ca0e490950eddd/camptocamp/docker-mapserver]<https://github.com/camptocamp/docker-mapserver/blob/8.0.0/Dockerfile#L85> docker-mapserver/Dockerfile at 8.0.0 · camptocamp/docker-mapserver<https://github.com/camptocamp/docker-mapserver/blob/8.0.0/Dockerfile#L85> https://hub.docker.com/r/camptocamp/mapserver/. Contribute to camptocamp/docker-mapserver development by creating an account on GitHub. github.com [https://opengraph.githubassets.com/89914d21a14748d29e5eb2cb7cf59e720bd216e41863d0bff2ca0e490950eddd/camptocamp/docker-mapserver]<https://github.com/camptocamp/docker-mapserver/blob/8.0.0/Dockerfile#L85> docker-mapserver/Dockerfile at 8.0.0 · camptocamp/docker-mapserver<https://github.com/camptocamp/docker-mapserver/blob/8.0.0/Dockerfile#L85> https://hub.docker.com/r/camptocamp/mapserver/. Contribute to camptocamp/docker-mapserver development by creating an account on GitHub. github.com ___ MapServer-users mailing list MapServer-users@lists.osgeo.org<mailto:MapServer-users@lists.osgeo.org> https://lists.osgeo.org/mailman/listinfo/mapserver-users ___ MapServer-users mailing list MapServer-users@lists.osgeo.org https://lists.osgeo.org/mailman/listinfo/mapserver-users
Re: [MapServer-users] Getting msCGILoadMap(): Web application error. Required configuration value MS_MAP_PATTERN not set.
Hi Rob, You could try uncommenting the MS_MAP_PATTERN in the mapserver.conf [1] file on your Docker image to see if that has an effect. You should also see a log file named /tmp/init_env that lists all the environment variables used by Apache (including MS_MAP_PATTERN), similar to below: export "MAPSERVER_CONFIG_FILE=/etc/mapserver/mapfiles/mapserver.conf" export "MAPSERVER_CATCH_SEGV=1" export "HOSTNAME=mapserver" export "APACHE_CONFDIR=/etc/apache2" export "BUSY_TIMEOUT=300" export "MS_ERRORFILE=mapserver-8.0.log" export "PWD=/etc/mapserver" export "IO_TIMEOUT=40" export "HOME=/root" export "APACHE_LOG_DIR=/var/log/apache2" export "MIN_PROCESSES=1" export "APACHE_PID_FILE=/tmp/apache2/apache2.pid" export "MS_MAP_PATTERN=^\/etc\/mapserver\/([^\.][-_A-Za-z0-9\.]+\/{1})*([-_A-Za-z0-9\.]+\.map)$" Seth [1] https://github.com/camptocamp/docker-mapserver/blob/cffc18f12146969ed914834b7eba4b798e9c24d9/runtime/etc/mapserver.conf#L15 [2] https://github.com/camptocamp/docker-mapserver/blob/31594debf18f091ad7ca5cf7126723bc014d9781/runtime/usr/local/bin/start-server#L8 -- web:https://geographika.net & https://mapserverstudio.net twitter: @geographika On Tue, Jun 4, 2024, at 11:08 PM, Rob Dennett via MapServer-users wrote: > We're using the camptocamp MapServer image and I just tried changing the base > image from 7.6 to 8.0, i.e. > FROM camptocamp/mapserver:7.6 > > To > > FROM camptocamp/mapserver:8.0 > > in our own Dockerfile and when I try to deploy, We're seeing > > "msCGILoadMap(): Web application error. Required configuration value > MS_MAP_PATTERN not set." > > on some endpoints (the ones ending in .map) > > The camptocamp image contains > > ENV > MS_MAP_PATTERN=^\\/etc\\/mapserver\\/([^\\.][-_A-Za-z0-9\\.]+\\/{1})*([-_A-Za-z0-9\\.]+\\.map)$ > > (https://github.com/camptocamp/docker-mapserver/blob/8.0.0/Dockerfile#L85) > > and our own overwrites this env var anyway, along with MS_MAPFILE > > These haven't changed and they work fine as long as the base image is 7.6. > The changelog mentions MS_MAPFILE, but as mentioned, we do define it. > > (https://github.com/camptocamp/docker-mapserver/blob/8.0.0/README.md#changelog) > > Any idea what might be happening? <https://github.com/camptocamp/docker-mapserver/blob/8.0.0/Dockerfile#L85> > docker-mapserver/Dockerfile at 8.0.0 · camptocamp/docker-mapserver > <https://github.com/camptocamp/docker-mapserver/blob/8.0.0/Dockerfile#L85> > https://hub.docker.com/r/camptocamp/mapserver/. Contribute to > camptocamp/docker-mapserver development by creating an account on GitHub. > github.com > <https://github.com/camptocamp/docker-mapserver/blob/8.0.0/Dockerfile#L85> > docker-mapserver/Dockerfile at 8.0.0 · camptocamp/docker-mapserver > <https://github.com/camptocamp/docker-mapserver/blob/8.0.0/Dockerfile#L85> > https://hub.docker.com/r/camptocamp/mapserver/. Contribute to > camptocamp/docker-mapserver development by creating an account on GitHub. > github.com > > > > ___ > MapServer-users mailing list > MapServer-users@lists.osgeo.org > https://lists.osgeo.org/mailman/listinfo/mapserver-users > ___ MapServer-users mailing list MapServer-users@lists.osgeo.org https://lists.osgeo.org/mailman/listinfo/mapserver-users
Re: [MapServer-users] Getting msCGILoadMap(): Web application error. Required configuration value MS_MAP_PATTERN not set.
FYI, I found https://www.mail-archive.com/mapserver-users@lists.osgeo.org/msg28778.html Though there the issue was a bad cert, IIUC. Here, literally the only thing that changed on our end was the base image in our Dockerfile. Thanks, Rob From: MapServer-users on behalf of Rob Dennett via MapServer-users Sent: Tuesday, June 4, 2024 4:08 PM To: Bob Basques via MapServer-users Cc: Chris Repka Subject: [MapServer-users] Getting msCGILoadMap(): Web application error. Required configuration value MS_MAP_PATTERN not set. External: Beware of links/attachments. We're using the camptocamp MapServer image and I just tried changing the base image from 7.6 to 8.0, i.e. FROM camptocamp/mapserver:7.6 To FROM camptocamp/mapserver:8.0 in our own Dockerfile and when I try to deploy, We're seeing "msCGILoadMap(): Web application error. Required configuration value MS_MAP_PATTERN not set." on some endpoints (the ones ending in .map) The camptocamp image contains ENV MS_MAP_PATTERN=^\\/etc\\/mapserver\\/([^\\.][-_A-Za-z0-9\\.]+\\/{1})*([-_A-Za-z0-9\\.]+\\.map)$ (https://github.com/camptocamp/docker-mapserver/blob/8.0.0/Dockerfile#L85) and our own overwrites this env var anyway, along with MS_MAPFILE These haven't changed and they work fine as long as the base image is 7.6. The changelog mentions MS_MAPFILE, but as mentioned, we do define it. (https://github.com/camptocamp/docker-mapserver/blob/8.0.0/README.md#changelog) Any idea what might be happening? [https://opengraph.githubassets.com/89914d21a14748d29e5eb2cb7cf59e720bd216e41863d0bff2ca0e490950eddd/camptocamp/docker-mapserver]<https://github.com/camptocamp/docker-mapserver/blob/8.0.0/Dockerfile#L85> docker-mapserver/Dockerfile at 8.0.0 · camptocamp/docker-mapserver<https://github.com/camptocamp/docker-mapserver/blob/8.0.0/Dockerfile#L85> https://hub.docker.com/r/camptocamp/mapserver/. Contribute to camptocamp/docker-mapserver development by creating an account on GitHub. github.com [https://opengraph.githubassets.com/89914d21a14748d29e5eb2cb7cf59e720bd216e41863d0bff2ca0e490950eddd/camptocamp/docker-mapserver]<https://github.com/camptocamp/docker-mapserver/blob/8.0.0/Dockerfile#L85> docker-mapserver/Dockerfile at 8.0.0 · camptocamp/docker-mapserver<https://github.com/camptocamp/docker-mapserver/blob/8.0.0/Dockerfile#L85> https://hub.docker.com/r/camptocamp/mapserver/. Contribute to camptocamp/docker-mapserver development by creating an account on GitHub. github.com ___ MapServer-users mailing list MapServer-users@lists.osgeo.org https://lists.osgeo.org/mailman/listinfo/mapserver-users
[MapServer-users] Getting msCGILoadMap(): Web application error. Required configuration value MS_MAP_PATTERN not set.
We're using the camptocamp MapServer image and I just tried changing the base image from 7.6 to 8.0, i.e. FROM camptocamp/mapserver:7.6 To FROM camptocamp/mapserver:8.0 in our own Dockerfile and when I try to deploy, We're seeing "msCGILoadMap(): Web application error. Required configuration value MS_MAP_PATTERN not set." on some endpoints (the ones ending in .map) The camptocamp image contains ENV MS_MAP_PATTERN=^\\/etc\\/mapserver\\/([^\\.][-_A-Za-z0-9\\.]+\\/{1})*([-_A-Za-z0-9\\.]+\\.map)$ (https://github.com/camptocamp/docker-mapserver/blob/8.0.0/Dockerfile#L85) and our own overwrites this env var anyway, along with MS_MAPFILE These haven't changed and they work fine as long as the base image is 7.6. The changelog mentions MS_MAPFILE, but as mentioned, we do define it. (https://github.com/camptocamp/docker-mapserver/blob/8.0.0/README.md#changelog) Any idea what might be happening? [https://opengraph.githubassets.com/89914d21a14748d29e5eb2cb7cf59e720bd216e41863d0bff2ca0e490950eddd/camptocamp/docker-mapserver]<https://github.com/camptocamp/docker-mapserver/blob/8.0.0/Dockerfile#L85> docker-mapserver/Dockerfile at 8.0.0 · camptocamp/docker-mapserver<https://github.com/camptocamp/docker-mapserver/blob/8.0.0/Dockerfile#L85> https://hub.docker.com/r/camptocamp/mapserver/. Contribute to camptocamp/docker-mapserver development by creating an account on GitHub. github.com [https://opengraph.githubassets.com/89914d21a14748d29e5eb2cb7cf59e720bd216e41863d0bff2ca0e490950eddd/camptocamp/docker-mapserver]<https://github.com/camptocamp/docker-mapserver/blob/8.0.0/Dockerfile#L85> docker-mapserver/Dockerfile at 8.0.0 · camptocamp/docker-mapserver<https://github.com/camptocamp/docker-mapserver/blob/8.0.0/Dockerfile#L85> https://hub.docker.com/r/camptocamp/mapserver/. Contribute to camptocamp/docker-mapserver development by creating an account on GitHub. github.com ___ MapServer-users mailing list MapServer-users@lists.osgeo.org https://lists.osgeo.org/mailman/listinfo/mapserver-users
Re: [MapServer-users] If clustering is used, the capabilities are not completely created
Hi Luuk, What does your GetCapabilities request look like (version etc.)? What error do you get? Does the LAYER have an EXTENT set on it? Maybe there is an issue with trying to calculate this dynamically - if there isn't an extent you could try adding one. Seth -- web:https://geographika.net & https://mapserverstudio.net twitter: @geographika On Mon, Jun 3, 2024, at 4:52 PM, Schaminée, drs. L.C.W. (Luuk) via MapServer-users wrote: > Hi List, > > Does anybody recognize this problem? > > We use clustering in a layer in our WMS. This works fine. But if we ask for > the capabilities we get an error and only part of the capabilities.. > We uise the following lines in our mapfile in the LAYER section: > CLUSTER > MAXDISTANCE 15 > BUFFER 10 > REGION "ellipse" # This line is responsible for not being able to get > the capabilities > END > > If we comment out the line REGION “ellipse” we can get the complete > capabilities. > > Hopefully somebody knows this problem and also knows a/the solution. > > Thanks for any help. > Luuk > > Dit bericht kan informatie bevatten die niet voor u is bestemd. Indien u > niet de geadresseerde bent of dit bericht abusievelijk aan u is gezonden, > wordt u verzocht dat aan de afzender te melden en het bericht te > verwijderen. > De Staat aanvaardt geen aansprakelijkheid voor schade, van welke aard > ook, die verband houdt met risico's verbonden aan het elektronisch > verzenden van berichten. > > This message may contain information that is not intended for you. If you > are not the addressee or if this message was sent to you by mistake, you > are requested to inform the sender and delete the message. > The State accepts no liability for damage of any kind resulting from the > risks inherent in the electronic transmission of messages. > ___ > MapServer-users mailing list > MapServer-users@lists.osgeo.org > https://lists.osgeo.org/mailman/listinfo/mapserver-users > ___ MapServer-users mailing list MapServer-users@lists.osgeo.org https://lists.osgeo.org/mailman/listinfo/mapserver-users
Re: [MapServer-users] mapserver.conf question
If you're running MapServer under Apache as a FastCGI (and hopefully you are because it's much faster than regular CGI) I believe you need: FcgidInitialEnv MAPSERVER_CONFIG_FILE "/path/to/your/mapserver.conf" In your apache2.conf or one of its includes. On Wed, May 29, 2024 at 2:35 AM Brent Wood via MapServer-users < mapserver-users@lists.osgeo.org> wrote: > do you mean: > > /etc/apache2/apache2.conf > > Thanks > > On Tuesday, May 28, 2024 at 06:51:01 PM GMT+12, Richard Duivenvoorde < > rdmaili...@duif.net> wrote: > > > I was in the same position :-) > > What I did on my laptop (running apache): > > In apache.conf you can set it by using: > > SetEnv MAPSERVER_CONFIG_FILE /opt/mapserver/mapserver.conf > > If you use Nginx though (which apparently lacks env variables) I used: > > https://gist.github.com/lhammond/f59d8db526101e9896d0c9bdd8f15139 > > https://mkliver.github.io/blog/mapserver-ubuntu-nginx > > But maybe others have better solutions... > > Regards, > > Richard Duivenvoorde > > > > On 5/28/24 02:52, Brent Wood via MapServer-users wrote: > > Hi, > > > > I'm coming back to mapserver after many years away & have a question. > Probably more later... > > > > I'm setting things up & get the error message: > > /msLoadConfig(): Unable to access file. See > mapserver.org/mapfile/config.html for more information. > > / > > / > > / > > I'm running on Linux Mint (Ubuntu) so the default location is presumably > /usr/local/etc/mapserver.conf > > > > I have copied/renamed the sample file here & given read access to > www-data. Still get the error message. > > > > The docs suggest using the MAPSERVER_CONFIG_FILE environment variable. > > > > I entered the following into the /etc/environment file, which I thought > was supposed to work (according to Dr Google), > > MAPSERVER_CONFIG_FILE="/usr/local/etc/mapserver.conf" > > > > I still get the error, and if I open a new shell (as me), the variable > is not set, so that isn't working as I expected. > > > > > > Can anyone suggest how/where the environment variable should be set for > mapserver to find the file? > > (or any other way to get this working) > > > > I think it would be useful to include this info in the docs, as it is > not apparent to me, and perhaps others. > > > > > > _______ > > MapServer-users mailing list > > MapServer-users@lists.osgeo.org > > https://lists.osgeo.org/mailman/listinfo/mapserver-users > > ___ > MapServer-users mailing list > MapServer-users@lists.osgeo.org > https://lists.osgeo.org/mailman/listinfo/mapserver-users > -- Richard W. Greenwood www.greenwoodmap.com ___ MapServer-users mailing list MapServer-users@lists.osgeo.org https://lists.osgeo.org/mailman/listinfo/mapserver-users
Re: [MapServer-users] mapserver.conf question
do you mean: /etc/apache2/apache2.conf Thanks On Tuesday, May 28, 2024 at 06:51:01 PM GMT+12, Richard Duivenvoorde wrote: I was in the same position :-) What I did on my laptop (running apache): In apache.conf you can set it by using: SetEnv MAPSERVER_CONFIG_FILE /opt/mapserver/mapserver.conf If you use Nginx though (which apparently lacks env variables) I used: https://gist.github.com/lhammond/f59d8db526101e9896d0c9bdd8f15139 https://mkliver.github.io/blog/mapserver-ubuntu-nginx But maybe others have better solutions... Regards, Richard Duivenvoorde On 5/28/24 02:52, Brent Wood via MapServer-users wrote: > Hi, > > I'm coming back to mapserver after many years away & have a question. > Probably more later... > > I'm setting things up & get the error message: > /msLoadConfig(): Unable to access file. See mapserver.org/mapfile/config.html > for more information. > / > / > / > I'm running on Linux Mint (Ubuntu) so the default location is presumably > /usr/local/etc/mapserver.conf > > I have copied/renamed the sample file here & given read access to www-data. > Still get the error message. > > The docs suggest using the MAPSERVER_CONFIG_FILE environment variable. > > I entered the following into the /etc/environment file, which I thought was > supposed to work (according to Dr Google), > MAPSERVER_CONFIG_FILE="/usr/local/etc/mapserver.conf" > > I still get the error, and if I open a new shell (as me), the variable is not > set, so that isn't working as I expected. > > > Can anyone suggest how/where the environment variable should be set for > mapserver to find the file? > (or any other way to get this working) > > I think it would be useful to include this info in the docs, as it is not > apparent to me, and perhaps others. > > > ___ > MapServer-users mailing list > MapServer-users@lists.osgeo.org > https://lists.osgeo.org/mailman/listinfo/mapserver-users _______ MapServer-users mailing list MapServer-users@lists.osgeo.org https://lists.osgeo.org/mailman/listinfo/mapserver-users
Re: [MapServer-users] Issue with Google Maps Background in MapStore
Hi, I think this is the wrong list for your question: MapServer users, there is a MapStore users list: https://groups.google.com/g/mapstore-users Best, Just On 28/05/2024 19:08, Fernando Martins Pimenta via MapServer-users wrote: Hello everyone, I'm encountering an issue with the Google Maps backgrounds in MapStore. When I attempt to print the maps, they do not appear, and the system does not return any error logs. Has anyone else experienced this or have any ideas on what might be causing this issue? Thank you in advance for your help. ___ MapServer-users mailing list MapServer-users@lists.osgeo.org https://lists.osgeo.org/mailman/listinfo/mapserver-users ___ MapServer-users mailing list MapServer-users@lists.osgeo.org https://lists.osgeo.org/mailman/listinfo/mapserver-users
[MapServer-users] Issue with Google Maps Background in MapStore
Hello everyone, I'm encountering an issue with the Google Maps backgrounds in MapStore. When I attempt to print the maps, they do not appear, and the system does not return any error logs. Has anyone else experienced this or have any ideas on what might be causing this issue? Thank you in advance for your help. ___ MapServer-users mailing list MapServer-users@lists.osgeo.org https://lists.osgeo.org/mailman/listinfo/mapserver-users
Re: [MapServer-users] mapserver.conf question
Coincidence? Just today I upgraded from MapServer 7.x.y to 8.0.0 in the Docker Image I provide [1] and found that the configuration conventions have changed as per the docs. Indeed MAPSERVER_CONFIG_FILE env var should point to a global config file, which in turn points to .map file(s). There are many ways to set an environment variable dependent on your context, but if it is available where MapServer is invoked, like with CGI that should work. I don't think there is a single solution. /etc/environment is very global unless the machine is dedicated or personal. In my case running MapServer via Docker, which I can recommend, MAPSERVER_CONFIG_FILE can be set with an -e option or as an env var in a Compose file. The Docker Image uses Lighttp to invoke MS with CGI, which IMHO is a more lightweight solution than using Apache or nginx. Especially if you run multiple services behind a single frontend server (I use e.g. Traefik). [1] https://github.com/justb4/docker-mapserver Best, Just van den Broecke On 28/05/2024 08:50, Richard Duivenvoorde via MapServer-users wrote: I was in the same position :-) What I did on my laptop (running apache): In apache.conf you can set it by using: SetEnv MAPSERVER_CONFIG_FILE /opt/mapserver/mapserver.conf If you use Nginx though (which apparently lacks env variables) I used: https://gist.github.com/lhammond/f59d8db526101e9896d0c9bdd8f15139 https://mkliver.github.io/blog/mapserver-ubuntu-nginx But maybe others have better solutions... Regards, Richard Duivenvoorde On 5/28/24 02:52, Brent Wood via MapServer-users wrote: Hi, I'm coming back to mapserver after many years away & have a question. Probably more later... I'm setting things up & get the error message: /msLoadConfig(): Unable to access file. See mapserver.org/mapfile/config.html for more information. / / / I'm running on Linux Mint (Ubuntu) so the default location is presumably /usr/local/etc/mapserver.conf I have copied/renamed the sample file here & given read access to www-data. Still get the error message. The docs suggest using the MAPSERVER_CONFIG_FILE environment variable. I entered the following into the /etc/environment file, which I thought was supposed to work (according to Dr Google), MAPSERVER_CONFIG_FILE="/usr/local/etc/mapserver.conf" I still get the error, and if I open a new shell (as me), the variable is not set, so that isn't working as I expected. Can anyone suggest how/where the environment variable should be set for mapserver to find the file? (or any other way to get this working) I think it would be useful to include this info in the docs, as it is not apparent to me, and perhaps others. ___ MapServer-users mailing list MapServer-users@lists.osgeo.org https://lists.osgeo.org/mailman/listinfo/mapserver-users ___ MapServer-users mailing list MapServer-users@lists.osgeo.org https://lists.osgeo.org/mailman/listinfo/mapserver-users ___ MapServer-users mailing list MapServer-users@lists.osgeo.org https://lists.osgeo.org/mailman/listinfo/mapserver-users
Re: [MapServer-users] mapserver.conf question
I was in the same position :-) What I did on my laptop (running apache): In apache.conf you can set it by using: SetEnv MAPSERVER_CONFIG_FILE /opt/mapserver/mapserver.conf If you use Nginx though (which apparently lacks env variables) I used: https://gist.github.com/lhammond/f59d8db526101e9896d0c9bdd8f15139 https://mkliver.github.io/blog/mapserver-ubuntu-nginx But maybe others have better solutions... Regards, Richard Duivenvoorde On 5/28/24 02:52, Brent Wood via MapServer-users wrote: Hi, I'm coming back to mapserver after many years away & have a question. Probably more later... I'm setting things up & get the error message: /msLoadConfig(): Unable to access file. See mapserver.org/mapfile/config.html for more information. / / / I'm running on Linux Mint (Ubuntu) so the default location is presumably /usr/local/etc/mapserver.conf I have copied/renamed the sample file here & given read access to www-data. Still get the error message. The docs suggest using the MAPSERVER_CONFIG_FILE environment variable. I entered the following into the /etc/environment file, which I thought was supposed to work (according to Dr Google), MAPSERVER_CONFIG_FILE="/usr/local/etc/mapserver.conf" I still get the error, and if I open a new shell (as me), the variable is not set, so that isn't working as I expected. Can anyone suggest how/where the environment variable should be set for mapserver to find the file? (or any other way to get this working) I think it would be useful to include this info in the docs, as it is not apparent to me, and perhaps others. ___ MapServer-users mailing list MapServer-users@lists.osgeo.org https://lists.osgeo.org/mailman/listinfo/mapserver-users ___ MapServer-users mailing list MapServer-users@lists.osgeo.org https://lists.osgeo.org/mailman/listinfo/mapserver-users
[MapServer-users] mapserver.conf question
Hi, I'm coming back to mapserver after many years away & have a question. Probably more later... I'm setting things up & get the error message: msLoadConfig(): Unable to access file. See mapserver.org/mapfile/config.html for more information. I'm running on Linux Mint (Ubuntu) so the default location is presumably /usr/local/etc/mapserver.conf I have copied/renamed the sample file here & given read access to www-data. Still get the error message. The docs suggest using the MAPSERVER_CONFIG_FILE environment variable. I entered the following into the /etc/environment file, which I thought was supposed to work (according to Dr Google), MAPSERVER_CONFIG_FILE="/usr/local/etc/mapserver.conf" I still get the error, and if I open a new shell (as me), the variable is not set, so that isn't working as I expected. Can anyone suggest how/where the environment variable should be set for mapserver to find the file? (or any other way to get this working) I think it would be useful to include this info in the docs, as it is not apparent to me, and perhaps others. ___ MapServer-users mailing list MapServer-users@lists.osgeo.org https://lists.osgeo.org/mailman/listinfo/mapserver-users
[MapServer-users] TinyOWS 1.2.1 released
The MapServer team is pleased to announce the minor release of TinyOWS 1.2.1, in honor of its visionary, Olivier Courtin. - Changelog: https://mapserver.org/development/changelog/tinyows/changelog-1-2.html#changelog-tinyows-1-2 - Download: https://download.osgeo.org/mapserver/tinyows-1.2.1.tar.gz (TinyOWS 1.2.1 was tested successfully with MS4W 5.0 and PostreSQL 16.3 / PostGIS 3.4.2) Thanks, and thoughts for Olivier... -- The MapServer / TinyOWS Team ___ MapServer-users mailing list MapServer-users@lists.osgeo.org https://lists.osgeo.org/mailman/listinfo/mapserver-users
Re: [MapServer-users] Up-to-date docker image for mapserver
I just created an issue in the repo since 8.0 is two years old at this point. We already tried making our own fork, but are running into issues. the latest was ERROR: failed to solve: process "/bin/bash -o pipefail -cux if test \"${WITH_ORACLE}\" = \"ON\"; then export ORACLE_HOME=/usr/local/lib; fi; cmake .. -GNinja -DCMAKE_C_FLAGS=\"-O2 -DPROJ_RENAME_SYMBOLS\" -DCMAKE_CXX_FLAGS=\"-O2 -DPROJ_RENAME_SYMBOLS\" -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr/local -DWITH_CLIENT_WMS=1 -DWITH_CLIENT_WFS=1 -DWITH_OGCAPI=1 -DWITH_KML=1 -DWITH_SOS=1 -DWITH_XMLMAPFILE=1 -DWITH_CAIRO=1 -DWITH_RSVG=1 -DUSE_PROJ=1 -DUSE_WFS_SVR=1 -DUSE_OGCAPI_SVR=1 -DWITH_ORACLESPATIAL=${WITH_ORACLE}" did not complete successfully: exit code: 1 From: Seth G Sent: Monday, May 20, 2024 5:03 AM To: Rob Dennett ; MapServer Users Subject: Re: [MapServer-users] Up-to-date docker image for mapserver External: Beware of links/attachments. Hi Rob, As far as I'm aware, the camptocamp Docker image is the best maintained public Docker image. You could fork this and create a new Docker image with the updated Apache. I believe it would be a case of updating the versions in https://github.com/camptocamp/docker-mapserver/blob/master/ci/dpkg-versions.yaml (and the version being available). You could also create an issue at https://github.com/camptocamp/docker-mapserver/issues detailing the security issues with the current version of Apache used. Seth -- web:https://geographika.net & https://mapserverstudio.net twitter: @geographika On Fri, May 17, 2024, at 3:40 PM, Rob Dennett via MapServer-users wrote: We're currently using a docker image from camptocamp (https://github.com/camptocamp/docker-mapserver) in an ECS service for our MapServer implementation. However, the 7.6 tag version we're using, along with latest 8.0 tag and even the master bundle MapServer with Apache 2.4.52 at the latest. The most recent version is 2.4.59 and we're trying to update it to resolve issues found in a pen test. Is there a more recent Docker image that people are using? Thanks, Rob _______ MapServer-users mailing list MapServer-users@lists.osgeo.org<mailto:MapServer-users@lists.osgeo.org> https://lists.osgeo.org/mailman/listinfo/mapserver-users ___ MapServer-users mailing list MapServer-users@lists.osgeo.org https://lists.osgeo.org/mailman/listinfo/mapserver-users
Re: [MapServer-users] Up-to-date docker image for mapserver
Hi Rob, As far as I'm aware, the camptocamp Docker image is the best maintained public Docker image. You could fork this and create a new Docker image with the updated Apache. I believe it would be a case of updating the versions in https://github.com/camptocamp/docker-mapserver/blob/master/ci/dpkg-versions.yaml (and the version being available). You could also create an issue at https://github.com/camptocamp/docker-mapserver/issues detailing the security issues with the current version of Apache used. Seth -- web:https://geographika.net & https://mapserverstudio.net twitter: @geographika On Fri, May 17, 2024, at 3:40 PM, Rob Dennett via MapServer-users wrote: > We're currently using a docker image from camptocamp > (https://github.com/camptocamp/docker-mapserver) in an ECS service for our > MapServer implementation. However, the 7.6 tag version we're using, along > with latest 8.0 tag and even the master bundle MapServer with Apache 2.4.52 > at the latest. The most recent version is 2.4.59 and we're trying to update > it to resolve issues found in a pen test. Is there a more recent Docker > image that people are using? > > Thanks, > Rob > _______ > MapServer-users mailing list > MapServer-users@lists.osgeo.org > https://lists.osgeo.org/mailman/listinfo/mapserver-users > ___ MapServer-users mailing list MapServer-users@lists.osgeo.org https://lists.osgeo.org/mailman/listinfo/mapserver-users
Re: [MapServer-users] Mapscript access to ShapeObj of GeomTransform operation
Hi Nicol, The setGeomTransform method simply sets the string expression for the layer - no changes to the geometries occur until rendering (with the draw function), and temporary shapes are created and rendered. If you need to access transformed geometries you'd need to loop through the shapes and use methods on the shapeObj, e.g. https://mapserver.org/mapscript/mapscript-api/stub/mapscript.shapeObj.html#mapscript.shapeObj.simplify The relatively new centerline transformation however is not part of the MapScript API. It could be added (and would be a nice addition). Seth -- web:https://geographika.net & https://mapserverstudio.net twitter: @geographika On Sun, May 19, 2024, at 7:05 PM, Nicol Hermann via MapServer-users wrote: > Hallo all, > > I'am using Python MapScript to perform a GeomTransform centerline > operation. > The corresponding line looks like this: > layerObj.setGeomTransform( "simplify((centerline([shape])), 100)" ) > > How do I get access to the calculated shapeObj of the centerline? > The feature count of > layerObj.numitems > is 0 even if the underlaying data layer has two features. > > Interestingly with map.draw() everything look like expected > > Thanks for any pointers > Nicol > > ___ > MapServer-users mailing list > MapServer-users@lists.osgeo.org > https://lists.osgeo.org/mailman/listinfo/mapserver-users ___ MapServer-users mailing list MapServer-users@lists.osgeo.org https://lists.osgeo.org/mailman/listinfo/mapserver-users
[MapServer-users] Mapscript access to ShapeObj of GeomTransform operation
Hallo all, I'am using Python MapScript to perform a GeomTransform centerline operation. The corresponding line looks like this: layerObj.setGeomTransform( "simplify((centerline([shape])), 100)" ) How do I get access to the calculated shapeObj of the centerline? The feature count of layerObj.numitems is 0 even if the underlaying data layer has two features. Interestingly with map.draw() everything look like expected Thanks for any pointers Nicol ___ MapServer-users mailing list MapServer-users@lists.osgeo.org https://lists.osgeo.org/mailman/listinfo/mapserver-users
Re: [MapServer-users] Add WMTS layer to Mapserver mapfile
Download the Wmts getcapabilites as xml file and point to that in the map file On 2024-05-17 15:46, Mark Volz via MapServer-users wrote: Hello, Is it possible to add an external WMTS layer to a mapfile? Thank You ___ MapServer-users mailing list MapServer-users@lists.osgeo.org https://lists.osgeo.org/mailman/listinfo/mapserver-users ___ MapServer-users mailing list MapServer-users@lists.osgeo.org https://lists.osgeo.org/mailman/listinfo/mapserver-users
[MapServer-users] Add WMTS layer to Mapserver mapfile
Hello, Is it possible to add an external WMTS layer to a mapfile? Thank You ___ MapServer-users mailing list MapServer-users@lists.osgeo.org https://lists.osgeo.org/mailman/listinfo/mapserver-users
[MapServer-users] Up-to-date docker image for mapserver
We're currently using a docker image from camptocamp (https://github.com/camptocamp/docker-mapserver) in an ECS service for our MapServer implementation. However, the 7.6 tag version we're using, along with latest 8.0 tag and even the master bundle MapServer with Apache 2.4.52 at the latest. The most recent version is 2.4.59 and we're trying to update it to resolve issues found in a pen test. Is there a more recent Docker image that people are using? Thanks, Rob ___ MapServer-users mailing list MapServer-users@lists.osgeo.org https://lists.osgeo.org/mailman/listinfo/mapserver-users
[MapServer-users] [ANNOUNCEMENT] Twin Cities Local Chapter (aka TCMUG) Meeting
Forwarding for bobb since he is having email issues... All, Sorry for the late notice. I've been distracted by other things the last couple of weeks. So, I'm going to push this month's meeting a week and have it next week on May 15th. Sorry if this confuses. Our next meeting will be at the Northern TapHouse <https://northerntaphouse.com/> in Woodbury. Map <https://maps.app.goo.gl/b3NDiwrXx5Cn14fr5> Time:4:30 - 6:00 See you there. bobb ___ MapServer-users mailing list MapServer-users@lists.osgeo.org https://lists.osgeo.org/mailman/listinfo/mapserver-users
Re: [MapServer-users] zoomRectangle error image rectangle maxy >= miny
Thanks for everything Seth, it's already solved. The truth is that I had previously tried reversing the values of Y but the result was another error: $pixext = new rectObj($minx, $miny, $maxx, $maxy); "Error: rectObj(): Invalid rectangle. { 'minx': 596.00 , 'miny': 85.00 , 'maxx': 745.00 , 'maxy': 50.00 }" and it is because the fifth argument "imageunits" of the rectObj function is not optional (as written in the documentation at https://mapserver.org/mapscript/mapscript-api/stub/mapscript.rectObj.html), but which is mandatory. $pixext = new rectObj($minx, $miny, $maxx, $maxy, 1); "Zoom completed successfully." Best regards. El 07/05/2024 a las 16:40, Seth G escribió: Hi Fernando, There is a test case for this at: https://github.com/MapServer/MapServer/blob/0cb56232d4ca0e64d747efa1db602ff08e0ea42f/src/mapscript/python/tests/cases/zoom_test.py#L99 This test has the MaxY < MinY. It looks like the rectObj represents an image rather than a map, and so the maxy and miny need to be reversed as in your original PHP code for SWIG MapScript too. The error message is: Exception: mapscript::mapObj::zoomRectangle(): General error message. image rectangle maxy >= miny in And is raised athttps://github.com/MapServer/MapServer/blob/0cb56232d4ca0e64d747efa1db602ff08e0ea42f/src/mapscript/swiginc/mapzoom.i#L239 There is a comment in the source code where this error is thrown (I think it applies to maxy too): /* This is not a typo: "maxx >= minx". For historical reason, we * keep this as it is. See documentation for more info about this check. */ if (poPixRect->maxy >= poPixRect->miny) { msSetError(MS_MISCERR, "image rectangle maxy >= miny", "mapscript::mapObj::zoomRectangle()"); return MS_FAILURE; } Seehttps://github.com/MapServer/MapServer/issues/3286 So you'll need to reverse the Y values below (likely as it did in the old code). The API docs should also include this note. $this->geoext0->minx -334.31761006289 $this->geoext0->miny -22 $this->geoext0->maxx 525.31761006289 $this->geoext0->maxy 342 Seth -- web:https://geographika.net &https://mapserverstudio.net twitter: @geographika On Tue, May 7, 2024, at 10:43 AM, Fernando Sánchez García via MapServer-users wrote: Dear users, my name is Fernando and I work at the University of Córdoba in Spain. I have been using mapserver for several years as a user at the University together with pmapper. Our old virtual machine has Ubuntu Server 18.04 LTS + mapserver 7.2.1 + PHP 5.6.40 + postgres/postgis with pmapper 4.3.2. and locally on my computer I have MS4W 3.2.3 with pmapper 4.3.2. Unfortunately pmapper was discontinued a few years ago and although I don't have much programming knowledge, I have started trying to make some small changes to the pmapper code to adapt it to PHP 7/8 (although I know other more up-to-date alternatives such as Openlayers). I have reached the "Zoom to rectangle" function where Armin implemented it like this: / * ZOOM FUNCTIONS / /** * Zoom to rectangle */ protected function pmap_zoomrect() { if (isset($_REQUEST["imgbox"])) { $imgbox_str = $_REQUEST["imgbox"]; //error_log($imgbox_str); if ($imgbox_str != "") { $imgbox_arr = explode(" ", $imgbox_str); // New map extent in image pixel ((0,0) top-left) $pix_minx = $imgbox_arr[0]; $pix_miny = $imgbox_arr[1]; $pix_maxx = $imgbox_arr[2]; $pix_maxy = $imgbox_arr[3]; if ($pix_minx == $pix_maxx) $pix_maxx = $pix_maxx + 3; ## increase max extent if min==max if ($pix_miny == $pix_maxy) $pix_maxy = $pix_maxy - 3; ## $pixext = ms_newrectObj(); // Modified by Thomas RAFFIN (SIRAP) // If the rectangle is not in the same proportions as the map, // To leave the coeff Y / X unghanged, we need to made $geoNewCoeff = $geo0Coeff... $geo0Coeff = $this->mapheight / $this->mapwidth; $geoNewDeltaX = $pix_maxx - $pix_minx; $geoNewDeltaY = $pix_maxy - $pix_miny; $geoNewCoeff = $geoNewDeltaY / $geoNewDeltaX; if ($geoNewCoeff < $geo0Coeff) { $newDeltaYCorrected = $geo0Coeff * $geoNewDeltaX; $newDeltaYToAdd = ($newDeltaYCorrected - $geoNewDeltaY) / 2; $pix_miny -= $newDeltaYToAdd; $pix_maxy += $newDeltaYToAdd; } else {
[MapServer-users] Reminder: Please add your site (or OGC services) to the MapServer Gallery
Hi everyone! A short reminder to please add your MapServer site or MapServer-run data services to the wiki page at https://github.com/MapServer/MapServer/wiki/MapServer-Site-Gallery Thanks for making the MapServer community a vibrant place, -jeff -- Jeff McKenna GatewayGeo: Developers of MS4W, MapServer Consulting and Training co-founder of FOSS4G http://gatewaygeo.com/ ___ MapServer-users mailing list MapServer-users@lists.osgeo.org https://lists.osgeo.org/mailman/listinfo/mapserver-users
Re: [MapServer-users] zoomRectangle error image rectangle maxy >= miny
Hi Fernando, There is a test case for this at: https://github.com/MapServer/MapServer/blob/0cb56232d4ca0e64d747efa1db602ff08e0ea42f/src/mapscript/python/tests/cases/zoom_test.py#L99 This test has the MaxY < MinY. It looks like the rectObj represents an image rather than a map, and so the maxy and miny need to be reversed as in your original PHP code for SWIG MapScript too. The error message is: > Exception: mapscript::mapObj::zoomRectangle(): General error message. > image rectangle maxy >= miny in And is raised at https://github.com/MapServer/MapServer/blob/0cb56232d4ca0e64d747efa1db602ff08e0ea42f/src/mapscript/swiginc/mapzoom.i#L239 There is a comment in the source code where this error is thrown (I think it applies to maxy too): /* This is not a typo: "maxx >= minx". For historical reason, we * keep this as it is. See documentation for more info about this check. */ if (poPixRect->maxy >= poPixRect->miny) { msSetError(MS_MISCERR, "image rectangle maxy >= miny", "mapscript::mapObj::zoomRectangle()"); return MS_FAILURE; } See https://github.com/MapServer/MapServer/issues/3286 So you'll need to reverse the Y values below (likely as it did in the old code). The API docs should also include this note. > $this->geoext0->minx -334.31761006289 > $this->geoext0->miny -22 > $this->geoext0->maxx 525.31761006289 > $this->geoext0->maxy 342 Seth -- web:https://geographika.net & https://mapserverstudio.net twitter: @geographika On Tue, May 7, 2024, at 10:43 AM, Fernando Sánchez García via MapServer-users wrote: > Dear users, my name is Fernando and I work at the University of Córdoba > in Spain. I have been using mapserver for several years as a user at the > University together with pmapper. Our old virtual machine has Ubuntu > Server 18.04 LTS + mapserver 7.2.1 + PHP 5.6.40 + postgres/postgis with > pmapper 4.3.2. and locally on my computer I have MS4W 3.2.3 with pmapper > 4.3.2. Unfortunately pmapper was discontinued a few years ago and > although I don't have much programming knowledge, I have started trying > to make some small changes to the pmapper code to adapt it to PHP 7/8 > (although I know other more up-to-date alternatives such as Openlayers). > I have reached the "Zoom to rectangle" function where Armin implemented > it like this: > > > / > * ZOOM FUNCTIONS > / > /** > * Zoom to rectangle > */ > protected function pmap_zoomrect() > { > if (isset($_REQUEST["imgbox"])) { > $imgbox_str = $_REQUEST["imgbox"]; > //error_log($imgbox_str); > if ($imgbox_str != "") { > $imgbox_arr = explode(" ", $imgbox_str); > // New map extent in image pixel ((0,0) top-left) > $pix_minx = $imgbox_arr[0]; > $pix_miny = $imgbox_arr[1]; > $pix_maxx = $imgbox_arr[2]; > $pix_maxy = $imgbox_arr[3]; > > if ($pix_minx == $pix_maxx) $pix_maxx = $pix_maxx + 3; > ## increase max extent if min==max > if ($pix_miny == $pix_maxy) $pix_maxy = $pix_maxy - 3; ## > > $pixext = ms_newrectObj(); > > // Modified by Thomas RAFFIN (SIRAP) > // If the rectangle is not in the same proportions as > the map, > // To leave the coeff Y / X unghanged, we need to made > $geoNewCoeff = $geo0Coeff... > $geo0Coeff = $this->mapheight / $this->mapwidth; > $geoNewDeltaX = $pix_maxx - $pix_minx; > $geoNewDeltaY = $pix_maxy - $pix_miny; > $geoNewCoeff = $geoNewDeltaY / $geoNewDeltaX; > if ($geoNewCoeff < $geo0Coeff) { > $newDeltaYCorrected = $geo0Coeff * $geoNewDeltaX; > $newDeltaYToAdd = ($newDeltaYCorrected - > $geoNewDeltaY) / 2; > $pix_miny -= $newDeltaYToAdd; > $pix_maxy += $newDeltaYToAdd; > } else { > $newDeltaXCorrected = $geoNewDeltaY / $geo0Coeff; > $newDeltaXToAdd = ($newDeltaXCorrected - > $geoNewDeltaX) / 2; > $pix_minx -= $newDeltaXToAdd; > $pix_maxx += $newDeltaXToAdd; > } > > $pixext->setExtent($pix_minx,$pix_miny,$pix_maxx,$pix_maxy); > } > > // Zoom to full extent when starting > } else { >
Re: [MapServer-users] WMS GetFeatureInfo default FEATURE COUNT
Thanks Seth and Jukka for the responses. For the WMS in question to function as intended, the FEATURECOUNT needs to set to greater than 1, so I'll try a rewrite as Seth suggests. Andy On 03/05/2024 14:56, Seth G wrote: [You don't often get email from se...@geographika.co.uk. Learn why this is important at https://aka.ms/LearnAboutSenderIdentification ] CAUTION: This e-mail originated outside the University of Southampton. Hi Andrew, It looks like this is hard-coded to be set to 1 if missing (there is a comment that it is up to the server what to do if FEATURECOUNT is not provided). You could handle this at the web server level with a URL rewrite to add FEATURECOUNT to any GetFeatureInfo request where it is missing. Seth -- web:https://geographika.net & https://mapserverstudio.net twitter: @geographika On Fri, May 3, 2024, at 3:43 PM, Andrew Harfoot via MapServer-users wrote: Hi list, In a WMS GetFeatureInfo request, if the client does not include the FEATURECOUNT parameter then MapServer appears to default to FEATURECOUNT=1. Is there any way to override this default in the server configuration? Thanks, Andy ___ MapServer-users mailing list MapServer-users@lists.osgeo.org https://lists.osgeo.org/mailman/listinfo/mapserver-users -- Andy Harfoot Skype: gdi_ajph Teams: a...@soton.ac.uk Phone: +44 2380 590566 GeoData Institute University of Southampton Southampton SO17 1BJ www.geodata.soton.ac.uk ___ MapServer-users mailing list MapServer-users@lists.osgeo.org https://lists.osgeo.org/mailman/listinfo/mapserver-users
[MapServer-users] zoomRectangle error image rectangle maxy >= miny
Dear users, my name is Fernando and I work at the University of Córdoba in Spain. I have been using mapserver for several years as a user at the University together with pmapper. Our old virtual machine has Ubuntu Server 18.04 LTS + mapserver 7.2.1 + PHP 5.6.40 + postgres/postgis with pmapper 4.3.2. and locally on my computer I have MS4W 3.2.3 with pmapper 4.3.2. Unfortunately pmapper was discontinued a few years ago and although I don't have much programming knowledge, I have started trying to make some small changes to the pmapper code to adapt it to PHP 7/8 (although I know other more up-to-date alternatives such as Openlayers). I have reached the "Zoom to rectangle" function where Armin implemented it like this: / * ZOOM FUNCTIONS / /** * Zoom to rectangle */ protected function pmap_zoomrect() { if (isset($_REQUEST["imgbox"])) { $imgbox_str = $_REQUEST["imgbox"]; //error_log($imgbox_str); if ($imgbox_str != "") { $imgbox_arr = explode(" ", $imgbox_str); // New map extent in image pixel ((0,0) top-left) $pix_minx = $imgbox_arr[0]; $pix_miny = $imgbox_arr[1]; $pix_maxx = $imgbox_arr[2]; $pix_maxy = $imgbox_arr[3]; if ($pix_minx == $pix_maxx) $pix_maxx = $pix_maxx + 3; ## increase max extent if min==max if ($pix_miny == $pix_maxy) $pix_maxy = $pix_maxy - 3; ## $pixext = ms_newrectObj(); // Modified by Thomas RAFFIN (SIRAP) // If the rectangle is not in the same proportions as the map, // To leave the coeff Y / X unghanged, we need to made $geoNewCoeff = $geo0Coeff... $geo0Coeff = $this->mapheight / $this->mapwidth; $geoNewDeltaX = $pix_maxx - $pix_minx; $geoNewDeltaY = $pix_maxy - $pix_miny; $geoNewCoeff = $geoNewDeltaY / $geoNewDeltaX; if ($geoNewCoeff < $geo0Coeff) { $newDeltaYCorrected = $geo0Coeff * $geoNewDeltaX; $newDeltaYToAdd = ($newDeltaYCorrected - $geoNewDeltaY) / 2; $pix_miny -= $newDeltaYToAdd; $pix_maxy += $newDeltaYToAdd; } else { $newDeltaXCorrected = $geoNewDeltaY / $geo0Coeff; $newDeltaXToAdd = ($newDeltaXCorrected - $geoNewDeltaX) / 2; $pix_minx -= $newDeltaXToAdd; $pix_maxx += $newDeltaXToAdd; } $pixext->setExtent($pix_minx,$pix_miny,$pix_maxx,$pix_maxy); } // Zoom to full extent when starting } else { $pixext = ms_newrectObj(); $pixext->setExtent(0, 0, $this->mapwidth, $this->mapheight); } $this->map->zoomrectangle($pixext, $this->mapwidth, $this->mapheight, $this->geoext0); PMCommon::freeMsObj($pixext); } In this function Mapscript zoomrectangle is called, which according to the old PHP Mapscript documentation (https://mapserver.org/mapscript/php/index-5.6.html#mapobj) is like this: void zoomrectangle(rectObj oPixelExt, int nImageWidth, int nImageHeight, rectObj oGeorefExt) Set the map extents to a given extents. Parameters are : oPixelExt (rect object) : Pixel Extents, with (0,0) at the top-left The rectangle contains the coordinates of the LL and UR coordinates in pixel. (the maxy in the rect object should be < miny value) --- UR (values in the rect object : maxx, maxy) | | | | | | -- LL (values in the rectobject minx, miny) Width : width in pixel of the current image. Height : Height in pixel of the current image. Georef extent (rectObj) : current georef extents. The pmapper log file shows me the following values when I zoom without any problem and the result is satisfactory, that is, it zooms in on my map correctly: P.MAPPER debug info en la función pmap_zoomrect de map.php $pix_minx 551.97186827847 $pix_miny 86.08332824707031 $pix_maxx 632.19478821567 $pix_maxy 120.08332824707031 $this->geoext0->minx -334.31761006289 $this->geoext0->miny -22 $this->geoext0->maxx 525.31761006289 $this->geoext0->maxy 342 My .map file has the following EXTENT -37 -22 228 334 and "wms_srs" "epsg:3857". I have updated to MS4W 4.0.4 which has MapServer and MapScript 7.7.0-dev, PHP to 7.2.31 and SWIG support. According to the current SWIG MapScript API Reference: mapscript.mapObj class mapscript.mapObj(*args) Methods: zoomRectangle(poPixRect: rectObj, width
Re: [MapServer-users] WMS GetFeatureInfo default FEATURE COUNT
Hi, In the WMS standard the FeatureCount parameter is defined to be optional, and the default is one. "Number of features about which to return information (default=1)" What you ask would be against the standard. -Jukka Rahkonen- -Alkuperäinen viesti- Lähettäjä: MapServer-users Puolesta Andrew Harfoot via MapServer-users Lähetetty: perjantai 3. toukokuuta 2024 16.43 Vastaanottaja: mapserver-users@lists.osgeo.org Aihe: [MapServer-users] WMS GetFeatureInfo default FEATURE COUNT Hi list, In a WMS GetFeatureInfo request, if the client does not include the FEATURECOUNT parameter then MapServer appears to default to FEATURECOUNT=1. Is there any way to override this default in the server configuration? Thanks, Andy ___ MapServer-users mailing list MapServer-users@lists.osgeo.org https://lists.osgeo.org/mailman/listinfo/mapserver-users ___ MapServer-users mailing list MapServer-users@lists.osgeo.org https://lists.osgeo.org/mailman/listinfo/mapserver-users
Re: [MapServer-users] WMS GetFeatureInfo default FEATURE COUNT
Hi Andrew, It looks like this is hard-coded to be set to 1 if missing (there is a comment that it is up to the server what to do if FEATURECOUNT is not provided). You could handle this at the web server level with a URL rewrite to add FEATURECOUNT to any GetFeatureInfo request where it is missing. Seth -- web:https://geographika.net & https://mapserverstudio.net twitter: @geographika On Fri, May 3, 2024, at 3:43 PM, Andrew Harfoot via MapServer-users wrote: > Hi list, > > In a WMS GetFeatureInfo request, if the client does not include the > FEATURECOUNT parameter then MapServer appears to default to > FEATURECOUNT=1. Is there any way to override this default in the server > configuration? > > Thanks, > > Andy > > > _______ > MapServer-users mailing list > MapServer-users@lists.osgeo.org > https://lists.osgeo.org/mailman/listinfo/mapserver-users ___ MapServer-users mailing list MapServer-users@lists.osgeo.org https://lists.osgeo.org/mailman/listinfo/mapserver-users
[MapServer-users] WMS GetFeatureInfo default FEATURE COUNT
Hi list, In a WMS GetFeatureInfo request, if the client does not include the FEATURECOUNT parameter then MapServer appears to default to FEATURECOUNT=1. Is there any way to override this default in the server configuration? Thanks, Andy ___ MapServer-users mailing list MapServer-users@lists.osgeo.org https://lists.osgeo.org/mailman/listinfo/mapserver-users
Re: [MapServer-users] Data from MSSQL without extent
Hi, You are probably looking for *wfs_use_default_extent_for_getfeature* (and setting to "false" in the LAYER METADATA) - see https://mapserver.org/ogc/wfs_server.html#layer-object I ran into this myself as described in https://github.com/MapServer/MapServer/issues/5994 Seth -- web:https://geographika.net & https://mapserverstudio.net twitter: @geographika On Thu, Apr 25, 2024, at 5:55 PM, Benedek Petrovicz via MapServer-users wrote: > Hi! > > Is there a possibility to skip filtering for the extent when pulling in data > from MSSQL? > I have to deal with some layers where I'd like to load everything for a > certain criteria, but don't need the extent filtering. > > Thank you > Petrovicz > _______ > MapServer-users mailing list > MapServer-users@lists.osgeo.org > https://lists.osgeo.org/mailman/listinfo/mapserver-users > ___ MapServer-users mailing list MapServer-users@lists.osgeo.org https://lists.osgeo.org/mailman/listinfo/mapserver-users
[MapServer-users] Data from MSSQL without extent
Hi! Is there a possibility to skip filtering for the extent when pulling in data from MSSQL? I have to deal with some layers where I'd like to load everything for a certain criteria, but don't need the extent filtering. Thank you Petrovicz ___ MapServer-users mailing list MapServer-users@lists.osgeo.org https://lists.osgeo.org/mailman/listinfo/mapserver-users
Re: [MapServer-users] Mapserver and Libxml2 (2.12.6)
Hi, this has been fixed in master and 8.0 branch, but has not hit yet a release The patch for 8.0 branch is in https://github.com/MapServer/MapServer/pull/6975 Even Le 22/04/2024 à 15:06, gorouter via MapServer-users a écrit : Hi I am building mapserver 8.0.1 and libxml2 (2.12.6). I am getting error C2440 in mapwcs.cpp L365 and mapwcs20.cpp L1449. I have modified those lines: `xmlErrorPtr error = xmlGetLastError();` to `xmlErrorPtr error = (xmlErrorPtr)xmlGetLastError();` to compile. I don't know the deep implications of all this if there are any. Error C2440 does not occur in my case if I use libxml2 (2.10.3). ___ MapServer-users mailing list MapServer-users@lists.osgeo.org https://lists.osgeo.org/mailman/listinfo/mapserver-users -- http://www.spatialys.com My software is free, but my time generally not. ___ MapServer-users mailing list MapServer-users@lists.osgeo.org https://lists.osgeo.org/mailman/listinfo/mapserver-users
[MapServer-users] Mapserver and Libxml2 (2.12.6)
Hi I am building mapserver 8.0.1 and libxml2 (2.12.6). I am getting error C2440 in mapwcs.cpp L365 and mapwcs20.cpp L1449. I have modified those lines: `xmlErrorPtr error = xmlGetLastError();` to `xmlErrorPtr error = (xmlErrorPtr)xmlGetLastError();` to compile. I don't know the deep implications of all this if there are any. Error C2440 does not occur in my case if I use libxml2 (2.10.3).___ MapServer-users mailing list MapServer-users@lists.osgeo.org https://lists.osgeo.org/mailman/listinfo/mapserver-users
Re: [MapServer-users] Mapserver 7.6.5 which Proj version?
And on the image camptocamp/mapserver:7.6-gdal3.8 I build MapServer with Proj 8.2 CU Stéphane Le ven. 19 avr. 2024 à 08:56, Stéphane Brunner < stephane.brun...@camptocamp.com> a écrit : > Hello, > > Yes on the Docker images: > camptocamp/mapserver:7.6 or camptocamp/mapserver:7.6-gdal3.8 (just alias) > I build MapServer with Proj 9.3 > > CU > Stéphane > > > Le jeu. 18 avr. 2024 à 16:43, PE Lord via MapServer-users < > mapserver-users@lists.osgeo.org> a écrit : > >> I am compiling Mapserver 7.6.5 to include Oracle and SQLServer support. >> >> Does anyone has already compiled Mapserver 7.6.5 with : >> >>- Proj 7.x >>- Proj 8.x >> - Proj 9.x >> >> >> Pierre >> ___ >> MapServer-users mailing list >> MapServer-users@lists.osgeo.org >> https://lists.osgeo.org/mailman/listinfo/mapserver-users >> > > > -- > > *Stéphane Brunner* > Geospatial Solutions > Software Architect > > *camptocamp* > INNOVATIVE SOLUTIONS > BY OPEN SOURCE EXPERTS > > camptocamp.com > mapfish.org > -- *Stéphane Brunner* Geospatial Solutions Software Architect *camptocamp* INNOVATIVE SOLUTIONS BY OPEN SOURCE EXPERTS camptocamp.com mapfish.org ___ MapServer-users mailing list MapServer-users@lists.osgeo.org https://lists.osgeo.org/mailman/listinfo/mapserver-users
Re: [MapServer-users] Mapserver 7.6.5 which Proj version?
Hello, Yes on the Docker images: camptocamp/mapserver:7.6 or camptocamp/mapserver:7.6-gdal3.8 (just alias) I build MapServer with Proj 9.3 CU Stéphane Le jeu. 18 avr. 2024 à 16:43, PE Lord via MapServer-users < mapserver-users@lists.osgeo.org> a écrit : > I am compiling Mapserver 7.6.5 to include Oracle and SQLServer support. > > Does anyone has already compiled Mapserver 7.6.5 with : > >- Proj 7.x >- Proj 8.x >- Proj 9.x > > > Pierre > _______ > MapServer-users mailing list > MapServer-users@lists.osgeo.org > https://lists.osgeo.org/mailman/listinfo/mapserver-users > -- *Stéphane Brunner* Geospatial Solutions Software Architect *camptocamp* INNOVATIVE SOLUTIONS BY OPEN SOURCE EXPERTS camptocamp.com mapfish.org ___ MapServer-users mailing list MapServer-users@lists.osgeo.org https://lists.osgeo.org/mailman/listinfo/mapserver-users
[MapServer-users] Mapserver 7.6.5 which Proj version?
I am compiling Mapserver 7.6.5 to include Oracle and SQLServer support. Does anyone has already compiled Mapserver 7.6.5 with : - Proj 7.x - Proj 8.x - Proj 9.x Pierre___ MapServer-users mailing list MapServer-users@lists.osgeo.org https://lists.osgeo.org/mailman/listinfo/mapserver-users
[MapServer-users] demo.mapserver.org Services Upgraded
Hi all! A short update that all of the MapServer services (OGC services, MapCache, MapServer, etc.) have been upgraded on the demo server: https://demo.mapserver.org Wishing everyone a productive week, -jeff -- Jeff McKenna GatewayGeo: Developers of MS4W, & offering MapServer Consulting/Dev co-founder of FOSS4G http://gatewaygeo.com/ ___ MapServer-users mailing list MapServer-users@lists.osgeo.org https://lists.osgeo.org/mailman/listinfo/mapserver-users
[MapServer-users] Cannot retrieve column list - what does that mean?
Hello, what does that error message mean „ msOracleSpatialLayerGetItems(): Query error. Cannot retrieve column list“? Thanks Best regards Gerhard Von meinem iPad gesendet___ MapServer-users mailing list MapServer-users@lists.osgeo.org https://lists.osgeo.org/mailman/listinfo/mapserver-users
[MapServer-users] [ANNOUNCEMENT] OSGeo Twin Cities Local Chapter Monthly Meeting (aka TCMUG)
All, Light attendance last month. That leaves room for more to show up this month. This month’s meeting will be at the https://www.grovelandtap.com/ Date: Apr 10th 4:30 – 6:00 Place: Groveland Tap<https://maps.app.goo.gl/rmhqcHikMtBV125cA> in Saint Paul, on St. Clair Ave. @ Fairview Ave. See you there. Bobb Our meetings are intended as a monthly get together for all those interested in the field of GIS. We meet generally on the second Wednesday of each month. Get me in Teams<https://teams.microsoft.com/l/chat/0/0?users=bob.basq...@ci.stpaul.mn.us> PW19-S295-C024 ___ MapServer-users mailing list MapServer-users@lists.osgeo.org https://lists.osgeo.org/mailman/listinfo/mapserver-users
Re: [MapServer-users] From OpenLayers to Mapfile
Hi, See https://mapserver.org/cgi/runsub.html#basic-example. -Jukka Rahkonen- Lähettäjä: MapServer-users Puolesta gorouter via MapServer-users Lähetetty: torstai 4. huhtikuuta 2024 1.57 Vastaanottaja: mapserver-users@lists.osgeo.org Aihe: [MapServer-users] From OpenLayers to Mapfile Hi. Is it possible that, for example, the year is chosen by a user from the wms client and this value is used to generate the SQL query in the mapfile? I am not sure if this is possible from openlayers and also if it is necessary to create a wms server with mapscript to capture parameters and regenerate the query in the DATA field. ___ MapServer-users mailing list MapServer-users@lists.osgeo.org https://lists.osgeo.org/mailman/listinfo/mapserver-users
[MapServer-users] From OpenLayers to Mapfile
Hi. Is it possible that, for example, the year is chosen by a user from the wms client and this value is used to generate the SQL query in the mapfile? I am not sure if this is possible from openlayers and also if it is necessary to create a wms server with mapscript to capture parameters and regenerate the query in the DATA field.___ MapServer-users mailing list MapServer-users@lists.osgeo.org https://lists.osgeo.org/mailman/listinfo/mapserver-users
[MapServer-users] Publishing PostGIS-Rasters using mapserver
Hey Guys, I am trying to publish my data that is stored as 4-band rasters in a PostGIS-DB using mapserver. However it is super slow and the data is simply wrong. I added my data directly to the map from the DB and added the mapserverWMS and mapserver returns really bad results. Here is my Layerdefinition, table is a partition of one big table that i try to publish. |LAYER NAME sentinel_2rgb TYPE raster STATUS ON VALIDATION "table" "s2_20[0-9][0-9]_[0-9][0-9]_[0-9][0-9]" END DATA "PG:host=host port=5432 dbname=dbname user=user password=pw table=%table% column=rast mode=2" PROCESSING "SCALE=AUTO" PROCESSING "BANDS=3,2,1" METADATA wms_title "sentinel_2rgb" wms_abstract "abs" wms_srs "EPSG:25832" wms_extend "-1877994.66 3932281.56 836715.13 9440581.95" # https://epsg.io/25832 projected bounds END END Any help would be appreciated, Felix PS: I sent this mail before from the wrong mailadress, I do not know if everyone gets it twice now. If so: Sorry! | ___ MapServer-users mailing list MapServer-users@lists.osgeo.org https://lists.osgeo.org/mailman/listinfo/mapserver-users
Re: [MapServer-users] setting COLOR of SVG symbol ?
Thanks, looks like it. In QGIS setting color and opacity plus stroke does only work if the *.svg is edited to allow by setting variables such as these below: style="fill:param(fill) #00;fill-opacity:1;stroke:param(outline) #00;stroke-width:param(stroke-width) 1;fill-opacity:param(fill-opacity) 1;stroke-opacity:param(outline-opacity) " I guess a simple approach could be to allow setting colors for svgs in MapServer if the svg has the style color set to fill="currentColor" in order to be styled For now seems that MapServer vector symbols seem to be the way to go Cheers Karsten _ From: Seth G [mailto:se...@geographika.co.uk] Sent: Thursday, March 28, 2024 00:06 To: karsten; MapServer Users Subject: Re: [MapServer-users] setting COLOR of SVG symbol ? Hi, Unfortunately, I don't think this is currently possible, based on a previous reply from Steve Lime [1]: > I don't believe you can muck with the SVG color since SVG can carry multiple elements and colors. That complexity doesn't map very well to a single color value in a styleObj. It's probably best to consider SVG as immutable, same as an image symbol. You can use truetype fonts (or vector symbols) if you want something scaleable where you can alter color. I guess if it works in QGIS then it should be possible to implement this in the MapServer codebase too. Seth [1] https://lists.osgeo.org/pipermail/mapserver-users/2019-June/081218.html -- web:https://geographika.net & https://mapserverstudio.net twitter: @geographika On Wed, Mar 27, 2024, at 10:45 PM, karsten via MapServer-users wrote: Hi All, for the first time trying to use svg symbols for a layer. The svgs I am using can be styled in QGIS (have edited to allow). What is the status in MapServer should setting the color via a style work ? I had no luck setting the COLOR on the symbol so far Here is my style STYLE SYMBOL "electric_point" SIZE 20 COLOR 255 0 0 END # STYLE symbol SYMBOL NAME 'electric_point' TYPE svg image 'symbols/annotation/electric.svg' END So far this renders black symbols , any ideas how to fix this ? Cheers Karsten Karsten Vennemann <http://www.terragis.net> www.terragis.net _______ MapServer-users mailing list MapServer-users@lists.osgeo.org https://lists.osgeo.org/mailman/listinfo/mapserver-users ___ MapServer-users mailing list MapServer-users@lists.osgeo.org https://lists.osgeo.org/mailman/listinfo/mapserver-users
Re: [MapServer-users] 'application/json' is not a permitted output format for layer
I will test and will tell you. I was pretty sure to check such metadata before :) Thanks for your quick reply Mathias. Y. Le jeu. 28 mars 2024 à 09:40, mathias cunault a écrit : > Hello, > With your OUTPUTFORMAT configuration, if you want to use application/json > in the URL of the WFS, verify that the wfs_getfeature_formatlist METADATA > of your layer contains application/json. > It is my configuration and it works fine. I hope it helps. > > > Le jeu. 28 mars 2024 à 09:00, Yves Jacolin via MapServer-users < > mapserver-users@lists.osgeo.org> a écrit : > >> Hello, >> >> I have a mapserver WFS service running for some time without any issue. >> We upgraded to 7.6.5 and now a WFS request >> with OUTPUTFORMAT=application/json; subtype=geojson; charset=utf-8 failed >> with this message: msWFSGetFeature(): WFS server error. 'application/json' >> is not a permitted output format for layer 'X', review >> wfs_getfeature_formatlist setting. >> >> The mapfile looks like: >> >> OUTPUTFORMAT >> NAME "geojson" >> DRIVER "OGR/GEOJSON" >> MIMETYPE "application/json; subtype=geojson; charset=utf-8" >> FORMATOPTION "STORAGE=stream" >> FORMATOPTION "FORM=SIMPLE" >> EN >> >> If I use outputformat=geojson it works. Is it normal? Do you think that >> Ican change the outputformat name to "application/json; subtype=geojson; >> charset=utf-8" >> >> Thanks, >> >> Y. >> -- >> [image: This is Yves Jacolin's card. Their email is >> yves.jaco...@camptocamp.com. Their phone number is +33 6 18 75 42 21. Their >> phone number is +33 4 58 48 20 43. Their phone number is +41 21 619 10 43.] >> <https://hihello.me/p/c7a536d1-5177-4817-8924-ebb067e58d4f> >> ___ >> MapServer-users mailing list >> MapServer-users@lists.osgeo.org >> https://lists.osgeo.org/mailman/listinfo/mapserver-users >> > -- [image: This is Yves Jacolin's card. Their email is yves.jaco...@camptocamp.com. Their phone number is +33 6 18 75 42 21. Their phone number is +33 4 58 48 20 43. Their phone number is +41 21 619 10 43.] <https://hihello.me/p/c7a536d1-5177-4817-8924-ebb067e58d4f> ___ MapServer-users mailing list MapServer-users@lists.osgeo.org https://lists.osgeo.org/mailman/listinfo/mapserver-users
Re: [MapServer-users] 'application/json' is not a permitted output format for layer
Hello, With your OUTPUTFORMAT configuration, if you want to use application/json in the URL of the WFS, verify that the wfs_getfeature_formatlist METADATA of your layer contains application/json. It is my configuration and it works fine. I hope it helps. Le jeu. 28 mars 2024 à 09:00, Yves Jacolin via MapServer-users < mapserver-users@lists.osgeo.org> a écrit : > Hello, > > I have a mapserver WFS service running for some time without any issue. We > upgraded to 7.6.5 and now a WFS request with OUTPUTFORMAT=application/json; > subtype=geojson; charset=utf-8 failed with this message: msWFSGetFeature(): > WFS server error. 'application/json' is not a permitted output format for > layer 'X', review wfs_getfeature_formatlist setting. > > The mapfile looks like: > > OUTPUTFORMAT > NAME "geojson" > DRIVER "OGR/GEOJSON" > MIMETYPE "application/json; subtype=geojson; charset=utf-8" > FORMATOPTION "STORAGE=stream" > FORMATOPTION "FORM=SIMPLE" > EN > > If I use outputformat=geojson it works. Is it normal? Do you think that > Ican change the outputformat name to "application/json; subtype=geojson; > charset=utf-8" > > Thanks, > > Y. > -- > [image: This is Yves Jacolin's card. Their email is > yves.jaco...@camptocamp.com. Their phone number is +33 6 18 75 42 21. Their > phone number is +33 4 58 48 20 43. Their phone number is +41 21 619 10 43.] > <https://hihello.me/p/c7a536d1-5177-4817-8924-ebb067e58d4f> > ___ > MapServer-users mailing list > MapServer-users@lists.osgeo.org > https://lists.osgeo.org/mailman/listinfo/mapserver-users > ___ MapServer-users mailing list MapServer-users@lists.osgeo.org https://lists.osgeo.org/mailman/listinfo/mapserver-users
[MapServer-users] 'application/json' is not a permitted output format for layer
Hello, I have a mapserver WFS service running for some time without any issue. We upgraded to 7.6.5 and now a WFS request with OUTPUTFORMAT=application/json; subtype=geojson; charset=utf-8 failed with this message: msWFSGetFeature(): WFS server error. 'application/json' is not a permitted output format for layer 'X', review wfs_getfeature_formatlist setting. The mapfile looks like: OUTPUTFORMAT NAME "geojson" DRIVER "OGR/GEOJSON" MIMETYPE "application/json; subtype=geojson; charset=utf-8" FORMATOPTION "STORAGE=stream" FORMATOPTION "FORM=SIMPLE" EN If I use outputformat=geojson it works. Is it normal? Do you think that Ican change the outputformat name to "application/json; subtype=geojson; charset=utf-8" Thanks, Y. -- [image: This is Yves Jacolin's card. Their email is yves.jaco...@camptocamp.com. Their phone number is +33 6 18 75 42 21. Their phone number is +33 4 58 48 20 43. Their phone number is +41 21 619 10 43.] <https://hihello.me/p/c7a536d1-5177-4817-8924-ebb067e58d4f> _______ MapServer-users mailing list MapServer-users@lists.osgeo.org https://lists.osgeo.org/mailman/listinfo/mapserver-users
Re: [MapServer-users] setting COLOR of SVG symbol ?
Hi, Unfortunately, I don't think this is currently possible, based on a previous reply from Steve Lime [1]: > I don't believe you can muck with the SVG color since SVG can carry multiple > elements and colors. That complexity doesn't map very well to a single color > value in a styleObj. It's probably best to consider SVG as immutable, same as > an image symbol. You can use truetype fonts (or vector symbols) if you want > something scaleable where you can alter color. I guess if it works in QGIS then it should be possible to implement this in the MapServer codebase too. Seth [1] https://lists.osgeo.org/pipermail/mapserver-users/2019-June/081218.html -- web:https://geographika.net & https://mapserverstudio.net twitter: @geographika On Wed, Mar 27, 2024, at 10:45 PM, karsten via MapServer-users wrote: > Hi All, > > for the first time trying to use svg symbols for a layer. The svgs I am using > can be styled in QGIS (have edited to allow). > What is the status in MapServer should setting the color via a style work ? > > I had no luck setting the COLOR on the symbol so far > > Here is my style > > STYLE >SYMBOL "electric_point" >SIZE 20 >COLOR 255 0 0 > END # STYLE > > symbol > > SYMBOL > NAME 'electric_point' > TYPE svg > image 'symbols/annotation/electric.svg' > END > > So far this renders black symbols , any ideas how to fix this ? > > Cheers > Karsten > > Karsten Vennemann > www.terragis.net > > ___ > MapServer-users mailing list > MapServer-users@lists.osgeo.org > https://lists.osgeo.org/mailman/listinfo/mapserver-users > ___ MapServer-users mailing list MapServer-users@lists.osgeo.org https://lists.osgeo.org/mailman/listinfo/mapserver-users
[MapServer-users] setting COLOR of SVG symbol ?
Hi All, for the first time trying to use svg symbols for a layer. The svgs I am using can be styled in QGIS (have edited to allow). What is the status in MapServer should setting the color via a style work ? I had no luck setting the COLOR on the symbol so far Here is my style STYLE SYMBOL "electric_point" SIZE 20 COLOR 255 0 0 END # STYLE symbol SYMBOL NAME 'electric_point' TYPE svg image 'symbols/annotation/electric.svg' END So far this renders black symbols , any ideas how to fix this ? Cheers Karsten Karsten Vennemann <http://www.terragis.net> www.terragis.net ___ MapServer-users mailing list MapServer-users@lists.osgeo.org https://lists.osgeo.org/mailman/listinfo/mapserver-users
[MapServer-users] Mapcache - postgresql dimensions causing HUGE number of open db connections
Mapcache folks, This is a technical question about the Mapcache connection pool and how postgreql dimensions are implemented. I have a big mapcache WMS with several hundred layers defined. Most of them have a postgresql dimension that reports back a list of available timestamps for these layers. When we are under load, I end up with a couple thousand database connections all coming from Mapcache. They're only lightweight dimension queries... it's just a LOT of connections hanging open. I'm looking for the upper bound on the number of these connections. Looking at the Mapcache source code... I see a hard coded max_list_size = 10 in connection_pool.c. I assume that means any one mapcache process/thread is allowed to keep up to ten network connections open at one time. dimension_pg.c seems to get its connections from this pool. Other connections use this pool though, right? Like the source URLs? So if I have Mapcache running as an Apache module, and if Apache can launch up to 256 threads... I could be on the hook for up to 2560 connections sitting open (until the threads die off / time out.) Is my understanding correct? It also looks like dimension_pg uses prepared statements on the db server. That would probably break a connection pooler like PgBouncer. So my options for managing the number of postgresql connections are: 1. Setting an obscene max_connections limit in postgresql.conf, allowing my mapcache role to consume a lot of them. 2. Reducing the number of Apache threads in mpm_event (At the risk of impacting general Apache performance) 3. Using the fastcgi version of Mapcache, and limiting the number of mapcache fcgi processes 4. Reducing max_list_size in connection_pool.c, which might impact performance. Am I on the right track here? -Tim ___ MapServer-users mailing list MapServer-users@lists.osgeo.org https://lists.osgeo.org/mailman/listinfo/mapserver-users
Re: [MapServer-users] WFS, OpenLayers and OUTPUTFORMAT explanations
Thanks, After some tests and internet searchs, as soon as NAME is set to geojson, I can use either # MIMETYPE "application/json;subtype=geojson" or MIMETYPE "geojson" or MIMETYPE "application/geo+json". The thing to avoid is NAME application/json. Cordialement, *--* *Mathias Cunault* *référent SIG / Admin Caviar* *Inrap Tours - 148 av. Maginot37000 TOURS06 32 05 98 96* abonnez-vous à la lettre d'information de l'Inrap : http://ww <http://www.inrap.fr/newsletter.php>w.inrap.fr/newsletter.php <http://www.inrap.fr/newsletter.php> Le mer. 20 mars 2024 à 22:50, Seth G a écrit : > Hi, > > Probably best to check the WFS service GetCapabilities document to check > which formats are supported. > (From memory) wfs_getfeature_formatlist can include either the NAME or the > MIMETYPE of the OUTPUTFORMAT. > You have MIMETYPE set to "application/json;subtype=geojson", so maybe try > chaging this to "application/json" or changing the NAME from "geojson" to > ""application/json" to get an exact match. > > Seth > > -- > web:https://geographika.net & https://mapserverstudio.net > twitter: @geographika > > On Tue, Mar 19, 2024, at 11:26 AM, mathias cunault via MapServer-users > wrote: > > Hello, > Something that was never clear to me. > Here is a mapfile for a WFS definition: > MAP > NAME "Mapserver-Inrap" > FONTSET "C:\ms4w\Apache\site\fonts\fonts.txt" > OUTPUTFORMAT > NAME "geojson" > DRIVER "OGR/GEOJSON" > MIMETYPE "application/json;subtype=geojson" #option > # FORMATOPTION "STORAGE=stream" #requis > # FORMATOPTION "FORM=SIMPLE" > FORMATOPTION "STORAGE=memory" #requis > FORMATOPTION "FORM=SIMPLE" > END #fin format > > EXTENT 103362.94 6049964.789658545 1242388.01001 7108973.60237487 > #xmin ymin xmax ymax > 51.07538310654 #xmin ymin xmax ymax > UNITS METERS > DEBUG 5 > CONFIG "CPL_DEBUG" "ON" > CONFIG "PROJ_DEBUG" "ON" > CONFIG MS_ERRORFILE > "C:/ms4w/Apache/error/errorMapFile_vue_ol_prescription.txt" > > SYMBOLSET "C:\ms4w\Apache\site\symbols\symbols.sym" > > PROJECTION # proj de sortie > "init=epsg:2154" > END > > WEB > METADATA > "wfs_title" "WFS Caviar" > "wfs_onlineresource" " > http:///mapserv.exe?MAP=C:/ms4w/Apache/site/mapfile/vue_ol_prescription.map > " > "wms_encoding" "UTF-8" > "wfs_srs" "EPSG:2154 EPSG:32620 EPSG:3857 EPSG:900913 EPSG:4326" > "wfs_enable_request" "*" > "wfs_abstract" "blabla" > "wfs_getfeature_formatlist" "application/json, GeoJSON, json" > END #fin metadata > END #end web > > #-debut prescription > LAYER > NAME "prescription" > TYPE POLYGON > CONNECTIONTYPE POSTGIS > CONNECTION "host=xxx dbname=activite user=wxxx password=xxx port=5432" > DATA "geom from activite.vue_ol_prescription using unique gid using > SRID=2154" > EXTENT 103362.94 6049964.789658545 1242388.01001 7108973.60237487 > #aide pour performance > PROCESSING "CLOSE_CONNECTION=DEFER" > CLASS > ... > END #-fin classe unique > METADATA > "gml_include_items" "all" #obligé pour afficher attributs getfeatureinfo > "wfs_title" "prescription_2154" > #d'après la doc pas besoin si défini dans les metadata de la map cf.10.1 > #"wfs_srs" "EPSG:2154" > "gml_featureid" "gid" > "wfs_enable_request" "*" > "wfs_use_default_extent_for_getfeature" "false" > # si geojson en premier alors geoson dans l'url pour OpenLayers: > "wfs_getfeature_formatlist" "GeoJSON, json, application/json" > END #fin metadata prescription > TEMPLATE "bidon.html" > END #fin layer prescription > > END #-fin mapfile > > It works fine in QGIS. > In a javascript file with the OpenLayers library, I can define a source > with an url function like this: > url: function (extent) { > return ( > "http:///cgi-bin/mapserv.exe?MAP=C:/.../vue_ol_prescription.map; > " + > > "service=WFS=1.1.0=GetFeature=prescription&" + > "outputformat=geojson=EPSG:2154=" + > extent.join(",") + > ",EPSG:3857" > ) > > Why can't I use outputformat = application/json though it is permitted by > the outpuformat in mapfile layer definition ? I have an error : > "application.json not permitted". > Leehan > ___ > MapServer-users mailing list > MapServer-users@lists.osgeo.org > https://lists.osgeo.org/mailman/listinfo/mapserver-users > > > ___ MapServer-users mailing list MapServer-users@lists.osgeo.org https://lists.osgeo.org/mailman/listinfo/mapserver-users
Re: [MapServer-users] WFS, OpenLayers and OUTPUTFORMAT explanations
Hi, Probably best to check the WFS service GetCapabilities document to check which formats are supported. (From memory) wfs_getfeature_formatlist can include either the NAME or the MIMETYPE of the OUTPUTFORMAT. You have MIMETYPE set to "application/json;subtype=geojson", so maybe try chaging this to "application/json" or changing the NAME from "geojson" to ""application/json" to get an exact match. Seth -- web:https://geographika.net & https://mapserverstudio.net twitter: @geographika On Tue, Mar 19, 2024, at 11:26 AM, mathias cunault via MapServer-users wrote: > Hello, > Something that was never clear to me. > Here is a mapfile for a WFS definition: > MAP > NAME "Mapserver-Inrap" > FONTSET "C:\ms4w\Apache\site\fonts\fonts.txt" > OUTPUTFORMAT > NAME "geojson" > DRIVER "OGR/GEOJSON" > MIMETYPE "application/json;subtype=geojson" #option > # FORMATOPTION "STORAGE=stream" #requis > # FORMATOPTION "FORM=SIMPLE" > FORMATOPTION "STORAGE=memory" #requis > FORMATOPTION "FORM=SIMPLE" > END #fin format > > EXTENT 103362.94 6049964.789658545 1242388.01001 7108973.60237487 #xmin > ymin xmax ymax > 51.07538310654 #xmin ymin xmax ymax > UNITS METERS > DEBUG 5 > CONFIG "CPL_DEBUG" "ON" > CONFIG "PROJ_DEBUG" "ON" > CONFIG MS_ERRORFILE > "C:/ms4w/Apache/error/errorMapFile_vue_ol_prescription.txt" > > SYMBOLSET "C:\ms4w\Apache\site\symbols\symbols.sym" > > PROJECTION # proj de sortie > "init=epsg:2154" > END > > WEB > METADATA > "wfs_title" "WFS Caviar" > "wfs_onlineresource" > "http:///mapserv.exe?MAP=C:/ms4w/Apache/site/mapfile/vue_ol_prescription.map; > "wms_encoding" "UTF-8" > "wfs_srs" "EPSG:2154 EPSG:32620 EPSG:3857 EPSG:900913 EPSG:4326" > "wfs_enable_request" "*" > "wfs_abstract" "blabla" > "wfs_getfeature_formatlist" "application/json, GeoJSON, json" > END #fin metadata > END #end web > > #-debut prescription > LAYER > NAME "prescription" > TYPE POLYGON > CONNECTIONTYPE POSTGIS > CONNECTION "host=xxx dbname=activite user=wxxx password=xxx port=5432" > DATA "geom from activite.vue_ol_prescription using unique gid using SRID=2154" > EXTENT 103362.94 6049964.789658545 1242388.01001 7108973.60237487 #aide > pour performance > PROCESSING "CLOSE_CONNECTION=DEFER" > CLASS > ... > END #-fin classe unique > METADATA > "gml_include_items" "all" #obligé pour afficher attributs getfeatureinfo > "wfs_title" "prescription_2154" > #d'après la doc pas besoin si défini dans les metadata de la map cf.10.1 > #"wfs_srs" "EPSG:2154" > "gml_featureid" "gid" > "wfs_enable_request" "*" > "wfs_use_default_extent_for_getfeature" "false" > # si geojson en premier alors geoson dans l'url pour OpenLayers: > "wfs_getfeature_formatlist" "GeoJSON, json, application/json" > END #fin metadata prescription > TEMPLATE "bidon.html" > END #fin layer prescription > > END #-fin mapfile > > It works fine in QGIS. > In a javascript file with the OpenLayers library, I can define a source with > an url function like this: > url: function (extent) { > return ( > "http:///cgi-bin/mapserv.exe?MAP=C:/.../vue_ol_prescription.map&; + > "service=WFS=1.1.0=GetFeature=prescription&" + > "outputformat=geojson=EPSG:2154=" + > extent.join(",") + > ",EPSG:3857" > ) > > Why can't I use outputformat = application/json though it is permitted by the > outpuformat in mapfile layer definition ? I have an error : "application.json > not permitted". > Leehan > ___ > MapServer-users mailing list > MapServer-users@lists.osgeo.org > https://lists.osgeo.org/mailman/listinfo/mapserver-users > ___ MapServer-users mailing list MapServer-users@lists.osgeo.org https://lists.osgeo.org/mailman/listinfo/mapserver-users
[MapServer-users] WFS, OpenLayers and OUTPUTFORMAT explanations
Hello, Something that was never clear to me. Here is a mapfile for a WFS definition: MAP NAME "Mapserver-Inrap" FONTSET "C:\ms4w\Apache\site\fonts\fonts.txt" OUTPUTFORMAT NAME "geojson" DRIVER "OGR/GEOJSON" MIMETYPE "application/json;subtype=geojson" #option # FORMATOPTION "STORAGE=stream" #requis # FORMATOPTION "FORM=SIMPLE" FORMATOPTION "STORAGE=memory" #requis FORMATOPTION "FORM=SIMPLE" END #fin format EXTENT 103362.94 6049964.789658545 1242388.01001 7108973.60237487 #xmin ymin xmax ymax 51.07538310654 #xmin ymin xmax ymax UNITS METERS DEBUG 5 CONFIG "CPL_DEBUG" "ON" CONFIG "PROJ_DEBUG" "ON" CONFIG MS_ERRORFILE "C:/ms4w/Apache/error/errorMapFile_vue_ol_prescription.txt" SYMBOLSET "C:\ms4w\Apache\site\symbols\symbols.sym" PROJECTION # proj de sortie "init=epsg:2154" END WEB METADATA "wfs_title" "WFS Caviar" "wfs_onlineresource" " http:///mapserv.exe?MAP=C:/ms4w/Apache/site/mapfile/vue_ol_prescription.map " "wms_encoding" "UTF-8" "wfs_srs" "EPSG:2154 EPSG:32620 EPSG:3857 EPSG:900913 EPSG:4326" "wfs_enable_request" "*" "wfs_abstract" "blabla" "wfs_getfeature_formatlist" "application/json, GeoJSON, json" END #fin metadata END #end web #-debut prescription LAYER NAME "prescription" TYPE POLYGON CONNECTIONTYPE POSTGIS CONNECTION "host=xxx dbname=activite user=wxxx password=xxx port=5432" DATA "geom from activite.vue_ol_prescription using unique gid using SRID=2154" EXTENT 103362.94 6049964.789658545 1242388.01001 7108973.60237487 #aide pour performance PROCESSING "CLOSE_CONNECTION=DEFER" CLASS ... END #-fin classe unique METADATA "gml_include_items" "all" #obligé pour afficher attributs getfeatureinfo "wfs_title" "prescription_2154" #d'après la doc pas besoin si défini dans les metadata de la map cf.10.1 #"wfs_srs" "EPSG:2154" "gml_featureid" "gid" "wfs_enable_request" "*" "wfs_use_default_extent_for_getfeature" "false" # si geojson en premier alors geoson dans l'url pour OpenLayers: "wfs_getfeature_formatlist" "GeoJSON, json, application/json" END #fin metadata prescription TEMPLATE "bidon.html" END #fin layer prescription END #-fin mapfile It works fine in QGIS. In a javascript file with the OpenLayers library, I can define a source with an url function like this: url: function (extent) { return ( "http:///cgi-bin/mapserv.exe?MAP=C:/.../vue_ol_prescription.map&; + "service=WFS=1.1.0=GetFeature=prescription&" + "outputformat=geojson=EPSG:2154=" + extent.join(",") + ",EPSG:3857" ) Why can't I use outputformat = application/json though it is permitted by the outpuformat in mapfile layer definition ? I have an error : "application.json not permitted". Leehan ___ MapServer-users mailing list MapServer-users@lists.osgeo.org https://lists.osgeo.org/mailman/listinfo/mapserver-users
[MapServer-users] [REMINDER] OSGeo Twin Cities Local Chapter Monthly Meeting (aka TCMUG)
All, Good meeting last month. Some old and new<https://www.dropbox.com/scl/fi/uzru6qpubepwukhrowk4v/2024-02-21-18.16.37.jpg?rlkey=u8qnizkkvwvuzvejown5cbxgm=0> faces (Sorry Pete, I didn’t think about taking a picture until after you left . . .). A good time was had by all. This month’s meeting will be at https://www.insightbrewing.com/ Date: Mar 13th 4:30 – 6:00 Place: Insight Brewing<https://www.insightbrewing.com/contact> at the eastern edge of Minneapolis, Mn. On E. Hennepin Ave. See you there. Bobb Our meetings are intended as a monthly get together for all those interested in the field of GIS. We meet generally on the second Wednesday of each month. Get me in Teams<https://teams.microsoft.com/l/chat/0/0?users=bob.basq...@ci.stpaul.mn.us> PW19-S295-C024 ___ MapServer-users mailing list MapServer-users@lists.osgeo.org https://lists.osgeo.org/mailman/listinfo/mapserver-users
Re: [MapServer-users] CGI variable "map" fails to validate
I think I've stumbled into what is causing my issue. I was making requests to the endpoint /cgi-bin/mapserv.exe? (which is what I used in 7.6.2) When I change request to the endpoint /cgi-bin/? (no mapserv.exe) my requests work and validate as expected. I'm not sure why this is the case - if I swap my FastCGI back to point to the 7.6.2 module it serves requests at /mapserv.exe, but with 8.0.1 including the executable as part of the path causes issues with map validation. In any case, I can work around this by updating all the web apps to point to the new path (maybe also add in a URL Rewrite). Thanks, Matt -Original Message- From: MapServer-users On Behalf Of Lernout, Matthew via MapServer-users Sent: Wednesday, March 6, 2024 5:29 PM To: mapserver-users@lists.osgeo.org Subject: Re: [MapServer-users] CGI variable "map" fails to validate So, still banging my head against this a month later after eliminating HTTPS as the bogeyman. Using FastCGI and MapServer with the simplest config and what should be an "allow everything" test expression: CONFIG ENV MS_MAP_PATTERN "." END END And all requests return: msLoadMap(): Regular expression error. Filename validation failed. BONUS: If I strip out the map variable from my request, I'd expect the error "CGI variable "map" is not set." but I still get "msLoadMap(): Regular expression error. Filename validation failed." even without providing a map! This is following IISRESET, and I know the config is being loaded (if I remove it, I get "msLoadConfig(): Unable to access file") If I'm not supplying a map parameter in my request and it's not throwing an error that it's missing, what is being used for map value against the expression? (And how do I get it to read my variable in the request?) Thanks for any direction, Matt -Original Message----- From: MapServer-users On Behalf Of Lernout, Matthew via MapServer-users Sent: Wednesday, February 7, 2024 3:32 PM To: mapserver-users@lists.osgeo.org Subject: Re: [MapServer-users] CGI variable "map" fails to validate Hi, After scratching my head for a while, realized all my testing was over HTTPS. Made a localhost connection over HTTP and the map variable was then valid. I was looking in the wrong place - the error reports a failed validation, but that's due to failed certificate trust from what I can see. Thanks for helping me steer into the real issue - I now have a direction to move in! Matt -Original Message- From: Rahkonen Jukka Sent: Wednesday, February 7, 2024 1:05 PM To: Lernout, Matthew ; mapserver-users@lists.osgeo.org Subject: Re: [MapServer-users] CGI variable "map" fails to validate [You don't often get email from jukka.rahko...@maanmittauslaitos.fi. Learn why this is important at https://aka.ms/LearnAboutSenderIdentification ] Hi, "." works for me. I have a Windows env set first as set MAPSERVER_CONFIG_FILE=\ms4w\ms4w.conf These are the meaningful lines in the "ms4w.conf" file. CONFIG ENV MS_MAP_PATTERN "." END END Test proves that validation is successful http://localhost:8060/cgi-bin/mapserv.exe?map=f:\IMS_Maps\Client\projectarea.map msLoadMap(): Unable to access file. (f:\IMS_Maps\Client\projectarea.map) -Jukka Rahkonen- -Alkuperäinen viesti- Lähettäjä: MapServer-users Puolesta Lernout, Matthew via MapServer-users Lähetetty: keskiviikko 7. helmikuuta 2024 19.01 Vastaanottaja: mapserver-users@lists.osgeo.org Aihe: Re: [MapServer-users] CGI variable "map" fails to validate I've ensured I am restarting the mapserv process with each config change - a quick test of commenting out the MS_MAP_PATTERN variable confirmed that is enough to refresh the config via error. Here's a snippet of a sample request. It works with my running instance of Mapserver 7.6.2 but doesn't pass validation (pattern '.') in MapServer 8.0.1. /cgi-bin/mapserv.exe?map=f:\IMS_Maps\Client\projectarea.map Matt -Original Message- From: Seth G Sent: Wednesday, February 7, 2024 11:48 AM To: Lernout, Matthew ; MapServer Users Subject: Re: [MapServer-users] CGI variable "map" fails to validate [You don't often get email from se...@geographika.co.uk. Learn why this is important at https://aka.ms/LearnAboutSenderIdentification ] Hi Matthew, The CONFIG file I think is only reloaded when IIS or the Application Pool is restarted, so some changes to the regex may have been ignored. Do you have a sample request with the = parameter? Is there anything in a web.config file that could be stripping these out or modifying them? Seth -- web:https://geographika.net/ & https://mapserverstudio.net/ twitter: @geographika On Wed, Feb 7, 2024, at 5:33 PM, Lernout, Matthew via MapServer-users wrote: > MS_MAP_PATTERN '.' also results in the same failed validation error, > which is what make
Re: [MapServer-users] CGI variable "map" fails to validate
Shouldn't it be ".*' ? On 06/03/2024 23:29, Lernout, Matthew via MapServer-users wrote: So, still banging my head against this a month later after eliminating HTTPS as the bogeyman. Using FastCGI and MapServer with the simplest config and what should be an "allow everything" test expression: CONFIG ENV MS_MAP_PATTERN "." END END And all requests return: msLoadMap(): Regular expression error. Filename validation failed. BONUS: If I strip out the map variable from my request, I'd expect the error "CGI variable "map" is not set." but I still get "msLoadMap(): Regular expression error. Filename validation failed." even without providing a map! This is following IISRESET, and I know the config is being loaded (if I remove it, I get "msLoadConfig(): Unable to access file") If I'm not supplying a map parameter in my request and it's not throwing an error that it's missing, what is being used for map value against the expression? (And how do I get it to read my variable in the request?) Thanks for any direction, Matt -Original Message- From: MapServer-users On Behalf Of Lernout, Matthew via MapServer-users Sent: Wednesday, February 7, 2024 3:32 PM To: mapserver-users@lists.osgeo.org Subject: Re: [MapServer-users] CGI variable "map" fails to validate Hi, After scratching my head for a while, realized all my testing was over HTTPS. Made a localhost connection over HTTP and the map variable was then valid. I was looking in the wrong place - the error reports a failed validation, but that's due to failed certificate trust from what I can see. Thanks for helping me steer into the real issue - I now have a direction to move in! Matt -Original Message- From: Rahkonen Jukka Sent: Wednesday, February 7, 2024 1:05 PM To: Lernout, Matthew ; mapserver-users@lists.osgeo.org Subject: Re: [MapServer-users] CGI variable "map" fails to validate [You don't often get email from jukka.rahko...@maanmittauslaitos.fi. Learn why this is important at https://aka.ms/LearnAboutSenderIdentification ] Hi, "." works for me. I have a Windows env set first as set MAPSERVER_CONFIG_FILE=\ms4w\ms4w.conf These are the meaningful lines in the "ms4w.conf" file. CONFIG ENV MS_MAP_PATTERN "." END END Test proves that validation is successful http://localhost:8060/cgi-bin/mapserv.exe?map=f:\IMS_Maps\Client\projectarea.map msLoadMap(): Unable to access file. (f:\IMS_Maps\Client\projectarea.map) -Jukka Rahkonen- -Alkuperäinen viesti- Lähettäjä: MapServer-users Puolesta Lernout, Matthew via MapServer-users Lähetetty: keskiviikko 7. helmikuuta 2024 19.01 Vastaanottaja: mapserver-users@lists.osgeo.org Aihe: Re: [MapServer-users] CGI variable "map" fails to validate I've ensured I am restarting the mapserv process with each config change - a quick test of commenting out the MS_MAP_PATTERN variable confirmed that is enough to refresh the config via error. Here's a snippet of a sample request. It works with my running instance of Mapserver 7.6.2 but doesn't pass validation (pattern '.') in MapServer 8.0.1. /cgi-bin/mapserv.exe?map=f:\IMS_Maps\Client\projectarea.map Matt -Original Message----- From: Seth G Sent: Wednesday, February 7, 2024 11:48 AM To: Lernout, Matthew ; MapServer Users Subject: Re: [MapServer-users] CGI variable "map" fails to validate [You don't often get email from se...@geographika.co.uk. Learn why this is important at https://aka.ms/LearnAboutSenderIdentification ] Hi Matthew, The CONFIG file I think is only reloaded when IIS or the Application Pool is restarted, so some changes to the regex may have been ignored. Do you have a sample request with the = parameter? Is there anything in a web.config file that could be stripping these out or modifying them? Seth -- web:https://geographika.net/ & https://mapserverstudio.net/ twitter: @geographika On Wed, Feb 7, 2024, at 5:33 PM, Lernout, Matthew via MapServer-users wrote: MS_MAP_PATTERN '.' also results in the same failed validation error, which is what makes me think the issue may be with another config setting. '.' should match any input, right? Just to make sure my config file was being loaded, I commented out the MS_MAP_PATTERN entry entirely, and got the error "msCGILoadMap(): Web application error. Required configuration value MS_MAP_PATTERN not set." Matt -Original Message- From: MapServer-users On Behalf Of Jörg Thomsen (WhereGroup) via MapServer-users Sent: Wednesday, February 7, 2024 3:24 AM To: mapserver-users@lists.osgeo.org Subject: Re: [MapServer-users] CGI variable "map" fails to validate [You don't often get email from mapserver-users@lists.osgeo.org. Learn why this is important at https://aka.ms/LearnAboutSenderIdentification ] Hi, I'm not sure whether the pattern is correct. Shouldn't
Re: [MapServer-users] CGI variable "map" fails to validate
So, still banging my head against this a month later after eliminating HTTPS as the bogeyman. Using FastCGI and MapServer with the simplest config and what should be an "allow everything" test expression: CONFIG ENV MS_MAP_PATTERN "." END END And all requests return: msLoadMap(): Regular expression error. Filename validation failed. BONUS: If I strip out the map variable from my request, I'd expect the error "CGI variable "map" is not set." but I still get "msLoadMap(): Regular expression error. Filename validation failed." even without providing a map! This is following IISRESET, and I know the config is being loaded (if I remove it, I get "msLoadConfig(): Unable to access file") If I'm not supplying a map parameter in my request and it's not throwing an error that it's missing, what is being used for map value against the expression? (And how do I get it to read my variable in the request?) Thanks for any direction, Matt -Original Message- From: MapServer-users On Behalf Of Lernout, Matthew via MapServer-users Sent: Wednesday, February 7, 2024 3:32 PM To: mapserver-users@lists.osgeo.org Subject: Re: [MapServer-users] CGI variable "map" fails to validate Hi, After scratching my head for a while, realized all my testing was over HTTPS. Made a localhost connection over HTTP and the map variable was then valid. I was looking in the wrong place - the error reports a failed validation, but that's due to failed certificate trust from what I can see. Thanks for helping me steer into the real issue - I now have a direction to move in! Matt -Original Message- From: Rahkonen Jukka Sent: Wednesday, February 7, 2024 1:05 PM To: Lernout, Matthew ; mapserver-users@lists.osgeo.org Subject: Re: [MapServer-users] CGI variable "map" fails to validate [You don't often get email from jukka.rahko...@maanmittauslaitos.fi. Learn why this is important at https://aka.ms/LearnAboutSenderIdentification ] Hi, "." works for me. I have a Windows env set first as set MAPSERVER_CONFIG_FILE=\ms4w\ms4w.conf These are the meaningful lines in the "ms4w.conf" file. CONFIG ENV MS_MAP_PATTERN "." END END Test proves that validation is successful http://localhost:8060/cgi-bin/mapserv.exe?map=f:\IMS_Maps\Client\projectarea.map msLoadMap(): Unable to access file. (f:\IMS_Maps\Client\projectarea.map) -Jukka Rahkonen- -Alkuperäinen viesti- Lähettäjä: MapServer-users Puolesta Lernout, Matthew via MapServer-users Lähetetty: keskiviikko 7. helmikuuta 2024 19.01 Vastaanottaja: mapserver-users@lists.osgeo.org Aihe: Re: [MapServer-users] CGI variable "map" fails to validate I've ensured I am restarting the mapserv process with each config change - a quick test of commenting out the MS_MAP_PATTERN variable confirmed that is enough to refresh the config via error. Here's a snippet of a sample request. It works with my running instance of Mapserver 7.6.2 but doesn't pass validation (pattern '.') in MapServer 8.0.1. /cgi-bin/mapserv.exe?map=f:\IMS_Maps\Client\projectarea.map Matt -Original Message- From: Seth G Sent: Wednesday, February 7, 2024 11:48 AM To: Lernout, Matthew ; MapServer Users Subject: Re: [MapServer-users] CGI variable "map" fails to validate [You don't often get email from se...@geographika.co.uk. Learn why this is important at https://aka.ms/LearnAboutSenderIdentification ] Hi Matthew, The CONFIG file I think is only reloaded when IIS or the Application Pool is restarted, so some changes to the regex may have been ignored. Do you have a sample request with the = parameter? Is there anything in a web.config file that could be stripping these out or modifying them? Seth -- web:https://geographika.net/ & https://mapserverstudio.net/ twitter: @geographika On Wed, Feb 7, 2024, at 5:33 PM, Lernout, Matthew via MapServer-users wrote: > MS_MAP_PATTERN '.' also results in the same failed validation error, > which is what makes me think the issue may be with another config > setting. '.' should match any input, right? > > Just to make sure my config file was being loaded, I commented out the > MS_MAP_PATTERN entry entirely, and got the error "msCGILoadMap(): Web > application error. Required configuration value MS_MAP_PATTERN not set." > > Matt > > -Original Message- > From: MapServer-users On > Behalf Of Jörg Thomsen (WhereGroup) via MapServer-users > Sent: Wednesday, February 7, 2024 3:24 AM > To: mapserver-users@lists.osgeo.org > Subject: Re: [MapServer-users] CGI variable "map" fails to validate > > [You don't often get email from mapserver-users@lists.osgeo.org. Learn > why this is important at https://aka.ms/LearnAboutSenderIdentification > ] > > Hi, > > I'm not sure whether the pattern is corr
[MapServer-users] [ANNOUNCEMENT] OSGeo Twin Cities Local Chapter Monthly Meeting (aka TCMUG)
All, Good meeting last month. Some old and new<https://www.dropbox.com/scl/fi/uzru6qpubepwukhrowk4v/2024-02-21-18.16.37.jpg?rlkey=u8qnizkkvwvuzvejown5cbxgm=0> faces (Sorry Pete, I didn’t think about taking a picture until after you left . . .). A good time was had by all. This month’s meeting will be at https://www.insightbrewing.com/ Date: Mar 13th 4:30 – 6:00 Place: Insight Brewing<https://www.insightbrewing.com/contact> at the eastern edge of Minneapolis, Mn. On E. Hennepin Ave. See you there. Bobb Our meetings are intended as a monthly get together for all those interested in the field of GIS. We meet generally on the second Wednesday of each month. Get me in Teams<https://teams.microsoft.com/l/chat/0/0?users=bob.basq...@ci.stpaul.mn.us> PW19-S295-C024 ___ MapServer-users mailing list MapServer-users@lists.osgeo.org https://lists.osgeo.org/mailman/listinfo/mapserver-users
[MapServer-users] [REMINDER - RESCHEDULE] OSGeo Twin Cities Local Chapter Monthly Meeting (aka TCMUG)
It was pointed out to me that the meeting was on Valentine’s day this week, so moving to the following week. New DATE – Feb 21st, see below . . . All, This month’s meeting will be at the https://www.lakemonsterbrewing.com/ Date: Feb 14thth Feb 21st , 4:30 – 6:00 Place: Lake Monster (google map link)<https://maps.app.goo.gl/ZoZDT6jhb49rE3ce6> in Saint Paul, Mn. (Midway area). See you there. Bobb Get me in Teams<https://teams.microsoft.com/l/chat/0/0?users=bob.basq...@ci.stpaul.mn.us> PW19-S295-C024 ___ MapServer-users mailing list MapServer-users@lists.osgeo.org https://lists.osgeo.org/mailman/listinfo/mapserver-users
Re: [MapServer-users] filter issues with WFS
Hi Carlos, If you add DEBUG 5 to the LAYER, and set the CONFIG MS_ERRORFILE do you get more details in the logs for why the filter is failing? The error indicates MapServer cannot parse the filter. The unencoded filter is shown below. http://www.opengis.net/fes/2.0; xmlns:gml="http://www.opengis.net/gml/3.2;> wkb_geometry 448535 197714 448849 197791 http://www.opengis.net/fes/2.0;> wkb_geometry http://www.opengis.net/fes/2.0; name="geomFromWKT"> http://www.opengis.net/fes/2.0;>POLYGON((447915.652115244 195673.1860001606531, 449272.4820001816079 195673.1860001606531, 449272.4820001816079 200345.652186265, 447915.652115244 200345.652186265, 447915.652115244 195673.1860001606531)) I'm guessing the geomFromWKT is not supported, so the filter should pass a GML Polygon object to filter by using an intersecting geometry. See https://mapserver.org/ogc/filter_encoding.html#tests for an example Geometry 135.5329,34.6624 135.4921,34.8153 135.3673,34.7815 135.3800,34.6216 135.5361,34.6210 135.5329,34.6624 Seth -- web:https://geographika.net & https://mapserverstudio.net twitter: @geographika On Mon, Feb 12, 2024, at 1:33 PM, Carlos Padron Florez via MapServer-users wrote: > Hi, > > I have a WFS version 2.0.0 and I want to request from it features using a > filter but I get this error: > msWFSGetFeature(): WFS server error. Invalid or Unsupported FILTER in > GetFeature : > The request is the following: > > https://SERVER/wfs?SERVICE=WFS=GetFeature=2.0.0=ms:layername=0=100=urn:ogc:def:crs:EPSG::27700=%3Cfes:Filter > xmlns:fes%3D%22http://www.opengis.net/fes/2.0%22 > xmlns:gml%3D%22http://www.opengis.net/gml/3.2%22%3E%0A %3Cfes:And%3E%0A > %3Cfes:BBOX%3E%0A > %3Cfes:ValueReference%3Ewkb_geometry%3C/fes:ValueReference%3E%0A > %3Cgml:Envelope srsName%3D%22urn:ogc:def:crs:EPSG::27700%22%3E%0A > %3Cgml:lowerCorner%3E448535 197714%3C/gml:lowerCorner%3E%0A > %3Cgml:upperCorner%3E448849 197791%3C/gml:upperCorner%3E%0A > %3C/gml:Envelope%3E%0A %3C/fes:BBOX%3E%0A %3Cfes:Intersects > xmlns:fes%3D%22http://www.opengis.net/fes/2.0%22%3E%0A > %3Cfes:ValueReference%3Ewkb_geometry%3C/fes:ValueReference%3E%0A > %3Cfes:Function xmlns:fes%3D%22http://www.opengis.net/fes/2.0%22 > name%3D%22geomFromWKT%22%3E%0A%3Cfes:Literal > xmlns:fes%3D%22http://www.opengis.net/fes/2.0%22%3EPOLYGON((447915.652115244 > 195673.1860001606531, 449272.4820001816079 195673.1860001606531, > 449272.4820001816079 200345.652186265, 447915.652115244 > 200345.652186265, 447915.652115244 > 195673.1860001606531))%3C/fes:Literal%3E%0A %3C/fes:Function%3E%0A > %3C/fes:Intersects%3E%0A %3C/fes:And%3E%0A%3C/fes:Filter%3E%0A > > The same request, with obvious changes of server name, works on Geoserver. > This request is generated by Qgis so I don't if I can fix it via Mapserver or > via QGIS. > Any ideas? > > Kind regards > > *Carlos Padrón, MRes *| Geomatics Team Lead > > > > D: 01865 664120 W: www.gigaclear.com > > > > > > signature_261337870 > > Gigaclear ltd, Building 1, Wyndyke Furlong, Abingdon, Oxfordshire, OX14 1UQ > > Gigaclear plc is registered in England and Wales with company number 07476617 > > > > ___ > MapServer-users mailing list > MapServer-users@lists.osgeo.org > https://lists.osgeo.org/mailman/listinfo/mapserver-users > ___ MapServer-users mailing list MapServer-users@lists.osgeo.org https://lists.osgeo.org/mailman/listinfo/mapserver-users
Re: [MapServer-users] Pass time range in WCS 1.0.0 request GetCoverage
Hi Michał, Looking at the code, I think this is an error in the documentation - time ranges in WCS 1.0 do not seem to be supported. There are no tests that cover time ranges either. You could use runtime substitution to create your own queries with custom parameters e.g. START_DATE=2022-03-10_DATE=2022-04-10 The section at https://mapserver.org/ogc/wcs_server.html#spatio-temporal-indexes recommends using a TILEINDEX for the layer. Seth -- web:https://geographika.net & https://mapserverstudio.net twitter: @geographika On Fri, Feb 16, 2024, at 4:31 PM, Michał Bojko via MapServer-users wrote: > Hello, > I am trying to build WCS service with usage of postgis database, but now I am > unable to pass timerange in request to server. In my postgis database I have > specified column for geometry and timestamp and request that use BBOX and > TIME (single value) work fine. The problem is I cannot pass multiple dates or > date range. When providing TIME in such manner, I receive this error message: > "WCS server error. Temporal ranges are not supported, only individual > values". In official documentation it is stated that it's possible to pass at > least two TIME parameters at once in version 1.0.0, but it doesn't work for > me > (https://mapserver.org/pl/ogc/wcs_server.html#test-with-a-getcoverage-request). > Is there specified way to pass timeranges/timelist (I didn't find any > information about it)? Or maybe it isn't possible to pass multiple values? > But when I look into mapserver logs I see that postgis query searches for > records that are between selected one day, so why wouldn't it be possible to > pass two days and search for records between them? Below I will paste some > request and queries: > Request with single TIME value that's working for me: > http://localhost/cgi-bin/mapserv?map=/var/www/my_wcs.map=WCS=1.0.0=GetCoverage=T36SVD=EPSG:3857=10=10=GTiff=3572705,6277219,3637743,6334339=2022-03-10 > > <http://localhost/cgi-bin/mapserv?map=/var/www/my_wcs.map=WCS=1.0.0=GetCoverage=T36SVD=EPSG:3857=10=10=GTiff=3572705,6277219,3637743,6334339=2022-03-10/2022-03-15> > > Request with two TIME values that isn't working for me and error message: > http://localhost/cgi-bin/mapserv?map=/var/www/my_wcs.map=WCS=1.0.0=GetCoverage=T36SVD=EPSG:3857=10=10=GTiff=3572705,6277219,3637743,6334339=2022-03-10,2022-03-15 > WCS server error. Temporal lists are not supported, only individual values. > > Request with TIME range that also isn't working for me and error message: > http://localhost/cgi-bin/mapserv?map=/var/www/my_wcs.map=WCS=1.0.0=GetCoverage=T36SVD=EPSG:3857=10=10=GTiff=3572705,6277219,3637743,6334339=2022-03-10/2022-03-15 > WCS server error. Temporal ranges are not supported, only individual values. > > Postgis query from mapserver logs when request contains only one TIME value: > select > "timestamp"::text,"cloudless_10"::text,"epsg"::text,ST_AsBinary(("geometry"),'NDR') > as geom,"unique_id"::text from (select * from mrc where maxcc <= 100 AND > (pid = '-1' OR '-1' = '-1') AND (tile = '-1' OR '-1' = '-1') order by maxcc > desc) as subquerry where ST_Intersects("geometry", > ST_GeomFromText('POLYGON((3572710 6277224,3572710 6334334,3637738 > 6334334,3637738 6277224,3572710 6277224))',3857)) and ("timestamp" between > date_trunc('day',date '2022-03-10') and date_trunc('day',date '2022-03-10') + > interval '1 day' - interval '1 second') > > So, is there any possibility to use multiple TIME values in one GetCoverage > request? > Best regards, > Michał > > *Michał Bojko* > Trainee > CloudFerro S.A. > office: Fabryczna 5 *m:* 502 705 120 > 00-446 Warszawa, Poland *e:* mbo...@cloudferro.com <https://cloudferro.com/> > > ___ > MapServer-users mailing list > MapServer-users@lists.osgeo.org > https://lists.osgeo.org/mailman/listinfo/mapserver-users > ___ MapServer-users mailing list MapServer-users@lists.osgeo.org https://lists.osgeo.org/mailman/listinfo/mapserver-users
[MapServer-users] Pass time range in WCS 1.0.0 request GetCoverage
Hello, I am trying to build WCS service with usage of postgis database, but now I am unable to pass timerange in request to server. In my postgis database I have specified column for geometry and timestamp and request that use BBOX and TIME (single value) work fine. The problem is I cannot pass multiple dates or date range. When providing TIME in such manner, I receive this error message: "WCS server error. Temporal ranges are not supported, only individual values". In official documentation it is stated that it's possible to pass at least two TIME parameters at once in version 1.0.0, but it doesn't work for me (https://mapserver.org/pl/ogc/wcs_server.html#test-with-a-getcoverage-request). Is there specified way to pass timeranges/timelist (I didn't find any information about it)? Or maybe it isn't possible to pass multiple values? But when I look into mapserver logs I see that postgis query searches for records that are between selected one day, so why wouldn't it be possible to pass two days and search for records between them? Below I will paste some request and queries: Request with single TIME value that's working for me: http://localhost/cgi-bin/mapserv?map=/var/www/my_wcs.map=WCS=1.0.0=GetCoverage=T36SVD=EPSG:3857=10=10=GTiff=3572705,6277219,3637743,6334339=2022-03-10<http://localhost/cgi-bin/mapserv?map=/var/www/my_wcs.map=WCS=1.0.0=GetCoverage=T36SVD=EPSG:3857=10=10=GTiff=3572705,6277219,3637743,6334339=2022-03-10/2022-03-15> Request with two TIME values that isn't working for me and error message: http://localhost/cgi-bin/mapserv?map=/var/www/my_wcs.map=WCS=1.0.0=GetCoverage=T36SVD=EPSG:3857=10=10=GTiff=3572705,6277219,3637743,6334339=2022-03-10,2022-03-15 WCS server error. Temporal lists are not supported, only individual values. Request with TIME range that also isn't working for me and error message: http://localhost/cgi-bin/mapserv?map=/var/www/my_wcs.map=WCS=1.0.0=GetCoverage=T36SVD=EPSG:3857=10=10=GTiff=3572705,6277219,3637743,6334339=2022-03-10/2022-03-15 WCS server error. Temporal ranges are not supported, only individual values. Postgis query from mapserver logs when request contains only one TIME value: select "timestamp"::text,"cloudless_10"::text,"epsg"::text,ST_AsBinary(("geometry"),'NDR') as geom,"unique_id"::text from (select * from mrc where maxcc <= 100 AND (pid = '-1' OR '-1' = '-1') AND (tile = '-1' OR '-1' = '-1') order by maxcc desc) as subquerry where ST_Intersects("geometry", ST_GeomFromText('POLYGON((3572710 6277224,3572710 6334334,3637738 6334334,3637738 6277224,3572710 6277224))',3857)) and ("timestamp" between date_trunc('day',date '2022-03-10') and date_trunc('day',date '2022-03-10') + interval '1 day' - interval '1 second') So, is there any possibility to use multiple TIME values in one GetCoverage request? Best regards, Michał Michał Bojko Trainee CloudFerro S.A. office: Fabryczna 5 m: 502 705 120 00-446 Warszawa, Poland e: mbo...@cloudferro.com [https://i.imgur.com/XRnmHDu.png]<https://cloudferro.com/> ___ MapServer-users mailing list MapServer-users@lists.osgeo.org https://lists.osgeo.org/mailman/listinfo/mapserver-users
[MapServer-users] Mapserver and keycloak
Hello Any information about using mapserver with keycloak? Thanks Best regards Gerhard Von meinem iPhone gesendet ___ MapServer-users mailing list MapServer-users@lists.osgeo.org https://lists.osgeo.org/mailman/listinfo/mapserver-users
[MapServer-users] [RESCHEDULE] OSGeo Twin Cities Local Chapter Monthly Meeting (aka TCMUG)
It was pointed out to me that the meeting was on Valentine’s day this week, so moving to the following week. New DATE – Feb 21st, see below . . . All, This month’s meeting will be at the https://www.lakemonsterbrewing.com/ Date: Feb 14thth Feb 21st , 4:30 – 6:00 Place: Lake Monster (google map link)<https://maps.app.goo.gl/ZoZDT6jhb49rE3ce6> in Saint Paul, Mn. (Midway area). See you there. Bobb Get me in Teams<https://teams.microsoft.com/l/chat/0/0?users=bob.basq...@ci.stpaul.mn.us> PW19-S295-C024 ___ MapServer-users mailing list MapServer-users@lists.osgeo.org https://lists.osgeo.org/mailman/listinfo/mapserver-users
[MapServer-users] filter issues with WFS
Hi, I have a WFS version 2.0.0 and I want to request from it features using a filter but I get this error: msWFSGetFeature(): WFS server error. Invalid or Unsupported FILTER in GetFeature : https://SERVER/wfs?SERVICE=WFS=GetFeature=2.0.0=ms:layername=0=100=urn:ogc:def:crs:EPSG::27700=%3Cfes:Filter xmlns:fes%3D%22http://www.opengis.net/fes/2.0%22 xmlns:gml%3D%22http://www.opengis.net/gml/3.2%22%3E%0A %3Cfes:And%3E%0A %3Cfes:BBOX%3E%0A %3Cfes:ValueReference%3Ewkb_geometry%3C/fes:ValueReference%3E%0A %3Cgml:Envelope srsName%3D%22urn:ogc:def:crs:EPSG::27700%22%3E%0A %3Cgml:lowerCorner%3E448535 197714%3C/gml:lowerCorner%3E%0A %3Cgml:upperCorner%3E448849 197791%3C/gml:upperCorner%3E%0A %3C/gml:Envelope%3E%0A %3C/fes:BBOX%3E%0A %3Cfes:Intersects xmlns:fes%3D%22http://www.opengis.net/fes/2.0%22%3E%0A %3Cfes:ValueReference%3Ewkb_geometry%3C/fes:ValueReference%3E%0A %3Cfes:Function xmlns:fes%3D%22http://www.opengis.net/fes/2.0%22 name%3D%22geomFromWKT%22%3E%0A%3Cfes:Literal xmlns:fes%3D%22http://www.opengis.net/fes/2.0%22%3EPOLYGON((447915.652115244 195673.1860001606531, 449272.4820001816079 195673.1860001606531, 449272.4820001816079 200345.652186265, 447915.652115244 200345.652186265, 447915.652115244 195673.1860001606531))%3C/fes:Literal%3E%0A %3C/fes:Function%3E%0A %3C/fes:Intersects%3E%0A %3C/fes:And%3E%0A%3C/fes:Filter%3E%0A The same request, with obvious changes of server name, works on Geoserver. This request is generated by Qgis so I don't if I can fix it via Mapserver or via QGIS. Any ideas? Kind regards Carlos Padrón, MRes | Geomatics Team Lead D: 01865 664120 W: www.gigaclear.com<http://www.gigaclear.com/> [signature_261337870] Gigaclear ltd, Building 1, Wyndyke Furlong, Abingdon, Oxfordshire, OX14 1UQ Gigaclear plc is registered in England and Wales with company number 07476617 ___ MapServer-users mailing list MapServer-users@lists.osgeo.org https://lists.osgeo.org/mailman/listinfo/mapserver-users
[MapServer-users] [CORRECTION] OSGeo Twin Cities Local Chapter Monthly Meeting (aka TCMUG)
Sorry everyone, Friday and not thinking straight . . . (Thanks Pete) All, This month’s meeting will be at the https://www.lakemonsterbrewing.com/ Date: Feb 14thth, 4:30 – 6:00 Place: Lake Monster (google map link)<https://maps.app.goo.gl/ZoZDT6jhb49rE3ce6> in Saint Paul, Mn. (Midway area). See you there. Bobb Get me in Teams<https://teams.microsoft.com/l/chat/0/0?users=bob.basq...@ci.stpaul.mn.us> PW19-S295-C024 ___ MapServer-users mailing list MapServer-users@lists.osgeo.org https://lists.osgeo.org/mailman/listinfo/mapserver-users
[MapServer-users] OSGeo Twin Cities Local Chapter Monthly Meeting (aka TCMUG)
All, This month’s meeting will be at the https://www.lakemonsterbrewing.com/ Date: Feb 14thth, 4:30 – 6:00 Place: Lake Monster (google map link)<https://maps.app.goo.gl/ZoZDT6jhb49rE3ce6> in Inver Grove Heights, Mn. See you there. Bobb Get me in Teams<https://teams.microsoft.com/l/chat/0/0?users=bob.basq...@ci.stpaul.mn.us> PW19-S295-C024 ___ MapServer-users mailing list MapServer-users@lists.osgeo.org https://lists.osgeo.org/mailman/listinfo/mapserver-users
Re: [MapServer-users] Why is Mapserver slower in Postgres 13 than in Postgres 11?
Something that's curious is that while the old db takes about 5 seconds to run the queries it generates, the actual web page loads in about 2 seconds. Another mystery to add to the pile. Thanks, Rob ___ MapServer-users mailing list MapServer-users@lists.osgeo.org https://lists.osgeo.org/mailman/listinfo/mapserver-users
Re: [MapServer-users] CGI variable "map" fails to validate
Hi, After scratching my head for a while, realized all my testing was over HTTPS. Made a localhost connection over HTTP and the map variable was then valid. I was looking in the wrong place - the error reports a failed validation, but that's due to failed certificate trust from what I can see. Thanks for helping me steer into the real issue - I now have a direction to move in! Matt -Original Message- From: Rahkonen Jukka Sent: Wednesday, February 7, 2024 1:05 PM To: Lernout, Matthew ; mapserver-users@lists.osgeo.org Subject: Re: [MapServer-users] CGI variable "map" fails to validate [You don't often get email from jukka.rahko...@maanmittauslaitos.fi. Learn why this is important at https://aka.ms/LearnAboutSenderIdentification ] Hi, "." works for me. I have a Windows env set first as set MAPSERVER_CONFIG_FILE=\ms4w\ms4w.conf These are the meaningful lines in the "ms4w.conf" file. CONFIG ENV MS_MAP_PATTERN "." END END Test proves that validation is successful http://localhost:8060/cgi-bin/mapserv.exe?map=f:\IMS_Maps\Client\projectarea.map msLoadMap(): Unable to access file. (f:\IMS_Maps\Client\projectarea.map) -Jukka Rahkonen- -Alkuperäinen viesti- Lähettäjä: MapServer-users Puolesta Lernout, Matthew via MapServer-users Lähetetty: keskiviikko 7. helmikuuta 2024 19.01 Vastaanottaja: mapserver-users@lists.osgeo.org Aihe: Re: [MapServer-users] CGI variable "map" fails to validate I've ensured I am restarting the mapserv process with each config change - a quick test of commenting out the MS_MAP_PATTERN variable confirmed that is enough to refresh the config via error. Here's a snippet of a sample request. It works with my running instance of Mapserver 7.6.2 but doesn't pass validation (pattern '.') in MapServer 8.0.1. /cgi-bin/mapserv.exe?map=f:\IMS_Maps\Client\projectarea.map Matt -Original Message- From: Seth G Sent: Wednesday, February 7, 2024 11:48 AM To: Lernout, Matthew ; MapServer Users Subject: Re: [MapServer-users] CGI variable "map" fails to validate [You don't often get email from se...@geographika.co.uk. Learn why this is important at https://aka.ms/LearnAboutSenderIdentification ] Hi Matthew, The CONFIG file I think is only reloaded when IIS or the Application Pool is restarted, so some changes to the regex may have been ignored. Do you have a sample request with the = parameter? Is there anything in a web.config file that could be stripping these out or modifying them? Seth -- web:https://geographika.net/ & https://mapserverstudio.net/ twitter: @geographika On Wed, Feb 7, 2024, at 5:33 PM, Lernout, Matthew via MapServer-users wrote: > MS_MAP_PATTERN '.' also results in the same failed validation error, > which is what makes me think the issue may be with another config > setting. '.' should match any input, right? > > Just to make sure my config file was being loaded, I commented out the > MS_MAP_PATTERN entry entirely, and got the error "msCGILoadMap(): Web > application error. Required configuration value MS_MAP_PATTERN not set." > > Matt > > -Original Message- > From: MapServer-users On > Behalf Of Jörg Thomsen (WhereGroup) via MapServer-users > Sent: Wednesday, February 7, 2024 3:24 AM > To: mapserver-users@lists.osgeo.org > Subject: Re: [MapServer-users] CGI variable "map" fails to validate > > [You don't often get email from mapserver-users@lists.osgeo.org. Learn > why this is important at https://aka.ms/LearnAboutSenderIdentification > ] > > Hi, > > I'm not sure whether the pattern is correct. Shouldn't ist start with ^? > > Have yout tried > MS_MAP_PATTERN '.'? (not for production, just as a test) > > Jörg > > Am 06.02.24 um 20:12 schrieb Lernout, Matthew via MapServer-users: >> Hi, >> >> Having trouble making requests since updating to 8.0.1 from 7.6.2. >> Mapserver is running in IIS using FastCGI and the configuration steps >> from: >> https://maps/ >> erver.org%2Finstallation%2Fiis.html=05%7C02%7Cmatt.lernout%40sta >> n >> tec.com%7C34322cf56ae745f61ae908dc27b617c5%7C413c6f2c219a469297d3f2b4 >> d >> 80281e7%7C0%7C0%7C638428910243090792%7CUnknown%7CTWFpbGZsb3d8eyJWIjoi >> M >> C4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C0%7C%7C%7 >> C >> =dh%2BpgGwk5996f0GEMeX7O8rcv5J81TnPzeFNZ9XoVLs%3D=0 >> <https://map/ >> server.org%2Finstallation%2Fiis.html=05%7C02%7Cmatt.lernout%40st >> a >> ntec.com%7C34322cf56ae745f61ae908dc27b617c5%7C413c6f2c219a469297d3f2b >> 4 >> d80281e7%7C0%7C0%7C638428910243098246%7CUnknown%7CTWFpbGZsb3d8eyJWIjo >> i >> MC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C0%7C%7C% >> 7 >> C=OIoWHSlKZJrXWspqwVfY5jhX4lzBcQuI%2Bw5IeOVtX
Re: [MapServer-users] CGI variable "map" fails to validate
Hi, "." works for me. I have a Windows env set first as set MAPSERVER_CONFIG_FILE=\ms4w\ms4w.conf These are the meaningful lines in the "ms4w.conf" file. CONFIG ENV MS_MAP_PATTERN "." END END Test proves that validation is successful http://localhost:8060/cgi-bin/mapserv.exe?map=f:\IMS_Maps\Client\projectarea.map msLoadMap(): Unable to access file. (f:\IMS_Maps\Client\projectarea.map) -Jukka Rahkonen- -Alkuperäinen viesti- Lähettäjä: MapServer-users Puolesta Lernout, Matthew via MapServer-users Lähetetty: keskiviikko 7. helmikuuta 2024 19.01 Vastaanottaja: mapserver-users@lists.osgeo.org Aihe: Re: [MapServer-users] CGI variable "map" fails to validate I've ensured I am restarting the mapserv process with each config change - a quick test of commenting out the MS_MAP_PATTERN variable confirmed that is enough to refresh the config via error. Here's a snippet of a sample request. It works with my running instance of Mapserver 7.6.2 but doesn't pass validation (pattern '.') in MapServer 8.0.1. /cgi-bin/mapserv.exe?map=f:\IMS_Maps\Client\projectarea.map Matt -Original Message- From: Seth G Sent: Wednesday, February 7, 2024 11:48 AM To: Lernout, Matthew ; MapServer Users Subject: Re: [MapServer-users] CGI variable "map" fails to validate [You don't often get email from se...@geographika.co.uk. Learn why this is important at https://aka.ms/LearnAboutSenderIdentification ] Hi Matthew, The CONFIG file I think is only reloaded when IIS or the Application Pool is restarted, so some changes to the regex may have been ignored. Do you have a sample request with the = parameter? Is there anything in a web.config file that could be stripping these out or modifying them? Seth -- web:https://geographika.net/ & https://mapserverstudio.net/ twitter: @geographika On Wed, Feb 7, 2024, at 5:33 PM, Lernout, Matthew via MapServer-users wrote: > MS_MAP_PATTERN '.' also results in the same failed validation error, > which is what makes me think the issue may be with another config > setting. '.' should match any input, right? > > Just to make sure my config file was being loaded, I commented out the > MS_MAP_PATTERN entry entirely, and got the error "msCGILoadMap(): Web > application error. Required configuration value MS_MAP_PATTERN not set." > > Matt > > -Original Message- > From: MapServer-users On > Behalf Of Jörg Thomsen (WhereGroup) via MapServer-users > Sent: Wednesday, February 7, 2024 3:24 AM > To: mapserver-users@lists.osgeo.org > Subject: Re: [MapServer-users] CGI variable "map" fails to validate > > [You don't often get email from mapserver-users@lists.osgeo.org. Learn > why this is important at https://aka.ms/LearnAboutSenderIdentification > ] > > Hi, > > I'm not sure whether the pattern is correct. Shouldn't ist start with ^? > > Have yout tried > MS_MAP_PATTERN '.'? (not for production, just as a test) > > Jörg > > Am 06.02.24 um 20:12 schrieb Lernout, Matthew via MapServer-users: >> Hi, >> >> Having trouble making requests since updating to 8.0.1 from 7.6.2. >> Mapserver is running in IIS using FastCGI and the configuration steps >> from: >> https://maps/ >> erver.org%2Finstallation%2Fiis.html=05%7C02%7Cmatt.lernout%40sta >> n >> tec.com%7C34322cf56ae745f61ae908dc27b617c5%7C413c6f2c219a469297d3f2b4 >> d >> 80281e7%7C0%7C0%7C638428910243090792%7CUnknown%7CTWFpbGZsb3d8eyJWIjoi >> M >> C4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C0%7C%7C%7 >> C >> =dh%2BpgGwk5996f0GEMeX7O8rcv5J81TnPzeFNZ9XoVLs%3D=0 >> <https://map/ >> server.org%2Finstallation%2Fiis.html=05%7C02%7Cmatt.lernout%40st >> a >> ntec.com%7C34322cf56ae745f61ae908dc27b617c5%7C413c6f2c219a469297d3f2b >> 4 >> d80281e7%7C0%7C0%7C638428910243098246%7CUnknown%7CTWFpbGZsb3d8eyJWIjo >> i >> MC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C0%7C%7C% >> 7 >> C=OIoWHSlKZJrXWspqwVfY5jhX4lzBcQuI%2Bw5IeOVtXBA%3D=0> >> >> A new config file was added to the filesystem and server Environment >> variables as per documented requirements added since 7.6.3, but >> having trouble validating any map arguments. All requests return the >> error "CGI variable "map" fails to validate" even though regexp >> should pass based on expression tests. >> >> Here is the full config file in use: >> >> CONFIG >>ENV >> MS_MAP_PATTERN "\.map$" >> PROJ_LIB "F:/MapServer/bin/proj7/SHARE" >> CURL_CA_BUNDLE "F:\MapServer\bin\curl\curl-ca-bundle.crt" >>END >> >> >>PLUGINS >> "mssql" &qu
Re: [MapServer-users] CGI variable "map" fails to validate
I've ensured I am restarting the mapserv process with each config change - a quick test of commenting out the MS_MAP_PATTERN variable confirmed that is enough to refresh the config via error. Here's a snippet of a sample request. It works with my running instance of Mapserver 7.6.2 but doesn't pass validation (pattern '.') in MapServer 8.0.1. /cgi-bin/mapserv.exe?map=f:\IMS_Maps\Client\projectarea.map Matt -Original Message- From: Seth G Sent: Wednesday, February 7, 2024 11:48 AM To: Lernout, Matthew ; MapServer Users Subject: Re: [MapServer-users] CGI variable "map" fails to validate [You don't often get email from se...@geographika.co.uk. Learn why this is important at https://aka.ms/LearnAboutSenderIdentification ] Hi Matthew, The CONFIG file I think is only reloaded when IIS or the Application Pool is restarted, so some changes to the regex may have been ignored. Do you have a sample request with the = parameter? Is there anything in a web.config file that could be stripping these out or modifying them? Seth -- web:https://geographika.net/ & https://mapserverstudio.net/ twitter: @geographika On Wed, Feb 7, 2024, at 5:33 PM, Lernout, Matthew via MapServer-users wrote: > MS_MAP_PATTERN '.' also results in the same failed validation error, > which is what makes me think the issue may be with another config > setting. '.' should match any input, right? > > Just to make sure my config file was being loaded, I commented out the > MS_MAP_PATTERN entry entirely, and got the error "msCGILoadMap(): Web > application error. Required configuration value MS_MAP_PATTERN not set." > > Matt > > -Original Message- > From: MapServer-users On > Behalf Of Jörg Thomsen (WhereGroup) via MapServer-users > Sent: Wednesday, February 7, 2024 3:24 AM > To: mapserver-users@lists.osgeo.org > Subject: Re: [MapServer-users] CGI variable "map" fails to validate > > [You don't often get email from mapserver-users@lists.osgeo.org. Learn > why this is important at https://aka.ms/LearnAboutSenderIdentification > ] > > Hi, > > I'm not sure whether the pattern is correct. Shouldn't ist start with ^? > > Have yout tried > MS_MAP_PATTERN '.'? (not for production, just as a test) > > Jörg > > Am 06.02.24 um 20:12 schrieb Lernout, Matthew via MapServer-users: >> Hi, >> >> Having trouble making requests since updating to 8.0.1 from 7.6.2. >> Mapserver is running in IIS using FastCGI and the configuration steps >> from: >> https://maps/ >> erver.org%2Finstallation%2Fiis.html=05%7C02%7Cmatt.lernout%40sta >> n >> tec.com%7C34322cf56ae745f61ae908dc27b617c5%7C413c6f2c219a469297d3f2b4 >> d >> 80281e7%7C0%7C0%7C638428910243090792%7CUnknown%7CTWFpbGZsb3d8eyJWIjoi >> M >> C4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C0%7C%7C%7 >> C >> =dh%2BpgGwk5996f0GEMeX7O8rcv5J81TnPzeFNZ9XoVLs%3D=0 >> <https://map/ >> server.org%2Finstallation%2Fiis.html=05%7C02%7Cmatt.lernout%40st >> a >> ntec.com%7C34322cf56ae745f61ae908dc27b617c5%7C413c6f2c219a469297d3f2b >> 4 >> d80281e7%7C0%7C0%7C638428910243098246%7CUnknown%7CTWFpbGZsb3d8eyJWIjo >> i >> MC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C0%7C%7C% >> 7 >> C=OIoWHSlKZJrXWspqwVfY5jhX4lzBcQuI%2Bw5IeOVtXBA%3D=0> >> >> A new config file was added to the filesystem and server Environment >> variables as per documented requirements added since 7.6.3, but >> having trouble validating any map arguments. All requests return the >> error "CGI variable "map" fails to validate" even though regexp >> should pass based on expression tests. >> >> Here is the full config file in use: >> >> CONFIG >>ENV >> MS_MAP_PATTERN "\.map$" >> PROJ_LIB "F:/MapServer/bin/proj7/SHARE" >> CURL_CA_BUNDLE "F:\MapServer\bin\curl\curl-ca-bundle.crt" >>END >> >> >>PLUGINS >> "mssql" "F:/MapServer/bin/ms/plugins/mssql2008/msplugin_mssql2008.dll" >> "oci" "F:/MapServer/bin/ms/plugins/oci/msplugin_oracle.dll" >>END >> END >> >> The current MS_MAP_PATTERN is just a simplified test to confirm 8.0.1 >> working before I update to the real regexp, and my understanding is >> it should map anything that ends in .map? But every map argument I >> throw in (including verified working arguments for 7.6.2) result in a >> failure to validate. Are there other crucial configurations missing >> that are necessary to pass validation? >> >> Thanks, >> >> Matt >> >> >> ___
Re: [MapServer-users] Why is Mapserver slower in Postgres 13 than in Postgres 11?
Resending this since it was too large the first time Thanks to everyone for their help so far. There are only 3 things that changed when we upgraded. One, the Postgres version, two, the PostGIS version and three, we went from Aurora serverless v1 to serverless v2. MapServer itself runs on Amazon ECS which in this case has 8 Fargate instances all running an identical version of MapServer in a Docker container. These instances are load balanced. The table in question has 3479 rows. I am not clear how to determine how many features it has. Is it one per row? My URLs look like https://mapserver.mydomain.org/?map=/path/to/my/mapfile.map I actually made two copies of the original map file and changed the config for where the MS_ERRORFILE should be written and added DEBUG 2. One of those copies had the CONNECTION string set to point at the old db. The extent listed in the map section of the .map file is EXTENT -11871597.4858696 2978893.85839647 -10409341.4604357 4369793.96473184 It does seem to zoom in a little as it loads, but I am not sure where it's getting the polygon information in the queries it's generating. I hit the two URLs again, and this time got a debug file from the .mapfile pointed at the old db that is 226 lines long and one from the one pointed at the new db that is almost 24,000 lines long. The map file for the new db has thousands of lines like this (as did the .map file pointed at the old db the 1st time I ran it): [Tue Feb 6 20:37:34 2024].128829 msPostGISLayerNextShape called. [Tue Feb 6 20:37:34 2024].128833 msPostGISReadShape called. [Tue Feb 6 20:37:34 2024].128838 msPostGISLayerNextShape called. [Tue Feb 6 20:37:34 2024].128842 msPostGISReadShape called. [Tue Feb 6 20:37:34 2024].129474 msPostGISLayerNextShape called. [Tue Feb 6 20:37:34 2024].129480 msPostGISReadShape called. The queries are the same for the new db as the were the last time I loaded the page although they occur in a different order for each. However, the .map file pointed at the old db had different values for the polygons and all the queries returned 0 rows, even though the map rendered was fine. To be clear, running either set in pgAdmin is much slower against the new db compared to the old. Additionally, the set of old queries which all return 0 results took less than 1 sec on the old db and about 15 on the new. Additinonally, I tried adding an index in the new db, but while it seems slightly faster, it still takes twice as long as the old db does without a spatial index. Here's what I ran: CREATE INDEX idx_the_table_in_question_geom ON the_table_in_question USING gist (geom); Thanks, Rob ___ MapServer-users mailing list MapServer-users@lists.osgeo.org https://lists.osgeo.org/mailman/listinfo/mapserver-users
Re: [MapServer-users] CGI variable "map" fails to validate
Hi Matthew, The CONFIG file I think is only reloaded when IIS or the Application Pool is restarted, so some changes to the regex may have been ignored. Do you have a sample request with the = parameter? Is there anything in a web.config file that could be stripping these out or modifying them? Seth -- web:https://geographika.net & https://mapserverstudio.net twitter: @geographika On Wed, Feb 7, 2024, at 5:33 PM, Lernout, Matthew via MapServer-users wrote: > MS_MAP_PATTERN '.' also results in the same failed validation error, > which is what makes me think the issue may be with another config > setting. '.' should match any input, right? > > Just to make sure my config file was being loaded, I commented out the > MS_MAP_PATTERN entry entirely, and got the error "msCGILoadMap(): Web > application error. Required configuration value MS_MAP_PATTERN not set." > > Matt > > -Original Message- > From: MapServer-users On > Behalf Of Jörg Thomsen (WhereGroup) via MapServer-users > Sent: Wednesday, February 7, 2024 3:24 AM > To: mapserver-users@lists.osgeo.org > Subject: Re: [MapServer-users] CGI variable "map" fails to validate > > [You don't often get email from mapserver-users@lists.osgeo.org. Learn > why this is important at https://aka.ms/LearnAboutSenderIdentification ] > > Hi, > > I'm not sure whether the pattern is correct. Shouldn't ist start with ^? > > Have yout tried > MS_MAP_PATTERN '.'? (not for production, just as a test) > > Jörg > > Am 06.02.24 um 20:12 schrieb Lernout, Matthew via MapServer-users: >> Hi, >> >> Having trouble making requests since updating to 8.0.1 from 7.6.2. >> Mapserver is running in IIS using FastCGI and the configuration steps >> from: >> https://maps/ >> erver.org%2Finstallation%2Fiis.html=05%7C02%7Cmatt.lernout%40stan >> tec.com%7C34322cf56ae745f61ae908dc27b617c5%7C413c6f2c219a469297d3f2b4d >> 80281e7%7C0%7C0%7C638428910243090792%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiM >> C4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C0%7C%7C%7C >> =dh%2BpgGwk5996f0GEMeX7O8rcv5J81TnPzeFNZ9XoVLs%3D=0 >> <https://map/ >> server.org%2Finstallation%2Fiis.html=05%7C02%7Cmatt.lernout%40sta >> ntec.com%7C34322cf56ae745f61ae908dc27b617c5%7C413c6f2c219a469297d3f2b4 >> d80281e7%7C0%7C0%7C638428910243098246%7CUnknown%7CTWFpbGZsb3d8eyJWIjoi >> MC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C0%7C%7C%7 >> C=OIoWHSlKZJrXWspqwVfY5jhX4lzBcQuI%2Bw5IeOVtXBA%3D=0> >> >> A new config file was added to the filesystem and server Environment >> variables as per documented requirements added since 7.6.3, but having >> trouble validating any map arguments. All requests return the error >> "CGI variable "map" fails to validate" even though regexp should pass >> based on expression tests. >> >> Here is the full config file in use: >> >> CONFIG >>ENV >> MS_MAP_PATTERN "\.map$" >> PROJ_LIB "F:/MapServer/bin/proj7/SHARE" >> CURL_CA_BUNDLE "F:\MapServer\bin\curl\curl-ca-bundle.crt" >>END >> >> >>PLUGINS >> "mssql" "F:/MapServer/bin/ms/plugins/mssql2008/msplugin_mssql2008.dll" >> "oci" "F:/MapServer/bin/ms/plugins/oci/msplugin_oracle.dll" >>END >> END >> >> The current MS_MAP_PATTERN is just a simplified test to confirm 8.0.1 >> working before I update to the real regexp, and my understanding is it >> should map anything that ends in .map? But every map argument I throw >> in (including verified working arguments for 7.6.2) result in a >> failure to validate. Are there other crucial configurations missing >> that are necessary to pass validation? >> >> Thanks, >> >> Matt >> >> >> ___ >> MapServer-users mailing list >> MapServer-users@lists.osgeo.org >> https://list/ >> s.osgeo.org%2Fmailman%2Flistinfo%2Fmapserver-users=05%7C02%7Cmatt >> .lernout%40stantec.com%7C34322cf56ae745f61ae908dc27b617c5%7C413c6f2c21 >> 9a469297d3f2b4d80281e7%7C0%7C0%7C638428910243105153%7CUnknown%7CTWFpbG >> Zsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0% >> 3D%7C0%7C%7C%7C=c%2BjBl2NTy%2BIZxCYZmp0CLwa2ujlD%2BC%2BfzzIQgXKw >> lyI%3D=0 > > -- > Viele Grüße, > Jörg Thomsen > > ****** > Aufwind durch Wissen! > Web-Seminare und Online-Schulungen > bei der http://www.foss-academy.com/ > ** > > > Jörg Thomsen > WhereGroup GmbH > Bundesal
Re: [MapServer-users] CGI variable "map" fails to validate
MS_MAP_PATTERN '.' also results in the same failed validation error, which is what makes me think the issue may be with another config setting. '.' should match any input, right? Just to make sure my config file was being loaded, I commented out the MS_MAP_PATTERN entry entirely, and got the error "msCGILoadMap(): Web application error. Required configuration value MS_MAP_PATTERN not set." Matt -Original Message----- From: MapServer-users On Behalf Of Jörg Thomsen (WhereGroup) via MapServer-users Sent: Wednesday, February 7, 2024 3:24 AM To: mapserver-users@lists.osgeo.org Subject: Re: [MapServer-users] CGI variable "map" fails to validate [You don't often get email from mapserver-users@lists.osgeo.org. Learn why this is important at https://aka.ms/LearnAboutSenderIdentification ] Hi, I'm not sure whether the pattern is correct. Shouldn't ist start with ^? Have yout tried MS_MAP_PATTERN '.'? (not for production, just as a test) Jörg Am 06.02.24 um 20:12 schrieb Lernout, Matthew via MapServer-users: > Hi, > > Having trouble making requests since updating to 8.0.1 from 7.6.2. > Mapserver is running in IIS using FastCGI and the configuration steps > from: > https://maps/ > erver.org%2Finstallation%2Fiis.html=05%7C02%7Cmatt.lernout%40stan > tec.com%7C34322cf56ae745f61ae908dc27b617c5%7C413c6f2c219a469297d3f2b4d > 80281e7%7C0%7C0%7C638428910243090792%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiM > C4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C0%7C%7C%7C > =dh%2BpgGwk5996f0GEMeX7O8rcv5J81TnPzeFNZ9XoVLs%3D=0 > <https://map/ > server.org%2Finstallation%2Fiis.html=05%7C02%7Cmatt.lernout%40sta > ntec.com%7C34322cf56ae745f61ae908dc27b617c5%7C413c6f2c219a469297d3f2b4 > d80281e7%7C0%7C0%7C638428910243098246%7CUnknown%7CTWFpbGZsb3d8eyJWIjoi > MC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C0%7C%7C%7 > C=OIoWHSlKZJrXWspqwVfY5jhX4lzBcQuI%2Bw5IeOVtXBA%3D=0> > > A new config file was added to the filesystem and server Environment > variables as per documented requirements added since 7.6.3, but having > trouble validating any map arguments. All requests return the error > "CGI variable "map" fails to validate" even though regexp should pass > based on expression tests. > > Here is the full config file in use: > > CONFIG >ENV > MS_MAP_PATTERN "\.map$" > PROJ_LIB "F:/MapServer/bin/proj7/SHARE" > CURL_CA_BUNDLE "F:\MapServer\bin\curl\curl-ca-bundle.crt" >END > > >PLUGINS > "mssql" "F:/MapServer/bin/ms/plugins/mssql2008/msplugin_mssql2008.dll" > "oci" "F:/MapServer/bin/ms/plugins/oci/msplugin_oracle.dll" >END > END > > The current MS_MAP_PATTERN is just a simplified test to confirm 8.0.1 > working before I update to the real regexp, and my understanding is it > should map anything that ends in .map? But every map argument I throw > in (including verified working arguments for 7.6.2) result in a > failure to validate. Are there other crucial configurations missing > that are necessary to pass validation? > > Thanks, > > Matt > > > ___ > MapServer-users mailing list > MapServer-users@lists.osgeo.org > https://list/ > s.osgeo.org%2Fmailman%2Flistinfo%2Fmapserver-users=05%7C02%7Cmatt > .lernout%40stantec.com%7C34322cf56ae745f61ae908dc27b617c5%7C413c6f2c21 > 9a469297d3f2b4d80281e7%7C0%7C0%7C638428910243105153%7CUnknown%7CTWFpbG > Zsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0% > 3D%7C0%7C%7C%7C=c%2BjBl2NTy%2BIZxCYZmp0CLwa2ujlD%2BC%2BfzzIQgXKw > lyI%3D=0 -- Viele Grüße, Jörg Thomsen ** Aufwind durch Wissen! Web-Seminare und Online-Schulungen bei der http://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.thom...@wheregroup.com http://www.wheregroup.com/ Geschäftsführer: Olaf Knopp, Peter Stamm Amtsgericht Bonn, HRB 9885 --- Folgen Sie der WhereGroup auf twitter: http://twitter.com/WhereGroup_com ___ MapServer-users mailing list MapServer-users@lists.osgeo.org https://lists.osgeo.org/mailman/listinfo/mapserver-users Caution: This email originated from outside of Stantec. Please take extra precaution. Attention: Ce courriel provient de l'extérieur de Stantec. Veuillez prendre des précautions supplémentaires. Atención: Este correo electrónico proviene de fuera de Stantec. Por favor, tome precauciones adicionales. ___ MapServer-users mailing list MapServer-users@lists.osgeo.org https://lists.osgeo.org/mailman/listinfo/mapserver-users
Re: [MapServer-users] Why is Mapserver slower in Postgres 13 than in Postgres 11?
Hi Rob, Are you using the same MapServer machine to make the queries? If the MapServer version, and dependencies are all identical then the generated SQL queries should also be identical. You wrote about "hitting the web page" - but if the requested extents are different then it is likely the client requests are different. Are you using WMS services? What do these requests look like? Also you mention 4 different layers, so I'd try testing them one by one - are they all generating different SQL and response times? Seth -- web:https://geographika.net & https://mapserverstudio.net twitter: @geographika On Tue, Feb 6, 2024, at 8:53 PM, Rob Dennett via MapServer-users wrote: > Both DBs are hosted on AWS Aurora. The old one is serverless v1 and the new > one is serverless v2. We were thinking that perhaps the geom column for my > table needed a spatial index even though the old db doesn't have one. Is > that possible? Also, would it make sense that the same query run on both > should take the same amount of time (roughly)? > > Thanks, > Rob > > > > > _______ > MapServer-users mailing list > MapServer-users@lists.osgeo.org > https://lists.osgeo.org/mailman/listinfo/mapserver-users > ___ MapServer-users mailing list MapServer-users@lists.osgeo.org https://lists.osgeo.org/mailman/listinfo/mapserver-users
Re: [MapServer-users] Why is Mapserver slower in Postgres 13 than in Postgres 11?
Hi, If spatial index is needed depends on the data. It is certainly needed when the table is large (million features or so) and requests typically cover a small area. If for example 1000 features gets selected it means that the spatial index can filter out 999 thousand features. If the table is small like one thousand features, then it is not so expensive to read everything without spatial filter. You are giving us little by little more information. I do not believe that the PostgreSQL 13 vs version 11 is the main thing at all. However, I do not have databases hosted on AWS and I can not make tests in the similar environment that you have. -Jukka Rahkonen- Lähettäjä: MapServer-users Puolesta Rob Dennett via MapServer-users Lähetetty: tiistai 6. helmikuuta 2024 21.53 Vastaanottaja: mapserver-users@lists.osgeo.org Aihe: Re: [MapServer-users] Why is Mapserver slower in Postgres 13 than in Postgres 11? Both DBs are hosted on AWS Aurora. The old one is serverless v1 and the new one is serverless v2. We were thinking that perhaps the geom column for my table needed a spatial index even though the old db doesn't have one. Is that possible? Also, would it make sense that the same query run on both should take the same amount of time (roughly)? Thanks, Rob ___ MapServer-users mailing list MapServer-users@lists.osgeo.org https://lists.osgeo.org/mailman/listinfo/mapserver-users
Re: [MapServer-users] Why is Mapserver slower in Postgres 13 than in Postgres 11?
Both DBs are hosted on AWS Aurora. The old one is serverless v1 and the new one is serverless v2. We were thinking that perhaps the geom column for my table needed a spatial index even though the old db doesn't have one. Is that possible? Also, would it make sense that the same query run on both should take the same amount of time (roughly)? Thanks, Rob ___ MapServer-users mailing list MapServer-users@lists.osgeo.org https://lists.osgeo.org/mailman/listinfo/mapserver-users
Re: [MapServer-users] CGI variable "map" fails to validate
Hi, This one that is slightly edited from the MS4W config file works for me MS_MAP_PATTERN "^(C:)?\/ms4w_data\/((?!\.{2})[_A-Za-z0-9\-\.]+\/{1})*([_A-Za-z0-9\-\.]+\.(map))$" I am not a regexp expert but it seems like a slash must be escaped with a backslash. -Jukka Rahkonen- Lähettäjä: MapServer-users Puolesta Lernout, Matthew via MapServer-users Lähetetty: tiistai 6. helmikuuta 2024 21.13 Vastaanottaja: mapserver-users@lists.osgeo.org Aihe: [MapServer-users] CGI variable "map" fails to validate Hi, Having trouble making requests since updating to 8.0.1 from 7.6.2. Mapserver is running in IIS using FastCGI and the configuration steps from: https://mapserver.org/installation/iis.html A new config file was added to the filesystem and server Environment variables as per documented requirements added since 7.6.3, but having trouble validating any map arguments. All requests return the error "CGI variable "map" fails to validate" even though regexp should pass based on expression tests. Here is the full config file in use: CONFIG ENV MS_MAP_PATTERN "\.map$" PROJ_LIB "F:/MapServer/bin/proj7/SHARE" CURL_CA_BUNDLE "F:\MapServer\bin\curl\curl-ca-bundle.crt" END PLUGINS "mssql" "F:/MapServer/bin/ms/plugins/mssql2008/msplugin_mssql2008.dll" "oci" "F:/MapServer/bin/ms/plugins/oci/msplugin_oracle.dll" END END The current MS_MAP_PATTERN is just a simplified test to confirm 8.0.1 working before I update to the real regexp, and my understanding is it should map anything that ends in .map? But every map argument I throw in (including verified working arguments for 7.6.2) result in a failure to validate. Are there other crucial configurations missing that are necessary to pass validation? Thanks, Matt ___ MapServer-users mailing list MapServer-users@lists.osgeo.org https://lists.osgeo.org/mailman/listinfo/mapserver-users
Re: [MapServer-users] Why is Mapserver slower in Postgres 13 than in Postgres 11?
Hi, I made a test with a PostGIS on my own laptop. My versions are: "POSTGIS=""3.4.1 3.4.1"" [EXTENSION] PGSQL=""160"" GEOS=""3.12.1-CAPI-1.18.1"" SFCGAL=""SFCGAL 1.5.0, CGAL 5.6, BOOST 1.78.0"" PROJ=""8.2.1 The polygon layer has 215000 lake polygons. My BBOX select 73 polygons. It takes 66 milliseconds. My query and the execution plan are as follows: select * from jarvinemo where "geom" && ST_GeomFromText( 'POLYGON (( 314728.6874003611 6936494.124854623, 314728.6874003611 6946067.332484153, 327290.0638853506 6946067.332484153, 327290.0638853506 6936494.124854623, 314728.6874003611 6936494.124854623 ))'); "Bitmap Heap Scan on jarvinemo (cost=4.58..155.40 rows=39 width=588) (actual time=0.048..0.076 rows=73 loops=1)" " Recheck Cond: (geom && '0103000100050059E1E5BFA23513413F9EFD87EB755A4159E1E5BFA23513419D6B47D5447F5A414E296B41E8F913419D6B47D5447F5A414E296B41E8F913413F9EFD87EB755A4159E1E5BFA23513413F9EFD87EB755A41'::geometry)" " Heap Blocks: exact=64" " -> Bitmap Index Scan on jarvinemo_geom_geom_idx (cost=0.00..4.58 rows=39 width=0) (actual time=0.039..0.039 rows=73 loops=1)" "Index Cond: (geom && '0103000100050059E1E5BFA23513413F9EFD87EB755A4159E1E5BFA23513419D6B47D5447F5A414E296B41E8F913419D6B47D5447F5A414E296B41E8F913413F9EFD87EB755A4159E1E5BFA23513413F9EFD87EB755A41'::geometry)" "Planning Time: 0.142 ms" "Execution Time: 0.106 ms" I can see that the bbox (POLYGON) in your query is big, something like 1500-2500 kilometres wide, and covers almost the whole EXTENT of your data. That means that the spatial filter is ineffective because it does not filter out anything. Have a try with a small polygon as a filter and compare the execution plan with the one that my database makes. That helps you to find out if the spatial index kicks in at some time. Of course, that does not help when the map covers the whole area. Then all the data must be read. But spending 5 seconds (the old db) or 15 seconds (the new db) for that as you have written before feels very slow. I wonder if the slowness comes from the connection to the database rather than from the database itself. It is some hosted database, cartodb perhaps by some logs that you have showed. Have you made any tests with a local db? -Jukka Rahkonen- Lähettäjä: MapServer-users Puolesta Rob Dennett via MapServer-users Lähetetty: tiistai 6. helmikuuta 2024 21.02 Vastaanottaja: mapserver-users@lists.osgeo.org Aihe: Re: [MapServer-users] Why is Mapserver slower in Postgres 13 than in Postgres 11? So, I ran explain analyze, and got different results when run against the old and new db. I ran VACUUM on the table (which ran in less than ½ a second) and checked the query plans again. They're now the same except for the time estimates and against the new db they're still much slower. We ran across a StackExchange article about performance degradation after upgrading to postgres 13 and postgis 3.4 (https://dba.stackexchange.com/questions/300292/why-is-my-spatial-query-slower-in-postgres-13-than-in-postgres-11) and they mention a change in the way postgis works, but since these queries are generated by mapserver, I am not sure what I can do on my end. Is there a version of MapServer that's recommended for Postgres 13/PostGIS 3? [https://cdn.sstatic.net/Sites/dba/Img/apple-touch-i...@2.png?v=246e2cb2439c]<https://dba.stackexchange.com/questions/300292/why-is-my-spatial-query-slower-in-postgres-13-than-in-postgres-11> Why is my spatial query slower in Postgres 13 than in Postgres 11?<https://dba.stackexchange.com/questions/300292/why-is-my-spatial-query-slower-in-postgres-13-than-in-postgres-11> Postgres versions PostgreSQL 13.2 on x86_64-pc-linux-musl, compiled by gcc (Alpine 10.2.1_pre1) 10.2.1 20201203, 64-bit PostgreSQL 11.11 (Debian 11.11-1.pgdg90+1) on x86_64-pc-linux-gnu, compiled ... dba.stackexchange.com From: Travis Kirstine mailto:traviskirst...@gmail.com>> Sent: Monday, February 5, 2024 10:50 AM To: Rob Dennett mailto:rob.denn...@twdb.texas.gov>> Cc: mapserver-users@lists.osgeo.org<mailto:mapserver-users@lists.osgeo.org> mailto:mapserver-users@lists.osgeo.org>> Subject: Re: [MapServer-users] Why is Mapserver slower in Postgres 13 than in Postgres 11? External: Beware of links/attachments. Not sure I understand the issue with the polygons. The polygon value in the select statement will change based on the client's view extent, for example if the users moves the map a new request with a different polygon / bbox would be issued to mapserver and through to postgres. The EXTENT value defined in the mapfile defines the extent of the map or layer coverage. I would try running EXPLAIN ANALYZE on the
[MapServer-users] CGI variable "map" fails to validate
Hi, Having trouble making requests since updating to 8.0.1 from 7.6.2. Mapserver is running in IIS using FastCGI and the configuration steps from: https://mapserver.org/installation/iis.html A new config file was added to the filesystem and server Environment variables as per documented requirements added since 7.6.3, but having trouble validating any map arguments. All requests return the error "CGI variable "map" fails to validate" even though regexp should pass based on expression tests. Here is the full config file in use: CONFIG ENV MS_MAP_PATTERN "\.map$" PROJ_LIB "F:/MapServer/bin/proj7/SHARE" CURL_CA_BUNDLE "F:\MapServer\bin\curl\curl-ca-bundle.crt" END PLUGINS "mssql" "F:/MapServer/bin/ms/plugins/mssql2008/msplugin_mssql2008.dll" "oci" "F:/MapServer/bin/ms/plugins/oci/msplugin_oracle.dll" END END The current MS_MAP_PATTERN is just a simplified test to confirm 8.0.1 working before I update to the real regexp, and my understanding is it should map anything that ends in .map? But every map argument I throw in (including verified working arguments for 7.6.2) result in a failure to validate. Are there other crucial configurations missing that are necessary to pass validation? Thanks, Matt ___ MapServer-users mailing list MapServer-users@lists.osgeo.org https://lists.osgeo.org/mailman/listinfo/mapserver-users
Re: [MapServer-users] Why is Mapserver slower in Postgres 13 than in Postgres 11?
So, I ran explain analyze, and got different results when run against the old and new db. I ran VACUUM on the table (which ran in less than ½ a second) and checked the query plans again. They're now the same except for the time estimates and against the new db they're still much slower. We ran across a StackExchange article about performance degradation after upgrading to postgres 13 and postgis 3.4 (https://dba.stackexchange.com/questions/300292/why-is-my-spatial-query-slower-in-postgres-13-than-in-postgres-11) and they mention a change in the way postgis works, but since these queries are generated by mapserver, I am not sure what I can do on my end. Is there a version of MapServer that's recommended for Postgres 13/PostGIS 3? [https://cdn.sstatic.net/Sites/dba/Img/apple-touch-i...@2.png?v=246e2cb2439c]<https://dba.stackexchange.com/questions/300292/why-is-my-spatial-query-slower-in-postgres-13-than-in-postgres-11> Why is my spatial query slower in Postgres 13 than in Postgres 11?<https://dba.stackexchange.com/questions/300292/why-is-my-spatial-query-slower-in-postgres-13-than-in-postgres-11> Postgres versions PostgreSQL 13.2 on x86_64-pc-linux-musl, compiled by gcc (Alpine 10.2.1_pre1) 10.2.1 20201203, 64-bit PostgreSQL 11.11 (Debian 11.11-1.pgdg90+1) on x86_64-pc-linux-gnu, compiled ... dba.stackexchange.com From: Travis Kirstine Sent: Monday, February 5, 2024 10:50 AM To: Rob Dennett Cc: mapserver-users@lists.osgeo.org Subject: Re: [MapServer-users] Why is Mapserver slower in Postgres 13 than in Postgres 11? External: Beware of links/attachments. Not sure I understand the issue with the polygons. The polygon value in the select statement will change based on the client's view extent, for example if the users moves the map a new request with a different polygon / bbox would be issued to mapserver and through to postgres. The EXTENT value defined in the mapfile defines the extent of the map or layer coverage. I would try running EXPLAIN ANALYZE on the same query on both versions of Postgres and see what the differences are. explain analyze select "sourceid"::text,"featuretyp"::text,"cartodb_id"::text,"name"::text,"sourcetype"::text,"drawingord"::text,"isnew"::text,ST_AsBinary(("geom"),'NDR') as geom,"cartodb_id"::text from the_table_in_question where "geom" && ST_GeomFromText('POLYGON((-12520996.7293382 2507134.52775378,-12520996.7293382 3754586.82936786,-11273544.4277241 3754586.82936786,-11273544.4277241 2507134.52775378,-12520996.7293382 2507134.52775378))',find_srid('','iswp_sourcefeatures2022','geom')) and ("featuretyp"::text = 'polygon') ___ MapServer-users mailing list MapServer-users@lists.osgeo.org https://lists.osgeo.org/mailman/listinfo/mapserver-users
Re: [MapServer-users] Security and LDAP with mapservet
G. Völkl via MapServer-users: > Hello, > > I want to create some WMS Services which can be only accessed by some Special > Users. > > Is it possible to Secure wms Services? Is it possible to use LDAP. > > Best regards Gerhard > Von meinem iPhone gesendet You can secure Mapserver WMS using whatever webserver you are exposing them through, be it NGINX og Apache (0). I know Apache supports ldap (1) and I would guess NGINX does to. If you expose Mapserver WMS through mapscript, you can handle authn/authz inside your mapscript-code. (0) https://httpd.apache.org/docs/2.4/howto/auth.html (1) https://httpd.apache.org/docs/2.4/mod/mod_ldap.html -- BEst regards Bjørn Ove Grøtan ___ MapServer-users mailing list MapServer-users@lists.osgeo.org https://lists.osgeo.org/mailman/listinfo/mapserver-users
[MapServer-users] Security and LDAP with mapservet
Hello, I want to create some WMS Services which can be only accessed by some Special Users. Is it possible to Secure wms Services? Is it possible to use LDAP. Best regards Gerhard Von meinem iPhone gesendet ___ MapServer-users mailing list MapServer-users@lists.osgeo.org https://lists.osgeo.org/mailman/listinfo/mapserver-users
Re: [MapServer-users] Why is Mapserver slower in Postgres 13 than in Postgres 11?
Not sure I understand the issue with the polygons. The polygon value in the select statement will change based on the client's view extent, for example if the users moves the map a new request with a different polygon / bbox would be issued to mapserver and through to postgres. The EXTENT value defined in the mapfile defines the extent of the map or layer coverage. I would try running EXPLAIN ANALYZE on the same query on both versions of Postgres and see what the differences are. explain analyze select "sourceid"::text,"featuretyp"::text,"cartodb_id"::text,"name"::text,"sourcetype"::text,"drawingord"::text,"isnew"::text,ST_AsBinary(("geom"),'NDR') as geom,"cartodb_id"::text from the_table_in_question where "geom" && ST_GeomFromText('POLYGON((-12520996.7293382 2507134.52775378,-12520996.7293382 3754586.82936786,-11273544.4277241 3754586.82936786,-11273544.4277241 2507134.52775378,-12520996.7293382 2507134.52775378))',find_srid('','iswp_sourcefeatures2022','geom')) and ("featuretyp"::text = 'polygon') On Mon, 5 Feb 2024 at 10:35, Rob Dennett via MapServer-users < mapserver-users@lists.osgeo.org> wrote: > So, looking at this further, this is the bounding box for what's happening > is that when pointed at the old db, the .map file is making the calls using > these coordinates > > -12520996.7293382 2507134.52775378,-12520996.7293382 > 3754586.82936786,-11273544.4277241 3754586.82936786,-11273544.4277241 > 2507134.52775378,-12520996.7293382 2507134.52775378 > > and then again with these > > -12518550.744433 2509580.51265891,-12518550.744433 > 5004485.11588706,-10023646.1412049 5004485.11588706,-10023646.1412049 > 2509580.51265891,-12518550.744433 2509580.51265891 > > When pointed at the new db (which does indeed have identical data and > structure), the polygons are > > -11268652.4579138 2507134.52775378,-11268652.4579138 > 3754586.82936786,-10021200.1562997 3754586.82936786,-10021200.1562997 > 2507134.52775378,-11268652.4579138 2507134.52775378 > > and > > -12068252.5062205 2978893.85839647,-12068252.5062205 > 4369793.96473184,-10212686.4400848 4369793.96473184,-10212686.4400848 > 2978893.85839647,-12068252.5062205 2978893.85839647 > > I have no idea where these polygons are coming from, nor do I understand > why they are different when pointed at the old vs. new db nor why the > queries are called in a different order. The .map file has a line defining > the extent: > > EXTENT -11871597.4858696 2978893.85839647 -10409341.4604357 > 4369793.96473184 > > but that doesn't match up with these polygons. The new polygons appear to > be a bit smaller than the old ones, if I understand correctly. Does anyone > know why I am seeing what I am seeing? > > Thanks, > Rob > -- > *From:* Rahkonen Jukka > *Sent:* Monday, February 5, 2024 1:25 AM > *To:* Rob Dennett ; > mapserver-users@lists.osgeo.org > *Subject:* Re: [MapServer-users] Why is Mapserver slower in Postgres 13 > than in Postgres 11? > > > External: Beware of links/attachments. > > > Hi, > > > > See https://mapserver.org/input/vector/postgis.html, there is an example > about how to define the SRID on the DATA line: > DATA "the_geom from the_database using unique gid using srid=4326" > > > > The SRID value to use is the native SRID of the PostGIS table. > > What Mapserver does here is that with “&&” operator it selects those > features from the table which intersect with the reference geometry and > because of that it needs to know the SRID of the table. The reference > geometry (POLYGON) is either the BBOX of the request or the EXTENT used in > the mapfile, I cannot say for sure with this information. I believe that > find_srid is rather fast but it is good to include “using srid=” anyway. > Adding “unique” for defining the primary key of the table cannot make any > harm either. > > You wrote “There are 8 select statements in each, but the statements > aren't the same” and then you showed one of the statements. It would help > to see also the other statement. But if the tables have the same data and > the output from the new db is much larger, and there is no other filter in > the SQL query than the &&, then I quess that the reference polygon of the > latter case is bigger for some reason. > > > > -Jukka Rahkonen- > > > > *Lähettäjä:* MapServer-users > *Puolesta > *Rob Dennett via MapServer-users > *Lähetetty:* maanantai 5. helmikuuta 2024 2.54 > *Vastaanottaja:* mapserver-users@lists.osgeo.org > *Aihe:* Re: [MapServer-users] Why is Mapserver slower in Postgres 13 than > in Postgres
Re: [MapServer-users] Why is Mapserver slower in Postgres 13 than in Postgres 11?
So, looking at this further, this is the bounding box for what's happening is that when pointed at the old db, the .map file is making the calls using these coordinates -12520996.7293382 2507134.52775378,-12520996.7293382 3754586.82936786,-11273544.4277241 3754586.82936786,-11273544.4277241 2507134.52775378,-12520996.7293382 2507134.52775378 and then again with these -12518550.744433 2509580.51265891,-12518550.744433 5004485.11588706,-10023646.1412049 5004485.11588706,-10023646.1412049 2509580.51265891,-12518550.744433 2509580.51265891 When pointed at the new db (which does indeed have identical data and structure), the polygons are -11268652.4579138 2507134.52775378,-11268652.4579138 3754586.82936786,-10021200.1562997 3754586.82936786,-10021200.1562997 2507134.52775378,-11268652.4579138 2507134.52775378 and -12068252.5062205 2978893.85839647,-12068252.5062205 4369793.96473184,-10212686.4400848 4369793.96473184,-10212686.4400848 2978893.85839647,-12068252.5062205 2978893.85839647 I have no idea where these polygons are coming from, nor do I understand why they are different when pointed at the old vs. new db nor why the queries are called in a different order. The .map file has a line defining the extent: EXTENT -11871597.4858696 2978893.85839647 -10409341.4604357 4369793.96473184 but that doesn't match up with these polygons. The new polygons appear to be a bit smaller than the old ones, if I understand correctly. Does anyone know why I am seeing what I am seeing? Thanks, Rob From: Rahkonen Jukka Sent: Monday, February 5, 2024 1:25 AM To: Rob Dennett ; mapserver-users@lists.osgeo.org Subject: Re: [MapServer-users] Why is Mapserver slower in Postgres 13 than in Postgres 11? External: Beware of links/attachments. Hi, See https://mapserver.org/input/vector/postgis.html, there is an example about how to define the SRID on the DATA line: DATA "the_geom from the_database using unique gid using srid=4326" The SRID value to use is the native SRID of the PostGIS table. What Mapserver does here is that with “&&” operator it selects those features from the table which intersect with the reference geometry and because of that it needs to know the SRID of the table. The reference geometry (POLYGON) is either the BBOX of the request or the EXTENT used in the mapfile, I cannot say for sure with this information. I believe that find_srid is rather fast but it is good to include “using srid=” anyway. Adding “unique” for defining the primary key of the table cannot make any harm either. You wrote “There are 8 select statements in each, but the statements aren't the same” and then you showed one of the statements. It would help to see also the other statement. But if the tables have the same data and the output from the new db is much larger, and there is no other filter in the SQL query than the &&, then I quess that the reference polygon of the latter case is bigger for some reason. -Jukka Rahkonen- Lähettäjä: MapServer-users mailto:mapserver-users-boun...@lists.osgeo.org>> Puolesta Rob Dennett via MapServer-users Lähetetty: maanantai 5. helmikuuta 2024 2.54 Vastaanottaja: mapserver-users@lists.osgeo.org<mailto:mapserver-users@lists.osgeo.org> Aihe: Re: [MapServer-users] Why is Mapserver slower in Postgres 13 than in Postgres 11? I don't think so. These queries are generated somehow. Here's what the PolygonSources layer looks like, and as you can see, the query I am specifying is just "geom from the_table_in_question": LAYER NAME "PolygonSources" CONNECTIONTYPE POSTGIS CONNECTION "xx" TYPE POLYGON STATUS ON DATA "geom FROM the_table_in_question" UTFITEM "cartodb_id" UTFDATA "{\"cartodb_id\":\"[cartodb_id]\",\"sourceid\":\"[sourceid]\",\"name\":\"[name]\",\"sourcetype\":\"[sourcetype]\",\"drawingord\":\"[drawingord]\",\"featuretyp\":\"[featuretyp]\",\"isnew\":\"[isnew]\"}" TEMPLATE WMSGetFeatureInfo FILTERITEM "featuretyp" CLASSITEM "sourceid" FILTER "polygon" CLASS NAME "polygon" EXPRESSION ([sourceid] != 169 AND [sourceid] != 412 AND [sourceid] != 820 AND [sourceid] != 1067) STYLE COLOR "#0B3A71B3" OUTLINECOLOR "#AFBFD0B3" OUTLINEWIDTH1.5 END END METADATA "wms_title" "Polygon Source Features" "wms_include_items" "all" "wms_abstract" "Layer of all polygon geometry sources." "wfs_title" "Polygon Source Features" "wfs_srs" "
[MapServer-users] Geos segfault error under certain conditions
Hello All! Under certain conditions I get a strange error: The combination of spatil geometry, style of class in map and bbox in WMS request - leads to the libgeos segmentation error. All files of Example adding to email: * bug_json.map * geodata_bug.geojson * mapfile_web.py * mapstyle_for_7_0_4.zip Run this: python3 mapfile_web.py bug_json.map Passed WMS request: http://localhost:3007/?SERVICE=WMS=1.3.0=GetMap=3032662.425975159276,5637758.341410524212,3340530.939469947945,5864962.737246668898=EPSG:3857=1103=814=good=image/png Failed WMS request: http://localhost:3007/?SERVICE=WMS=1.3.0=GetMap=3032662.425975159276,5637758.341410524212,3340530.939469947945,5864962.737246668898=EPSG:3857=1103=814=bad=image/png Reproduction conditions of error: * mapserver & python3-mapscript v7.6.4, v7.6.5 (manual package), geos v3.5.1 (repository package) - OS linux debian 9 * mapserver & python3-mapscript v7.6.2 (repository package), geos v3.9.0 (repository package) - OS linux debian 11 Error message before segafoult: python3: geos_ts_c.cpp:3742: int GEOSCoordSeq_getOrdinate_r(GEOSContextHandle_t, const geos::geom::CoordinateSequence*, unsigned int, unsigned int, double*): Assertion `0 != cs' failed. The error does not cause segfault in mapserver v7.0.4,(repository package) geos v3.5.1 (repository package) - OS linux debian 9: Run this (mapstyle & shp files in mapstyle_for_7_0_4.zip): python3 mapfile_web.py bug_shp.map All WMS requests from the example above. Error message don't segafoult - all WMS query (rendering passed): OWSDispatch Error: msGEOSError(): GEOS library error. (message repeated 1 times) P.S: Are there any recommendations or patches for mapserver 7.6.*(Preferably) - what to do with this problem? Baev Alexandr old...@bk.ru bug_json.map Description: application/navimap geodata_bug.geojson Description: application/geo mapfile_web.py Description: application/python <> ___ MapServer-users mailing list MapServer-users@lists.osgeo.org https://lists.osgeo.org/mailman/listinfo/mapserver-users
Re: [MapServer-users] Why is Mapserver slower in Postgres 13 than in Postgres 11?
Hi, See https://mapserver.org/input/vector/postgis.html, there is an example about how to define the SRID on the DATA line: DATA "the_geom from the_database using unique gid using srid=4326" The SRID value to use is the native SRID of the PostGIS table. What Mapserver does here is that with “&&” operator it selects those features from the table which intersect with the reference geometry and because of that it needs to know the SRID of the table. The reference geometry (POLYGON) is either the BBOX of the request or the EXTENT used in the mapfile, I cannot say for sure with this information. I believe that find_srid is rather fast but it is good to include “using srid=” anyway. Adding “unique” for defining the primary key of the table cannot make any harm either. You wrote “There are 8 select statements in each, but the statements aren't the same” and then you showed one of the statements. It would help to see also the other statement. But if the tables have the same data and the output from the new db is much larger, and there is no other filter in the SQL query than the &&, then I quess that the reference polygon of the latter case is bigger for some reason. -Jukka Rahkonen- Lähettäjä: MapServer-users mailto:mapserver-users-boun...@lists.osgeo.org>> Puolesta Rob Dennett via MapServer-users Lähetetty: maanantai 5. helmikuuta 2024 2.54 Vastaanottaja: mapserver-users@lists.osgeo.org<mailto:mapserver-users@lists.osgeo.org> Aihe: Re: [MapServer-users] Why is Mapserver slower in Postgres 13 than in Postgres 11? I don't think so. These queries are generated somehow. Here's what the PolygonSources layer looks like, and as you can see, the query I am specifying is just "geom from the_table_in_question": LAYER NAME "PolygonSources" CONNECTIONTYPE POSTGIS CONNECTION "xx" TYPE POLYGON STATUS ON DATA "geom FROM the_table_in_question" UTFITEM "cartodb_id" UTFDATA "{\"cartodb_id\":\"[cartodb_id]\",\"sourceid\":\"[sourceid]\",\"name\":\"[name]\",\"sourcetype\":\"[sourcetype]\",\"drawingord\":\"[drawingord]\",\"featuretyp\":\"[featuretyp]\",\"isnew\":\"[isnew]\"}" TEMPLATE WMSGetFeatureInfo FILTERITEM "featuretyp" CLASSITEM "sourceid" FILTER "polygon" CLASS NAME "polygon" EXPRESSION ([sourceid] != 169 AND [sourceid] != 412 AND [sourceid] != 820 AND [sourceid] != 1067) STYLE COLOR "#0B3A71B3" OUTLINECOLOR "#AFBFD0B3" OUTLINEWIDTH1.5 END END METADATA "wms_title" "Polygon Source Features" "wms_include_items" "all" "wms_abstract" "Layer of all polygon geometry sources." "wfs_title" "Polygon Source Features" "wfs_srs" "EPSG:3857 EPSG:4326" "wfs_enable_request" "*" "wfs_abstract" "Layer of all polygon geometry sources." "gml_include_items" "all" "gml_featureid" "cartodb_id" END PROJECTION "init=epsg:3857" END PROCESSING "CLOSE_CONNECTION=DEFER" END From: James Gardner mailto:j...@internode.on.net>> Sent: Sunday, February 4, 2024 6:44 PM To: Rob Dennett mailto:rob.denn...@twdb.texas.gov>> Cc: Travis Kirstine mailto:traviskirst...@gmail.com>>; mapserver-users@lists.osgeo.org<mailto:mapserver-users@lists.osgeo.org> mailto:mapserver-users@lists.osgeo.org>> Subject: Re: [MapServer-users] Why is Mapserver slower in Postgres 13 than in Postgres 11? External: Beware of links/attachments. Could you try replacing find_srid with a hard coded srid... I found it had to run find_srid on every tuple... -James Gardner ___ MapServer-users mailing list MapServer-users@lists.osgeo.org https://lists.osgeo.org/mailman/listinfo/mapserver-users
Re: [MapServer-users] Why is Mapserver slower in Postgres 13 than in Postgres 11?
I don't think so. These queries are generated somehow. Here's what the PolygonSources layer looks like, and as you can see, the query I am specifying is just "geom from the_table_in_question": LAYER NAME "PolygonSources" CONNECTIONTYPE POSTGIS CONNECTION "xx" TYPE POLYGON STATUS ON DATA "geom FROM the_table_in_question" UTFITEM "cartodb_id" UTFDATA "{\"cartodb_id\":\"[cartodb_id]\",\"sourceid\":\"[sourceid]\",\"name\":\"[name]\",\"sourcetype\":\"[sourcetype]\",\"drawingord\":\"[drawingord]\",\"featuretyp\":\"[featuretyp]\",\"isnew\":\"[isnew]\"}" TEMPLATE WMSGetFeatureInfo FILTERITEM "featuretyp" CLASSITEM "sourceid" FILTER "polygon" CLASS NAME "polygon" EXPRESSION ([sourceid] != 169 AND [sourceid] != 412 AND [sourceid] != 820 AND [sourceid] != 1067) STYLE COLOR "#0B3A71B3" OUTLINECOLOR "#AFBFD0B3" OUTLINEWIDTH1.5 END END METADATA "wms_title" "Polygon Source Features" "wms_include_items" "all" "wms_abstract" "Layer of all polygon geometry sources." "wfs_title" "Polygon Source Features" "wfs_srs" "EPSG:3857 EPSG:4326" "wfs_enable_request" "*" "wfs_abstract" "Layer of all polygon geometry sources." "gml_include_items" "all" "gml_featureid" "cartodb_id" END PROJECTION "init=epsg:3857" END PROCESSING "CLOSE_CONNECTION=DEFER" END ____ From: James Gardner Sent: Sunday, February 4, 2024 6:44 PM To: Rob Dennett Cc: Travis Kirstine ; mapserver-users@lists.osgeo.org Subject: Re: [MapServer-users] Why is Mapserver slower in Postgres 13 than in Postgres 11? External: Beware of links/attachments. Could you try replacing find_srid with a hard coded srid... I found it had to run find_srid on every tuple... -James Gardner On 5 Feb 2024 5:39 am, Rob Dennett via MapServer-users wrote: Running select * from pg_indexes where tablename like '%the_table_in_question%' yields the same results for both the old and new dbs. As mentioned, the mapserver debug output is very different from the old and new db are very different, even though the .map files are identical except for the connection string. There are 8 select statements in each, but the statements aren't the same and the output from the new db is twice as large, about 1.9MB, as the old one. I compiled the queries each one runs and ran them as a group against both dbs. The old db ran both sets of queries in about 5 seconds each, whereas the new db ran the new set in about 15 seconds and the old set in about 10 seconds. I haven't yet run VACUUM on the new db, and will be doing so I Monday, but I am just as confused as to why the debug output would be so different. Can anyone shed some light on that? Thanks, Rob From: Travis Kirstine Sent: Sunday, February 4, 2024 10:18 AM To: Rob Dennett Cc: mapserver-users@lists.osgeo.org Subject: Re: [MapServer-users] Why is Mapserver slower in Postgres 13 than in Postgres 11? External: Beware of links/attachments. First thought is to check if the table has a spatial index. https://postgis.net/workshops/postgis-intro/indexing.html On Fri, 2 Feb 2024 at 18:37, Rob Dennett via MapServer-users mailto:mapserver-users@lists.osgeo.org>> wrote: I recently upgraded our db for our Mapserver from Postgres 11 to Postgres 13 and also had to update Postgis from 2.4 to 3.4, as well as remove the postgis 2.4 raster queries and add the new postgis_raster extension. Now I have web request which takes over 30 seconds where it used to take about 2. I made copies of the .map file and question and pointed one at the old db and set the debug level for the map to 2 for both. These .map files were created by someone who no longer works here and I am not a GIS professional, just a software developer, so I am having trouble understanding the output. After hitting the web page for both, I see the debug file is twice as large for the new db as it was for the old one. The .map file has 4 layers, three of which have a status of on, one for polygons, one for lines and one for point and one called "AllSources" (which is off). For the first 3, they contain DATA "geom from the_table_in_question" which is a field of type geometry. In the logs I see lines like select "sourceid"::text,"featuretyp"::text,"cartod
Re: [MapServer-users] Why is Mapserver slower in Postgres 13 than in Postgres 11?
Could you try replacing find_srid with a hard coded srid... I found it had to run find_srid on every tuple...-James GardnerOn 5 Feb 2024 5:39 am, Rob Dennett via MapServer-users wrote: Running select * from pg_indexes where tablename like '%the_table_in_question%' yields the same results for both the old and new dbs. As mentioned, the mapserver debug output is very different from the old and new db are very different, even though the .map files are identical except for the connection string. There are 8 select statements in each, but the statements aren't the same and the output from the new db is twice as large, about 1.9MB, as the old one. I compiled the queries each one runs and ran them as a group against both dbs. The old db ran both sets of queries in about 5 seconds each, whereas the new db ran the new set in about 15 seconds and the old set in about 10 seconds. I haven't yet run VACUUM on the new db, and will be doing so I Monday, but I am just as confused as to why the debug output would be so different. Can anyone shed some light on that? Thanks, Rob From: Travis Kirstine Sent: Sunday, February 4, 2024 10:18 AM To: Rob Dennett Cc: mapserver-users@lists.osgeo.org Subject: Re: [MapServer-users] Why is Mapserver slower in Postgres 13 than in Postgres 11? External: Beware of links/attachments. First thought is to check if the table has a spatial index. https://postgis.net/workshops/postgis-intro/indexing.html On Fri, 2 Feb 2024 at 18:37, Rob Dennett via MapServer-users <mapserver-users@lists.osgeo.org> wrote: I recently upgraded our db for our Mapserver from Postgres 11 to Postgres 13 and also had to update Postgis from 2.4 to 3.4, as well as remove the postgis 2.4 raster queries and add the new postgis_raster extension. Now I have web request which takes over 30 seconds where it used to take about 2. I made copies of the .map file and question and pointed one at the old db and set the debug level for the map to 2 for both. These .map files were created by someone who no longer works here and I am not a GIS professional, just a software developer, so I am having trouble understanding the output. After hitting the web page for both, I see the debug file is twice as large for the new db as it was for the old one. The .map file has 4 layers, three of which have a status of on, one for polygons, one for lines and one for point and one called "AllSources" (which is off). For the first 3, they contain DATA "geom from the_table_in_question" which is a field of type geometry. In the logs I see lines like select "sourceid"::text,"featuretyp"::text,"cartodb_id"::text,"name"::text,"sourcetype"::text,"drawingord"::text,"isnew"::text,ST_AsBinary(("geom"),'NDR') as geom,"cartodb_id"::text from the_table_in_question where "geom" && ST_GeomFromText('POLYGON((-12520996.7293382 2507134.52775378,-12520996.7293382 3754586.82936786,-11273544.4277241 3754586.82936786,-11273544.4277241 2507134.52775378,-12520996.7293382 2507134.52775378))',find_srid('','iswp_sourcefeatures2022','geom')) and ("featuretyp"::text = 'polygon') There are 8 of these in each output file, but their contents don't match. I am not sure what's generating them. I do note that they, along with SELECT geom from ...; statements take roughly equal time whether executed against the old db or the new one. What is generating these log statements? Why does what is for all intents and purposes the same .map file produce different output? I know it's because I changed the db engine and postgis, but if you could be more specific, that would be very helpful. Thanks, Rob ___ MapServer-users mailing list MapServer-users@lists.osgeo.org https://lists.osgeo.org/mailman/listinfo/mapserver-users ___ MapServer-users mailing list MapServer-users@lists.osgeo.org https://lists.osgeo.org/mailman/listinfo/mapserver-users