From iljya.kalai at gmail.com Wed Feb 3 09:54:33 2021 From: iljya.kalai at gmail.com (Iljya Kalai) Date: Wed, 3 Feb 2021 18:54:33 +0100 Subject: [mapserver-users] Selecting data from multiple OGR layers Message-ID: Hi everyone, I'm trying to select data from multiple OGR layers and style them based on the source layer, as well as some attributes that are not common to all layers. I discovered the UNION layer which seems to be the answer. According to the documentation the source layer name should be in the [Combine_SourceLayerName] attribute. However, I get this error when I try to use it: msOGRLayerInitItemInfo(): OGR error. Invalid Field name: Combine_SourceLayerName in layer `LAYER1' (I also tried [Union:SourceLayerName] which I found in the mapunion.c code , but that gives the same error.) Map file snippet: LAYER NAME "U" STATUS DEFAULT CONNECTIONTYPE UNION CONNECTION "LAYER1,LAYER2" CLASS NAME "C1" EXPRESSION ("[Combine_SourceLayerName]" = "LAYER1") ... Any ideas? Thanks! Iljya P.S I'm new here! -------------- next part -------------- An HTML attachment was scrubbed... URL: From szekerest at gmail.com Wed Feb 3 10:16:04 2021 From: szekerest at gmail.com (Tamas Szekeres) Date: Wed, 3 Feb 2021 19:16:04 +0100 Subject: [mapserver-users] Selecting data from multiple OGR layers In-Reply-To: References: Message-ID: Iljya, You might probably try Union_SourceLayerName as the attribute name. Best regards, Tamas Iljya Kalai ezt ?rta (id?pont: 2021. febr. 3., Sze, 18:54): > Hi everyone, > > I'm trying to select data from multiple OGR layers and style them based on > the source layer, as well as some attributes that are not common to all > layers. > > I discovered the UNION layer > which seems to be the > answer. According to the documentation > the source layer name > should be in the [Combine_SourceLayerName] attribute. However, I get this > error when I try to use it: > > msOGRLayerInitItemInfo(): OGR error. Invalid Field name: > Combine_SourceLayerName in layer `LAYER1' > > (I also tried [Union:SourceLayerName] which I found in the mapunion.c > code > , > but that gives the same error.) > > Map file snippet: > > LAYER > NAME "U" > STATUS DEFAULT > CONNECTIONTYPE UNION > CONNECTION "LAYER1,LAYER2" > CLASS > NAME "C1" > EXPRESSION ("[Combine_SourceLayerName]" = "LAYER1") > ... > > Any ideas? > > Thanks! > Iljya > P.S I'm new here! > _______________________________________________ > mapserver-users mailing list > mapserver-users at lists.osgeo.org > https://lists.osgeo.org/mailman/listinfo/mapserver-users > -------------- next part -------------- An HTML attachment was scrubbed... URL: From jmckenna at gatewaygeomatics.com Wed Feb 3 13:58:22 2021 From: jmckenna at gatewaygeomatics.com (Jeff McKenna) Date: Wed, 3 Feb 2021 17:58:22 -0400 Subject: [mapserver-users] Selecting data from multiple OGR layers In-Reply-To: References: Message-ID: Thanks Iljya and Tamas, I have confirmed that the documentation was outdated, and has now been fixed as recommended by Tamas. Iljya: I tested successfully with: EXPRESSION ("[Union_SourceLayerName]" = "LAYER1") and welcome to the MapServer community! :) -jeff -- Jeff McKenna GatewayGeo: MapServer Consulting and Training Services co-founder of FOSS4G http://gatewaygeo.com/ On 2021-02-03 2:16 p.m., Tamas Szekeres wrote: > Iljya, > > You might probably try Union_SourceLayerName as the attribute name. > > Best regards, > > Tamas > > > > > Iljya Kalai > ezt > ?rta (id?pont: 2021. febr. 3., Sze, 18:54): > > Hi everyone, > > I'm trying to select data from multiple OGR layers and style them > based on the source layer, as well as some attributes that are not > common to all layers. > > I discovered the UNION layer > ?which seems to be > the answer. According to the documentation > ?the source layer > name should be in the [Combine_SourceLayerName]?attribute. However, > I get this error when I try to use it: > > ? ?msOGRLayerInitItemInfo(): OGR error. Invalid Field name: > Combine_SourceLayerName in layer `LAYER1' > > ?(I also tried [Union:SourceLayerName] which I found in the > mapunion.c code > , > but that gives the same error.) > > Map file snippet: > > LAYER > ? ? NAME "U" > ? ? STATUS DEFAULT > ? ? CONNECTIONTYPE UNION > ? ? CONNECTION "LAYER1,LAYER2" > ? ? CLASS > ? ? ? ?NAME "C1" > ? ? ? ?EXPRESSION ("[Combine_SourceLayerName]" = "LAYER1") > ? ? ? ?... > > Any ideas? > > Thanks! > Iljya > P.S I'm new here! From iljya.kalai at gmail.com Wed Feb 3 23:18:04 2021 From: iljya.kalai at gmail.com (Iljya Kalai) Date: Thu, 4 Feb 2021 08:18:04 +0100 Subject: [mapserver-users] Selecting data from multiple OGR layers In-Reply-To: References: Message-ID: This worked - thank you! I was going to update the documentation, but by the time I woke up, Jeff had beat me to it :) Em qua., 3 de fev. de 2021 ?s 19:16, Tamas Szekeres escreveu: > Iljya, > > You might probably try Union_SourceLayerName as the attribute name. > > Best regards, > > Tamas > > > > > Iljya Kalai ezt ?rta (id?pont: 2021. febr. 3., > Sze, 18:54): > >> Hi everyone, >> >> I'm trying to select data from multiple OGR layers and style them based >> on the source layer, as well as some attributes that are not common to all >> layers. >> >> I discovered the UNION layer >> which seems to be the >> answer. According to the documentation >> the source layer name >> should be in the [Combine_SourceLayerName] attribute. However, I get >> this error when I try to use it: >> >> msOGRLayerInitItemInfo(): OGR error. Invalid Field name: >> Combine_SourceLayerName in layer `LAYER1' >> >> (I also tried [Union:SourceLayerName] which I found in the mapunion.c >> code >> , >> but that gives the same error.) >> >> Map file snippet: >> >> LAYER >> NAME "U" >> STATUS DEFAULT >> CONNECTIONTYPE UNION >> CONNECTION "LAYER1,LAYER2" >> CLASS >> NAME "C1" >> EXPRESSION ("[Combine_SourceLayerName]" = "LAYER1") >> ... >> >> Any ideas? >> >> Thanks! >> Iljya >> P.S I'm new here! >> _______________________________________________ >> mapserver-users mailing list >> mapserver-users at lists.osgeo.org >> https://lists.osgeo.org/mailman/listinfo/mapserver-users >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From jmckenna at gatewaygeomatics.com Sat Feb 6 07:18:29 2021 From: jmckenna at gatewaygeomatics.com (Jeff McKenna) Date: Sat, 6 Feb 2021 11:18:29 -0400 Subject: [mapserver-users] Please add your site/services to the MapServer gallery Message-ID: Reminder: New and potential MapServer users really like to see working examples of MapServer applications (and MapServer-driven WMS/WFS/OGC services) listed on our map gallery. Please take a minute to add your site and specs (respecting the syntax and alphabetical order) at: https://github.com/mapserver/mapserver/wiki/MapServer-Site-Gallery (this is also good timing as we work towards an 8.0 release) Thank you everyone! -jeff -- Jeff McKenna GatewayGeo: MapServer Consulting and Training Services co-founder of FOSS4G http://gatewaygeo.com/ From pmoen at nd.gov Sat Feb 6 07:44:01 2021 From: pmoen at nd.gov (Moen, Paul T.) Date: Sat, 6 Feb 2021 15:44:01 +0000 Subject: [mapserver-users] Migrating to PHP SWIG drawFeature missing Message-ID: The ?native? PHP MapScript will go away with MapServer 8. Will all the functionality be added to the SWIG PHP MapScript before that happens?? I tried the transition with the change to MapServer 7.4 and was unsuccessful do to missing pieces (or my lack of knowledge).? Thankfully, others also needed the php_mapscript functionality and put forth a tremendous effort to make the ?native? PHP MapScript work with PHP 7.? Thank you to all that were involved with that effort.? Here I go again, hoping that I will be able to make the transition?and I still do not see a path forward.? Of course, just because I don?t see a path, doesn?t mean there isn?t one.? That is why I am asking how to add a feature to a layer using SWIG PHP MapScript.? The following explains how I have done this in the ?native? PHP MapScript. ? I use a layer called drawshape1 in a mapfile to highlight something on a map by dynamically adding a feature to that layer. ? LAYER ??????????????? NAME "drawshape1" ??? ??????????? TYPE POLYGON ??????????????? STATUS ON ??????????????? COMPOSITE ??????????????? ??????????????? OPACITY 60 ??????????????? END ??????????????? CLASS ??????????????????????????????? STATUS ON ??????????????????????????????? NAME "tmpshp1" ??????????????????????????????? STYLE ??????????????????????????????????????????????? COLOR 0 0 255 ??????????????????????????????? END ??????????????? END END ? I use a WKT to create the shape that is added to the drawshape1 layer.? This highlights the WKT on the image returned by drawQuery(). ? $map = new mapObj("simple.map"); $drawLayer = $map->getLayerByName('drawshape1'); $newshp = ms_shapeObjFromWkt($curwkt); $drawLayer->set('status',MS_ON); $test = $drawLayer->addFeature($newshp); $img = $map->drawQuery(); ? Presumably, I could do the following. ? $map = new mapObj("simple.map"); $drawLayer = $map->getLayerByName('drawshape1'); $newshp = new shapeObj(MS_SHAPE_POLYGON); $tmpShape = newshp->fromWKT($curwkt); ? ? $test = $drawLayer->addFeature($newshp); ? This doesn?t seem to be finished in SWIG mapscript.? I see that in the documentation says TODO. ? addFeature(?https://mapserver.org/mapscript/mapscript.html#shapeobj?shape )int Add a new inline feature on a layer. Returns -1 on error.?TODO: Is this similar to inline features in a mapfile? Does it work for any kind of layer or connection type? I could use inline features to accomplish this also.? But this also seems to be missing in SWIG PHP mapscript and has a TODO by it. ? addFeature(?https://mapserver.org/mapscript/mapscript.html#shapeobj?shape )int Add a new inline feature on a layer. Returns -1 on error.?TODO: Is this similar to inline features in a mapfile? Does it work for any kind of layer or connection type? Does anyone know how can I replace this functionality?? Will these TODOs be done before MapServer 8?? It is difficult to work on the transition when pieces are missing. ? Thanks, ? Paul From jmckenna at gatewaygeomatics.com Sat Feb 6 08:06:33 2021 From: jmckenna at gatewaygeomatics.com (Jeff McKenna) Date: Sat, 6 Feb 2021 12:06:33 -0400 Subject: [mapserver-users] Migrating to PHP SWIG drawFeature missing In-Reply-To: References: Message-ID: <048296ef-dd62-6e99-936f-f7c3e3218b8f@gatewaygeomatics.com> Hi Paul, I have recently had to upgrade all of my PHP scripts for several client's applications, to SWIG MapScript, and your fromWKT() note is a common one in all of my scripts too. Good news though: your/our scripts are easily updated for SWIG as follows: $map = new mapObj("simple.map"); $drawLayer = $map->getLayerByName('drawshape1'); $newshp = new shapeObj(MS_SHAPE_POLYGON); $newshp = $newshp->fromWKT($curwkt); (the issue is that you must first declare the new shape object separately, and then next use that same variable to call & load the WKT) You're correct that the upcoming release will drop the old native mapscript, so please definitely don't be afraid to jump into existing tickets (such as this one that lists a few missing SWIG functions https://github.com/MapServer/MapServer/issues/1822 ) so we can all work together on making the 8.0 release great. Thanks for your feedback, -jeff -- Jeff McKenna GatewayGeo: MapServer Consulting and Training Services co-founder of FOSS4G http://gatewaygeo.com/ On 2021-02-06 11:44 a.m., Moen, Paul T. wrote: > The ?native? PHP MapScript will go away with MapServer 8. Will all the functionality be added to the SWIG PHP MapScript before that happens?? I tried the transition with the change to MapServer 7.4 and was unsuccessful do to missing pieces (or my lack of knowledge).? Thankfully, others also needed the php_mapscript functionality and put forth a tremendous effort to make the ?native? PHP MapScript work with PHP 7.? Thank you to all that were involved with that effort.? Here I go again, hoping that I will be able to make the transition?and I still do not see a path forward.? Of course, just because I don?t see a path, doesn?t mean there isn?t one.? That is why I am asking how to add a feature to a layer using SWIG PHP MapScript.? The following explains how I have done this in the ?native? PHP MapScript. > > I use a layer called drawshape1 in a mapfile to highlight something on a map by dynamically adding a feature to that layer. > > LAYER > ??????????????? NAME "drawshape1" > ??? ??????????? TYPE POLYGON > ??????????????? STATUS ON > ??????????????? COMPOSITE > ??????????????? ??????????????? OPACITY 60 > ??????????????? END > ??????????????? CLASS > ??????????????????????????????? STATUS ON > ??????????????????????????????? NAME "tmpshp1" > ??????????????????????????????? STYLE > ??????????????????????????????????????????????? COLOR 0 0 255 > ??????????????????????????????? END > ??????????????? END > END > > I use a WKT to create the shape that is added to the drawshape1 layer.? This highlights the WKT on the image returned by drawQuery(). > > $map = new mapObj("simple.map"); > $drawLayer = $map->getLayerByName('drawshape1'); > $newshp = ms_shapeObjFromWkt($curwkt); > $drawLayer->set('status',MS_ON); > $test = $drawLayer->addFeature($newshp); > $img = $map->drawQuery(); > > Presumably, I could do the following. > > $map = new mapObj("simple.map"); > $drawLayer = $map->getLayerByName('drawshape1'); > $newshp = new shapeObj(MS_SHAPE_POLYGON); > $tmpShape = newshp->fromWKT($curwkt); > > > $test = $drawLayer->addFeature($newshp); > > This doesn?t seem to be finished in SWIG mapscript.? I see that in the documentation says TODO. > > addFeature(?https://mapserver.org/mapscript/mapscript.html#shapeobj?shape )int > Add a new inline feature on a layer. Returns -1 on error.?TODO: Is this similar to inline features in a mapfile? Does it work for any kind of layer or connection type? > > I could use inline features to accomplish this also.? But this also seems to be missing in SWIG PHP mapscript and has a TODO by it. > > addFeature(?https://mapserver.org/mapscript/mapscript.html#shapeobj?shape )int > Add a new inline feature on a layer. Returns -1 on error.?TODO: Is this similar to inline features in a mapfile? Does it work for any kind of layer or connection type? > > Does anyone know how can I replace this functionality?? Will these TODOs be done before MapServer 8?? It is difficult to work on the transition when pieces are missing. > > Thanks, > > Paul > From jmckenna at gatewaygeomatics.com Sat Feb 6 08:16:31 2021 From: jmckenna at gatewaygeomatics.com (Jeff McKenna) Date: Sat, 6 Feb 2021 12:16:31 -0400 Subject: [mapserver-users] Migrating to PHP SWIG drawFeature missing In-Reply-To: <048296ef-dd62-6e99-936f-f7c3e3218b8f@gatewaygeomatics.com> References: <048296ef-dd62-6e99-936f-f7c3e3218b8f@gatewaygeomatics.com> Message-ID: <12e5271a-1970-a450-d69e-577dcdb904ba@gatewaygeomatics.com> Of course I missed the last line: $map = new mapObj("simple.map"); $drawLayer = $map->getLayerByName('drawshape1'); $newshp = new shapeObj(MS_SHAPE_POLYGON); $newshp = $newshp->fromWKT($curwkt); $drawLayer->addFeature($newshp); -jeff -- Jeff McKenna GatewayGeo: MapServer Consulting and Training Services co-founder of FOSS4G http://gatewaygeo.com/ On 2021-02-06 12:06 p.m., Jeff McKenna wrote: > Hi Paul, > > I have recently had to upgrade all of my PHP scripts for several > client's applications, to SWIG MapScript, and your fromWKT() note is a > common one in all of my scripts too.? Good news though: your/our scripts > are easily updated for SWIG as follows: > > > ? $map = new mapObj("simple.map"); > ? $drawLayer = $map->getLayerByName('drawshape1'); > ? $newshp = new shapeObj(MS_SHAPE_POLYGON); > ? $newshp = $newshp->fromWKT($curwkt); > > (the issue is that you must first declare the new shape object > separately, and then next use that same variable to call & load the WKT) > > You're correct that the upcoming release will drop the old native > mapscript, so please definitely don't be afraid to jump into existing > tickets (such as this one that lists a few missing SWIG functions > https://github.com/MapServer/MapServer/issues/1822 ) so we can all work > together on making the 8.0 release great. > > Thanks for your feedback, > > -jeff > > > From jmckenna at gatewaygeomatics.com Sat Feb 6 09:45:54 2021 From: jmckenna at gatewaygeomatics.com (Jeff McKenna) Date: Sat, 6 Feb 2021 13:45:54 -0400 Subject: [mapserver-users] Please add your site/services to the MapServer gallery In-Reply-To: <4308cb46-864d-4c12-88c3-029451d94534@www.fastmail.com> References: <4308cb46-864d-4c12-88c3-029451d94534@www.fastmail.com> Message-ID: <80642fca-4919-6ece-e835-f0aa8da4ffb2@gatewaygeomatics.com> Hi Seth, the goal of this page is to list public-visible working urls, so that new users can see MapServer in action. I feel that a page of all of the internal sites without working urls could be a different wiki page (maybe linked from this page). Those are my initial thoughts. -jeff On 2021-02-06 1:37 p.m., Seth G wrote: > Good to push this Jeff. > > One question - are non-public sites desired/eligible for this list? > There are plenty of internal/Intranet systems relying on MapServer, but without a public URL we may not want them on the wiki. > > Seth > > -- > web:http://geographika.co.uk > twitter: @geographika > > On Sat, Feb 6, 2021, at 4:18 PM, Jeff McKenna wrote: >> Reminder: >> >> New and potential MapServer users really like to see working examples >> of MapServer applications (and MapServer-driven WMS/WFS/OGC services) >> listed on our map gallery. Please take a minute to add your site and >> specs (respecting the syntax and alphabetical order) at: >> https://github.com/mapserver/mapserver/wiki/MapServer-Site-Gallery >> >> (this is also good timing as we work towards an 8.0 release) >> >> Thank you everyone! >> >> -jeff >> >> From sethg at geographika.co.uk Sat Feb 6 09:37:42 2021 From: sethg at geographika.co.uk (Seth G) Date: Sat, 06 Feb 2021 18:37:42 +0100 Subject: [mapserver-users] =?utf-8?q?Please_add_your_site/services_to_the?= =?utf-8?q?_MapServer_gallery?= In-Reply-To: References: Message-ID: <4308cb46-864d-4c12-88c3-029451d94534@www.fastmail.com> Good to push this Jeff. One question - are non-public sites desired/eligible for this list? There are plenty of internal/Intranet systems relying on MapServer, but without a public URL we may not want them on the wiki. Seth -- web:http://geographika.co.uk twitter: @geographika On Sat, Feb 6, 2021, at 4:18 PM, Jeff McKenna wrote: > Reminder: > > New and potential MapServer users really like to see working examples > of MapServer applications (and MapServer-driven WMS/WFS/OGC services) > listed on our map gallery. Please take a minute to add your site and > specs (respecting the syntax and alphabetical order) at: > https://github.com/mapserver/mapserver/wiki/MapServer-Site-Gallery > > (this is also good timing as we work towards an 8.0 release) > > Thank you everyone! > > -jeff > > > > > -- > Jeff McKenna > GatewayGeo: MapServer Consulting and Training Services > co-founder of FOSS4G > http://gatewaygeo.com/ > > > > > > > > > > _______________________________________________ > mapserver-users mailing list > mapserver-users at lists.osgeo.org > https://lists.osgeo.org/mailman/listinfo/mapserver-users > From jmckenna at gatewaygeomatics.com Sat Feb 6 09:48:50 2021 From: jmckenna at gatewaygeomatics.com (Jeff McKenna) Date: Sat, 6 Feb 2021 13:48:50 -0400 Subject: [mapserver-users] Please add your site/services to the MapServer gallery In-Reply-To: <80642fca-4919-6ece-e835-f0aa8da4ffb2@gatewaygeomatics.com> References: <4308cb46-864d-4c12-88c3-029451d94534@www.fastmail.com> <80642fca-4919-6ece-e835-f0aa8da4ffb2@gatewaygeomatics.com> Message-ID: <03270b49-affd-c988-f45e-7e9278deda99@gatewaygeomatics.com> On the other hand, although non-working sites are 'not desired' on this page, as it is a wiki there is nothing stopping you from adding you site(s). But I'd hope this page is used to list working / visible sites, so new/potential users can see MapServer in action. Again though, it is a wiki, on purpose ;) -jeff On 2021-02-06 1:45 p.m., Jeff McKenna wrote: > Hi Seth, the goal of this page is to list public-visible working urls, > so that new users can see MapServer in action.? I feel that a page of > all of the internal sites without working urls could be a different wiki > page (maybe linked from this page). > > Those are my initial thoughts. > > -jeff > > > > On 2021-02-06 1:37 p.m., Seth G wrote: >> Good to push this Jeff. >> >> One question - are non-public sites desired/eligible for this list? >> There are plenty of internal/Intranet systems relying on MapServer, >> but without a public URL we may not want them on the wiki. >> >> Seth >> >> -- >> web:http://geographika.co.uk >> twitter: @geographika >> >> On Sat, Feb 6, 2021, at 4:18 PM, Jeff McKenna wrote: >>> Reminder: >>> >>> New and potential MapServer users really like to see working examples >>> of MapServer applications (and MapServer-driven WMS/WFS/OGC services) >>> listed on our map gallery.? Please take a minute to add your site and >>> specs (respecting the syntax and alphabetical order) at: >>> https://github.com/mapserver/mapserver/wiki/MapServer-Site-Gallery >>> >>> (this is also good timing as we work towards an 8.0 release) >>> >>> Thank you everyone! >>> >>> -jeff >>> >>> -- Jeff McKenna GatewayGeo: MapServer Consulting and Training Services co-founder of FOSS4G http://gatewaygeo.com/ From adityakudekar.ak at gmail.com Mon Feb 8 01:19:37 2021 From: adityakudekar.ak at gmail.com (aditya kudekar) Date: Mon, 8 Feb 2021 10:19:37 +0100 Subject: [mapserver-users] Mapscript circular import error inside Python-Flask Docker Message-ID: I have a simple flask app and I am trying to run in Docker import mapscriptfrom flask import Flaskimport json app = Flask(__name__) port = 5000 @app.route("/hello")def geocoder(): epsg = mapscript.pointObj(1, 1) return json.dumps(epsg) test() if __name__ == '__main__': app.run(host="0.0.0.0", port=port) My Dockerfile is: FROM python WORKDIR /opt/demo/ COPY /app . RUN pip install -r requirements.txt ENTRYPOINT python test.py But I get the following error when I run docker run -p 5000:5000 test:latest : Traceback (most recent call last): File "/opt/demo/test.py", line 1, in import mapscript File "/usr/local/lib/python3.9/site-packages/mapscript/__init__.py", line 2, in from .mapscript import * File "/usr/local/lib/python3.9/site-packages/mapscript/mapscript.py", line 13, in from . import _mapscript ImportError: cannot import name '_mapscript' from partially initialized module 'mapscript' (most likely due to a circular import) (/usr/local/lib/python3.9/site-packages/mapscript/__init__.py) This happens only when I have the Python VENV activated when running outside Docker but I don't know why I am getting this error inside Docker. Warm Regards Aditya Rajendra Kudekar -------------- next part -------------- An HTML attachment was scrubbed... URL: From sethg at geographika.co.uk Tue Feb 9 00:37:51 2021 From: sethg at geographika.co.uk (Seth G) Date: Tue, 09 Feb 2021 09:37:51 +0100 Subject: [mapserver-users] =?utf-8?q?Mapscript_circular_import_error_insi?= =?utf-8?q?de_Python-Flask_Docker?= In-Reply-To: References: Message-ID: <847a14f4-4de9-4726-9c3e-13952cf60a38@www.fastmail.com> Hi Aditya, Are you building MapScript yourself or using "sudo apt-get install python-mapscript" - see notes under "Installation on Unix" at https://pypi.org/project/mapscript/ "This happens only when I have the Python VENV activated when running outside Docker" - do you mean the exact same approach works outside of Docker? Is MapServer installed on Docker (this is required along with mapscript)? Python 3.9 is as yet untested/supported, but this may not be the cause issue. Seth -- web:http://geographika.co.uk twitter: @geographika On Mon, Feb 8, 2021, at 10:19 AM, aditya kudekar wrote: > I have a simple flask app and I am trying to run in Docker > `import mapscript > from flask import Flask > import json app = Flask(__name__) port = 5000 > @app.route("/hello") > def geocoder(): epsg = mapscript.pointObj(1, 1) return json.dumps(epsg) test() > if __name__ == '__main__': app.run(host="0.0.0.0", port=port) ` > My Dockerfile is: > `FROM python WORKDIR /opt/demo/ COPY /app . RUN pip install -r requirements.txt ENTRYPOINT python test.py ` > But I get the following error when I run `docker run -p 5000:5000 test:latest`: > `Traceback (most recent call last): File "/opt/demo/test.py", line 1, in import mapscript File "/usr/local/lib/python3.9/site-packages/mapscript/__init__.py", line 2, in from .mapscript import * File "/usr/local/lib/python3.9/site-packages/mapscript/mapscript.py", line 13, in from . import _mapscript ImportError: cannot import name '_mapscript' from partially initialized module 'mapscript' (most likely due to a circular import) (/usr/local/lib/python3.9/site-packages/mapscript/__init__.py) ` > This happens only when I have the Python VENV activated when running outside Docker but I don't know why I am getting this error inside Docker. > Warm Regards > > Aditya Rajendra Kudekar > _______________________________________________ > mapserver-users mailing list > mapserver-users at lists.osgeo.org > https://lists.osgeo.org/mailman/listinfo/mapserver-users > -------------- next part -------------- An HTML attachment was scrubbed... URL: From iljya.kalai at gmail.com Wed Feb 10 08:59:43 2021 From: iljya.kalai at gmail.com (Iljya Kalai) Date: Wed, 10 Feb 2021 17:59:43 +0100 Subject: [mapserver-users] svg symbols, svg output, anchorpoints In-Reply-To: References: Message-ID: Hi, I'm running into some fascinating behaviour with svg symbols and svg output. I'm new to svg so this may very well be expected behaviour, but I cannot figure out what is going on. The symbols are not being anchored properly at the anchorpoint when the output is SVG, but everything works as expected when the output is PNG. A minimal example with all the necessary resources to reproduce this is here: https://gist.github.com/iljya/e67a2a245c6968e685c11498a8361fe0 It is possible that this is related to these issues, but I'm not sure: https://github.com/mapserver/mapserver/issues/5593 https://trac.osgeo.org/mapserver/ticket/4184 Thanks for your help, even if it is just a confirmation that others are actively using the SVG renderer. Kind regards, Iljya MapServer version 7.4.3 OUTPUT=PNG OUTPUT=JPEG OUTPUT=KML SUPPORTS=PROJ SUPPORTS=AGG SUPPORTS=FREETYPE SUPPORTS=CAIRO SUPPORTS=SVG_SYMBOLS SUPPORTS=RSVG SUPPORTS=ICONV SUPPORTS=FRIBIDI SUPPORTS=WMS_SERVER SUPPORTS=WMS_CLIENT SUPPORTS=WFS_SERVER SUPPORTS=WFS_CLIENT SUPPORTS=WCS_SERVER SUPPORTS=SOS_SERVER SUPPORTS=FASTCGI SUPPORTS=THREADS SUPPORTS=GEOS SUPPORTS=PBF INPUT=JPEG INPUT=POSTGIS INPUT=OGR INPUT=GDAL INPUT=SHAPEFILE -------------- next part -------------- An HTML attachment was scrubbed... URL: From jmckenna at gatewaygeomatics.com Wed Feb 10 09:14:40 2021 From: jmckenna at gatewaygeomatics.com (Jeff McKenna) Date: Wed, 10 Feb 2021 13:14:40 -0400 Subject: [mapserver-users] svg symbols, svg output, anchorpoints In-Reply-To: References: Message-ID: <4d910315-ed36-69d6-cead-b598a8be04a1@gatewaygeomatics.com> Hi Iljya, Would you mind also updating your tests to run against the latest release (MapServer 7.6.2). thanks, -jeff -- Jeff McKenna GatewayGeo: MapServer Consulting and Training Services co-founder of FOSS4G http://gatewaygeo.com/ On 2021-02-10 12:59 p.m., Iljya Kalai wrote: > Hi, > > I'm running into some fascinating behaviour with svg symbols and svg > output. I'm new to svg so this may very well be expected behaviour, but > I cannot figure out what is going on. > > The symbols are not being anchored properly?at the anchorpoint when the > output is SVG, but everything works as expected when the output is PNG. > > A minimal example with all the necessary resources to reproduce this is > here: > https://gist.github.com/iljya/e67a2a245c6968e685c11498a8361fe0 > > > It is possible that this is related to these issues, but I'm not sure: > https://github.com/mapserver/mapserver/issues/5593 > > https://trac.osgeo.org/mapserver/ticket/4184 > > > Thanks for your help, even if it is just a confirmation that others are > actively using the SVG renderer. > > Kind regards, > Iljya > > MapServer version 7.4.3 OUTPUT=PNG OUTPUT=JPEG OUTPUT=KML SUPPORTS=PROJ > SUPPORTS=AGG SUPPORTS=FREETYPE SUPPORTS=CAIRO SUPPORTS=SVG_SYMBOLS > SUPPORTS=RSVG SUPPORTS=ICONV SUPPORTS=FRIBIDI SUPPORTS=WMS_SERVER > SUPPORTS=WMS_CLIENT SUPPORTS=WFS_SERVER SUPPORTS=WFS_CLIENT > SUPPORTS=WCS_SERVER SUPPORTS=SOS_SERVER SUPPORTS=FASTCGI > SUPPORTS=THREADS SUPPORTS=GEOS SUPPORTS=PBF INPUT=JPEG INPUT=POSTGIS > INPUT=OGR INPUT=GDAL INPUT=SHAPEFILE > From jmckenna at gatewaygeomatics.com Wed Feb 10 09:17:22 2021 From: jmckenna at gatewaygeomatics.com (Jeff McKenna) Date: Wed, 10 Feb 2021 13:17:22 -0400 Subject: [mapserver-users] svg symbols, svg output, anchorpoints In-Reply-To: <4d910315-ed36-69d6-cead-b598a8be04a1@gatewaygeomatics.com> References: <4d910315-ed36-69d6-cead-b598a8be04a1@gatewaygeomatics.com> Message-ID: <7175e701-f18a-fe05-c888-f7c06c53d29d@gatewaygeomatics.com> To correct my wording: Would you mind also updating to the latest release (MapServer 7.6.2)? This helps everyone know that you have the latest code and (possibly) fixes. Thanks, -jeff On 2021-02-10 1:14 p.m., Jeff McKenna wrote: > Hi Iljya, > > Would you mind also updating your tests to run against the latest > release (MapServer 7.6.2).? thanks, > > -jeff > > > > > -- Jeff McKenna GatewayGeo: MapServer Consulting and Training Services co-founder of FOSS4G http://gatewaygeo.com/ From iljya.kalai at gmail.com Wed Feb 10 14:43:39 2021 From: iljya.kalai at gmail.com (Iljya Kalai) Date: Wed, 10 Feb 2021 23:43:39 +0100 Subject: [mapserver-users] svg symbols, svg output, anchorpoints In-Reply-To: References: Message-ID: Thanks Jeff. Per your suggestion, I tried this on 7.6.2 with the same outcome. I wasn't able to find a prebuilt 7.6.2 package for Ubuntu so I built from source. $ mapserv -v MapServer version 7.6.2 OUTPUT=PNG OUTPUT=JPEG SUPPORTS=PROJ SUPPORTS=AGG SUPPORTS=FREETYPE SUPPORTS=CAIRO SUPPORTS=SVG_SYMBOLS SUPPORTS=RSVG SUPPORTS=ICONV SUPPORTS=FRIBIDI SUPPORTS=WMS_SERVER SUPPORTS=WFS_SERVER SUPPORTS=WCS_SERVER SUPPORTS=FASTCGI SUPPORTS=GEOS SUPPORTS=POINT_Z_M INPUT=JPEG INPUT=POSTGIS INPUT=OGR INPUT=GDAL INPUT=SHAPEFILE I also tried to build at HEAD just in case with no luck. I updated the gist: https://gist.github.com/iljya/e67a2a245c6968e685c11498a8361fe0 For previous comments on this thread see the following link (I had "digest mode" on and couldn't find a way to reply and preserve the older messages - turned it off now): https://lists.osgeo.org/pipermail/mapserver-users/2021-February/082022.html -------------- next part -------------- An HTML attachment was scrubbed... URL: From jesper.kempe at gmail.com Thu Feb 11 00:40:47 2021 From: jesper.kempe at gmail.com (Jesper Kempe) Date: Thu, 11 Feb 2021 09:40:47 +0100 Subject: [mapserver-users] WMS Time layer from geojson Message-ID: Hi I am trying to get WMS time to work for a vector layer from GeoJSON-data. The data has a property start that is a DateTime that I want to filter the items in the geojson based on TIME in the WMS query. Ogrinfo shows: OGRFeature(debug_wmstime):0 level (String) = high start (DateTime) = 2021/02/09 14:00:00+00 POLYGON ((10.87646484375 61.7627288304727,10.9423828125 60.0758034247597,17.73193359375 60.1633760564878,17.7978515625 61.7835133871372,10.87646484375 61.7627288304727)) But no matter how I configure the mapfile I can?t get it to work. As soon as I add "wms_timeitem" "start" to Layer METADATA the image goes blank. And the debug logfile gives no errors. I can get ogrinfo to filter the data in the geojson with: ogrinfo -where "start='2021-02-09T14:00:00Z'" debug_wmstime.geojson debug_wmstime But not get Mapserver to work with TIME=2021-02-09T14:00:00Z in a WMS-request. Attached is the geojson file and a simple mapfile I have used for testing. A wms query like this is what I am testing: /debug_wmstime.map?SERVICE=WMS&VERSION=1.1.1&REQUEST=GetMap&FORMAT=image/png&TRANSPARENT=true&STYLES&LAYERS=time_debug&SRS=EPSG%3A4326&WIDTH=200&HEIGHT=464&BBOX=10,47,18,62&TIME=2021-02-09T14:00:00Z The expected result is to to only see a yellow square at the top of the image. The other features in the geojson should not be visible with this TIME. Does anyone have a clue what I might be doing wrong? Cause it should be possible to do this right? Any help is appreciated! Jesper -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: debug_wmstime.geojson Type: application/octet-stream Size: 3198 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: debug_wmstime.map Type: application/octet-stream Size: 1312 bytes Desc: not available URL: From iljya.kalai at gmail.com Thu Feb 11 11:12:45 2021 From: iljya.kalai at gmail.com (Iljya Kalai) Date: Thu, 11 Feb 2021 20:12:45 +0100 Subject: [mapserver-users] svg symbols, svg output, anchorpoints In-Reply-To: References: Message-ID: Hi folks, I've figured my issue out: the SVG files used for symbols did not have a width/height set, and the automatically derived height was being truncated to an integer and as a result slightly off, leading to the weird behaviour. More details: https://gist.github.com/iljya/e67a2a245c6968e685c11498a8361fe0 Cheers, Iljya Em qua., 10 de fev. de 2021 ?s 23:43, Iljya Kalai escreveu: > Thanks Jeff. Per your suggestion, I tried this on 7.6.2 with the same > outcome. > > I wasn't able to find a prebuilt 7.6.2 package for Ubuntu so I built from > source. > > $ mapserv -v > MapServer version 7.6.2 OUTPUT=PNG OUTPUT=JPEG SUPPORTS=PROJ SUPPORTS=AGG > SUPPORTS=FREETYPE SUPPORTS=CAIRO SUPPORTS=SVG_SYMBOLS SUPPORTS=RSVG > SUPPORTS=ICONV SUPPORTS=FRIBIDI SUPPORTS=WMS_SERVER SUPPORTS=WFS_SERVER > SUPPORTS=WCS_SERVER SUPPORTS=FASTCGI SUPPORTS=GEOS SUPPORTS=POINT_Z_M > INPUT=JPEG INPUT=POSTGIS INPUT=OGR INPUT=GDAL INPUT=SHAPEFILE > > I also tried to build at HEAD just in case with no luck. > > I updated the gist: > https://gist.github.com/iljya/e67a2a245c6968e685c11498a8361fe0 > > For previous comments on this thread see the following link (I had "digest > mode" on and couldn't find a way to reply and preserve the older messages - > turned it off now): > https://lists.osgeo.org/pipermail/mapserver-users/2021-February/082022.html > -------------- next part -------------- An HTML attachment was scrubbed... URL: From breuil at craig.fr Tue Feb 16 05:23:51 2021 From: breuil at craig.fr (Landry Breuil) Date: Tue, 16 Feb 2021 14:23:51 +0100 Subject: [mapserver-users] specify endianness in outputformat when serving BIL/EHdr ? Message-ID: hi, i'm trying to use mapserver-provided DEM layers within mapstore2, which expects 'big-endian encoded' BIL format to display elevation/build terrain relief with cesium. My mapserver layer is built with a tileindex of asc files, and that works just great when rendering as png with some styling. i've reported my findings about what is expected within mapstore2 (which is mostly tested against geoserver) here; https://github.com/georchestra/mapstore2-georchestra/issues/331. i've configured my outputformat as is in mapserver (found on https://worldwind.earth/elevation-server.html): OUTPUTFORMAT NAME "bil" DRIVER "GDAL/EHdr" MIMETYPE "application/bil16" IMAGEMODE INT16 EXTENSION "bil" END and looking at the binary data returned by a request with application/bil16 format, this seems correctly encoded as big-endian but mapstore2 doesnt like it, and after testing a bit with a DEM served by geoserver my understanding is that mapstore2 would expect data encoded as little-endian. is there a way to specify that in gdal output formats ? looking at https://gdal.org/drivers/raster/ehdr.html it seems the ehdr/bil format doesnt provide much options, there seem to be support to specify byteorder via a sidecar file when reading a hdr file, but i dunno how to shoehorn that inside mapserver. i've also looked at the various composite/processing options in mapserver, and i havent found an operation that would allow to swap bytes on the fly in the raster when computing the output, but i might have looked wrong. Any hints ? Thanks ! -- Landry Breuil From iljya.kalai at gmail.com Tue Feb 16 14:28:25 2021 From: iljya.kalai at gmail.com (Iljya Kalai) Date: Tue, 16 Feb 2021 17:28:25 -0500 Subject: [mapserver-users] Labels colliding with symbols Message-ID: Hi, On my map, labels sometimes overlap symbols. Is there a way to avoid this, or are only label/label conflicts avoided? I tried both CC and AUTO for LAYER::CLASS::LABEL::POSITION. https://i.imgur.com/C9Ir7dA.png Thanks! Iljya *# *Map file extract ... LAYER NAME "LINE" TYPE LINE CLASS STYLE COLOR 0 0 0 WIDTH 1 END LABEL COLOR 150 150 150 TYPE truetype SIZE 10 ANGLE AUTO POSITION CC TEXT "hello" END END END LAYER NAME "SYMBOLS" TYPE POINT ... CLASS STYLE SYMBOL "ABC" END END END ... -------------- next part -------------- An HTML attachment was scrubbed... URL: From sdlime at gmail.com Tue Feb 16 17:41:42 2021 From: sdlime at gmail.com (Steve Lime) Date: Tue, 16 Feb 2021 19:41:42 -0600 Subject: [mapserver-users] Labels colliding with symbols In-Reply-To: References: Message-ID: Hmmm... Point symbols are automatically considered as part of label placement and collision detection. Since they are drawn first, their placement is cached and labels are placed around them. Can you share specifics on your layers and symbols - perhaps a small test case? --Steve On Tue, Feb 16, 2021 at 4:28 PM Iljya Kalai wrote: > Hi, > > On my map, labels sometimes overlap symbols. Is there a way to avoid this, > or are only label/label conflicts avoided? I tried both CC and AUTO for > LAYER::CLASS::LABEL::POSITION. > > https://i.imgur.com/C9Ir7dA.png > > Thanks! > Iljya > > > *# *Map file extract > ... > LAYER > NAME "LINE" > TYPE LINE > CLASS > STYLE > COLOR 0 0 0 > WIDTH 1 > END > LABEL > COLOR 150 150 150 > TYPE truetype > SIZE 10 > ANGLE AUTO > POSITION CC > TEXT "hello" > END > END > END > > LAYER > NAME "SYMBOLS" > TYPE POINT > ... > CLASS > STYLE > SYMBOL "ABC" > END > END > END > ... > _______________________________________________ > mapserver-users mailing list > mapserver-users at lists.osgeo.org > https://lists.osgeo.org/mailman/listinfo/mapserver-users > -------------- next part -------------- An HTML attachment was scrubbed... URL: From iljya.kalai at gmail.com Wed Feb 17 11:04:58 2021 From: iljya.kalai at gmail.com (Iljya Kalai) Date: Wed, 17 Feb 2021 14:04:58 -0500 Subject: [mapserver-users] Labels colliding with symbols In-Reply-To: References: Message-ID: Hi Steve, I've created a minimal example to demonstrate the issue: https://gist.github.com/iljya/b1d58f250be11e8972ea6e5628f84b2a Thanks for your help, Iljya Em ter., 16 de fev. de 2021 ?s 20:41, Steve Lime escreveu: > Hmmm... Point symbols are automatically considered as part of label > placement and collision detection. Since they are drawn first, their > placement is cached and labels are placed around them. Can you share > specifics on your layers and symbols - perhaps a small test case? --Steve > > On Tue, Feb 16, 2021 at 4:28 PM Iljya Kalai wrote: > >> Hi, >> >> On my map, labels sometimes overlap symbols. Is there a way to avoid >> this, or are only label/label conflicts avoided? I tried both CC and AUTO >> for LAYER::CLASS::LABEL::POSITION. >> >> https://i.imgur.com/C9Ir7dA.png >> >> Thanks! >> Iljya >> >> >> *# *Map file extract >> ... >> LAYER >> NAME "LINE" >> TYPE LINE >> CLASS >> STYLE >> COLOR 0 0 0 >> WIDTH 1 >> END >> LABEL >> COLOR 150 150 150 >> TYPE truetype >> SIZE 10 >> ANGLE AUTO >> POSITION CC >> TEXT "hello" >> END >> END >> END >> >> LAYER >> NAME "SYMBOLS" >> TYPE POINT >> ... >> CLASS >> STYLE >> SYMBOL "ABC" >> END >> END >> END >> ... >> _______________________________________________ >> mapserver-users mailing list >> mapserver-users at lists.osgeo.org >> https://lists.osgeo.org/mailman/listinfo/mapserver-users >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From lars.schylberg at blixtmail.se Thu Feb 18 07:57:03 2021 From: lars.schylberg at blixtmail.se (lars.schylberg at blixtmail.se) Date: Thu, 18 Feb 2021 15:57:03 +0000 Subject: [mapserver-users] Labels colliding with symbols In-Reply-To: References: Message-ID: <5d4244b77a5143e2e9845a6310457fb5@blixtmail.se> Hi, I have modified your example a little bit. I You add REPEATDISTANCE for the text and then a fake label with transparent text above the svg symbol I think that You get something that is close to what you are looking for. If You remove the last fake label block You get the old behavior that the text is written above the symbol. I have inserted the code in your GIST: https://gist.github.com/iljya/b1d58f250be11e8972ea6e5628f84b2a (https://gist.github.com/iljya/b1d58f250be11e8972ea6e5628f84b2a) I have been experimenting without repeatdistance and I can agree with You that the results were strange. I thought that the fake label would do the trick, but it didn't /Lars Schylberg 17 februari 2021 kl. 20:05, "Iljya Kalai" )> skrev: Hi Steve, I've created a minimal example to demonstrate the issue: https://gist.github.com/iljya/b1d58f250be11e8972ea6e5628f84b2a (https://gist.github.com/iljya/b1d58f250be11e8972ea6e5628f84b2a) Thanks for your help, Iljya Em ter., 16 de fev. de 2021 ?s 20:41, Steve Lime escreveu: Hmmm... Point symbols are automatically considered as part of label placement and collision detection. Since they are drawn first, their placement is cached and labels are placed around them. Can you share specifics on your layers and symbols - perhaps a small test case? --Steve On Tue, Feb 16, 2021 at 4:28 PM Iljya Kalai wrote: Hi, On my map, labels sometimes overlap symbols. Is there a way to avoid this, or are only label/label conflicts avoided? I tried both CC and AUTO for LAYER::CLASS::LABEL::POSITION. https://i.imgur.com/C9Ir7dA.png (https://i.imgur.com/C9Ir7dA.png) Thanks! Iljya # Map file extract ... LAYER NAME "LINE" TYPE LINE CLASS STYLE COLOR 0 0 0 WIDTH 1 END LABEL COLOR 150 150 150 TYPE truetype SIZE 10 ANGLE AUTO POSITION CC TEXT "hello" END END END LAYER NAME "SYMBOLS" TYPE POINT ... CLASS STYLE SYMBOL "ABC" END END END ... _______________________________________________ mapserver-users mailing list mapserver-users at lists.osgeo.org (mailto:mapserver-users at lists.osgeo.org) https://lists.osgeo.org/mailman/listinfo/mapserver-users (https://lists.osgeo.org/mailman/listinfo/mapserver-users) -------------- next part -------------- An HTML attachment was scrubbed... URL: From pmoen at nd.gov Thu Feb 18 12:25:11 2021 From: pmoen at nd.gov (Moen, Paul T.) Date: Thu, 18 Feb 2021 20:25:11 +0000 Subject: [mapserver-users] PostgreSQL authentication method. Message-ID: I recently tried a Mapserver layer connected to a PostgreSQL 13.2 database that had password_encryption = scram-sha-256. I was unsuccessful in getting it to work until I switched it to md5 and reset the passwords. The following error was logged and the interesting part seems to be (authentication method 10 not supported). [Thu Feb 18 13:57:02.652879 2021] [php7:warn] [pid 16668] [client 192.168.100.4:57341] PHP Warning: mapObj::drawQuery(): [MapServer Error]: msPostGISLayerOpen(): Database connection failed. Check server logs for more details.Is the database running? Is it allowing connections? Does the specified user exist? Is the password valid? Is the database on the standard port?\n in /Volumes/Data/WebServer/newswc/php/drawmappm.php on line 243, referer: http://stagmapservice.swc.nd.gov/ Database connection failed (authentication method 10 not supported ) with connect string 'user=dauser password=****** dbname=swc host=dadatabase.blah.blah.blah port=5432' Is the database running? Is it allowing connections? Does the specified user exist? Is the password valid? Is the database on the standard port? in msPostGISLayerOpen()msPostGISLayerOpen(): Query error. Database connection failed. Check server logs for more details.Is the database running? Is it allowing connections? Does the specified user exist? Is the password valid? Is the database on the standard port? msDrawMap(): Image handling error. Failed to draw layer named 'Countries - Natl Atlas'. Is this an issue with MapServer? If so, will scram-sha-256 authentication be supported by Mapserver? Thanks, Paul MapServer version 7.6.2 OUTPUT=PNG OUTPUT=JPEG OUTPUT=KML SUPPORTS=PROJ SUPPORTS=AGG SUPPORTS=FREETYPE SUPPORTS=CAIRO SUPPORTS=ICONV SUPPORTS=WMS_SERVER SUPPORTS=WMS_CLIENT SUPPORTS=WFS_SERVER SUPPORTS=WFS_CLIENT SUPPORTS=WCS_SERVER SUPPORTS=SOS_SERVER SUPPORTS=FASTCGI SUPPORTS=GEOS SUPPORTS=POINT_Z_M SUPPORTS=PBF INPUT=JPEG INPUT=POSTGIS INPUT=OGR INPUT=GDAL INPUT=SHAPEFILE From sdlime at gmail.com Thu Feb 18 13:49:29 2021 From: sdlime at gmail.com (Steve Lime) Date: Thu, 18 Feb 2021 15:49:29 -0600 Subject: [mapserver-users] PostgreSQL authentication method. In-Reply-To: References: Message-ID: I wonder if that's more a function of the PostgreSQL client library version/capabilities. Do you know what MapServer is compiled against? You might try connecting to your database with psql as another test of the client lib. On Thu, Feb 18, 2021 at 2:25 PM Moen, Paul T. wrote: > I recently tried a Mapserver layer connected to a PostgreSQL 13.2 database > that had password_encryption = scram-sha-256. I was unsuccessful in > getting it to work until I switched it to md5 and reset the passwords. The > following error was logged and the interesting part seems to be > (authentication method 10 not supported). > > [Thu Feb 18 13:57:02.652879 2021] [php7:warn] [pid 16668] [client > 192.168.100.4:57341] PHP Warning: mapObj::drawQuery(): [MapServer > Error]: msPostGISLayerOpen(): Database connection failed. Check server logs > for more details.Is the database running? Is it allowing connections? Does > the specified user exist? Is the password valid? Is the database on the > standard port?\n in /Volumes/Data/WebServer/newswc/php/drawmappm.php on > line 243, referer: http://stagmapservice.swc.nd.gov/ > Database connection failed (authentication method 10 not supported > ) with connect string 'user=dauser password=****** dbname=swc > host=dadatabase.blah.blah.blah port=5432' > Is the database running? Is it allowing connections? Does the specified > user exist? Is the password valid? Is the database on the standard port? in > msPostGISLayerOpen()msPostGISLayerOpen(): Query error. Database connection > failed. Check server logs for more details.Is the database running? Is it > allowing connections? Does the specified user exist? Is the password valid? > Is the database on the standard port? > msDrawMap(): Image handling error. Failed to draw layer named 'Countries - > Natl Atlas'. > > Is this an issue with MapServer? If so, will scram-sha-256 authentication > be supported by Mapserver? > > Thanks, > > Paul > > MapServer version 7.6.2 OUTPUT=PNG OUTPUT=JPEG OUTPUT=KML SUPPORTS=PROJ > SUPPORTS=AGG SUPPORTS=FREETYPE SUPPORTS=CAIRO SUPPORTS=ICONV > SUPPORTS=WMS_SERVER SUPPORTS=WMS_CLIENT SUPPORTS=WFS_SERVER > SUPPORTS=WFS_CLIENT SUPPORTS=WCS_SERVER SUPPORTS=SOS_SERVER > SUPPORTS=FASTCGI SUPPORTS=GEOS SUPPORTS=POINT_Z_M SUPPORTS=PBF INPUT=JPEG > INPUT=POSTGIS INPUT=OGR INPUT=GDAL INPUT=SHAPEFILE > > _______________________________________________ > mapserver-users mailing list > mapserver-users at lists.osgeo.org > https://lists.osgeo.org/mailman/listinfo/mapserver-users > -------------- next part -------------- An HTML attachment was scrubbed... URL: From iljya.kalai at gmail.com Thu Feb 18 14:58:46 2021 From: iljya.kalai at gmail.com (Iljya Kalai) Date: Thu, 18 Feb 2021 17:58:46 -0500 Subject: [mapserver-users] Labels colliding with symbols In-Reply-To: <5d4244b77a5143e2e9845a6310457fb5@blixtmail.se> References: <5d4244b77a5143e2e9845a6310457fb5@blixtmail.se> Message-ID: Thanks Lars! Based on your workaround, it seems to me that line labeling works something like this: 1. candidate positions are computed along the line using repeat distance and other factors 2. the candidate positions that are not possible due to collisions with other labels are excluded (unless force is set) I tried to confirm this hypothesis by looking at the code, but being new to MapServer, I can't be sure. However, I did find the code that does step 1: https://github.com/MapServer/MapServer/blob/20b7671f788952c6097ae154b667dd564cf70764/mapprimitive.c#L1956 So it's likely that I'm not far from the truth. For my particular use case, I would like to label the line just once, certainly not many times. For this, it would be helpful to compute candidate placements once the restrictions on positioning are known. Is there any way to accomplish this currently? Thanks, Iljya Em qui., 18 de fev. de 2021 ?s 10:57, escreveu: > Hi, > > I have modified your example a little bit. > > I You add REPEATDISTANCE for the text and then a fake label with > transparent text above the svg symbol > I think that You get something that is close to what you are looking for. > > If You remove the last fake label block You get the old behavior that the > text is written above the symbol. > > I have inserted the code in your GIST: > https://gist.github.com/iljya/b1d58f250be11e8972ea6e5628f84b2a > > I have been experimenting without repeatdistance and I can agree with You > that the results were strange. > I thought that the fake label would do the trick, but it didn't > > /Lars Schylberg > > 17 februari 2021 kl. 20:05, "Iljya Kalai" > > skrev: > > Hi Steve, > I've created a minimal example to demonstrate the issue: > https://gist.github.com/iljya/b1d58f250be11e8972ea6e5628f84b2a > Thanks for your help, > Iljya > Em ter., 16 de fev. de 2021 ?s 20:41, Steve Lime > escreveu: > > Hmmm... Point symbols are automatically considered as part of label > placement and collision detection. Since they are drawn first, their > placement is cached and labels are placed around them. Can you share > specifics on your layers and symbols - perhaps a small test case? --Steve > On Tue, Feb 16, 2021 at 4:28 PM Iljya Kalai wrote: > > Hi, > On my map, labels sometimes overlap symbols. Is there a way to avoid this, > or are only label/label conflicts avoided? I tried both CC and AUTO for > LAYER::CLASS::LABEL::POSITION. > https://i.imgur.com/C9Ir7dA.png > Thanks! > Iljya > *# *Map file extract > ... > LAYER > NAME "LINE" > TYPE LINE > CLASS > STYLE > COLOR 0 0 0 > WIDTH 1 > END > LABEL > COLOR 150 150 150 > TYPE truetype > SIZE 10 > ANGLE AUTO > POSITION CC > TEXT "hello" > END > END > END > LAYER > NAME "SYMBOLS" > TYPE POINT > ... > CLASS > STYLE > SYMBOL "ABC" > END > END > END > ... > _______________________________________________ > mapserver-users mailing list > mapserver-users at lists.osgeo.org > https://lists.osgeo.org/mailman/listinfo/mapserver-users > > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From boolean10001 at yahoo.com Thu Feb 18 15:53:14 2021 From: boolean10001 at yahoo.com (Carlos Ruiz) Date: Thu, 18 Feb 2021 23:53:14 +0000 (UTC) Subject: [mapserver-users] PostgreSQL authentication method. In-Reply-To: References: Message-ID: <2001203109.20222.1613692394862@mail.yahoo.com> The key is the message "authentication method 10 not supported". It seems that PostgreSQL client library's version is older and does not support that encryption method. Versions 10 and later supports it. On Thursday, February 18, 2021, 3:49:48 PM CST, Steve Lime wrote: I wonder if that's more a function of the PostgreSQL client library version/capabilities. Do you know what MapServer is compiled against? You might try connecting to your database with psql as another test of the client lib. On Thu, Feb 18, 2021 at 2:25 PM Moen, Paul T. wrote: I recently tried a Mapserver layer connected to a PostgreSQL 13.2 database that had password_encryption = scram-sha-256.? I was unsuccessful in getting it to work until I switched it to md5 and reset the passwords.? The following error was logged and the interesting part seems to be (authentication method 10 not supported). [Thu Feb 18 13:57:02.652879 2021] [php7:warn] [pid 16668] [client 192.168.100.4:57341] PHP Warning:? mapObj::drawQuery(): [MapServer Error]: msPostGISLayerOpen(): Database connection failed. Check server logs for more details.Is the database running? Is it allowing connections? Does the specified user exist? Is the password valid? Is the database on the standard port?\n in /Volumes/Data/WebServer/newswc/php/drawmappm.php on line 243, referer: http://stagmapservice.swc.nd.gov/ Database connection failed (authentication method 10 not supported ) with connect string 'user=dauser password=****** dbname=swc host=dadatabase.blah.blah.blah port=5432' Is the database running? Is it allowing connections? Does the specified user exist? Is the password valid? Is the database on the standard port? in msPostGISLayerOpen()msPostGISLayerOpen(): Query error. Database connection failed. Check server logs for more details.Is the database running? Is it allowing connections? Does the specified user exist? Is the password valid? Is the database on the standard port? msDrawMap(): Image handling error. Failed to draw layer named 'Countries - Natl Atlas'. Is this an issue with MapServer?? If so, will scram-sha-256 authentication be supported by Mapserver? Thanks, Paul MapServer version 7.6.2 OUTPUT=PNG OUTPUT=JPEG OUTPUT=KML SUPPORTS=PROJ SUPPORTS=AGG SUPPORTS=FREETYPE SUPPORTS=CAIRO SUPPORTS=ICONV SUPPORTS=WMS_SERVER SUPPORTS=WMS_CLIENT SUPPORTS=WFS_SERVER SUPPORTS=WFS_CLIENT SUPPORTS=WCS_SERVER SUPPORTS=SOS_SERVER SUPPORTS=FASTCGI SUPPORTS=GEOS SUPPORTS=POINT_Z_M SUPPORTS=PBF INPUT=JPEG INPUT=POSTGIS INPUT=OGR INPUT=GDAL INPUT=SHAPEFILE _______________________________________________ mapserver-users mailing list mapserver-users at lists.osgeo.org https://lists.osgeo.org/mailman/listinfo/mapserver-users _______________________________________________ mapserver-users mailing list mapserver-users at lists.osgeo.org https://lists.osgeo.org/mailman/listinfo/mapserver-users -------------- next part -------------- An HTML attachment was scrubbed... URL: From pmoen at nd.gov Fri Feb 19 08:32:22 2021 From: pmoen at nd.gov (Moen, Paul T.) Date: Fri, 19 Feb 2021 16:32:22 +0000 Subject: [mapserver-users] PostgreSQL authentication method. In-Reply-To: <2001203109.20222.1613692394862@mail.yahoo.com> References: <2001203109.20222.1613692394862@mail.yahoo.com> Message-ID: <15595430-291B-403F-802C-AC0A91815072@nd.gov> My compiling is the problem. I have it working now, but I had to edit the cmake/FindPostgreSQL.cmake file to get it to work because the wrong libpq library was being found by cmake. I apologize for this being long, but I am not sure how else to explain my process. Also, I am new to c, c++ and cmake so I hope I don't lead anyone astray here. I am using macOS 10.15.7. I used homebrew to install the mapserver dependencies with the following command. brew install httpd php cmake pkg-config swig cairo fcgi freetype gd gdal geos giflib libpng postgresql proj protobuf-c I cloned mapserver from github, swtiched to the rel-7-6-2 tag, made a build directory, changed into the build directory and issued the following cmake. cmake .. -DCMAKE_BUILD_TYPE=RELEASE -DCMAKE_FIND_FRAMEWORK=LAST -DCMAKE_VERBOSE_MAKEFILE=ON -Wno-dev -DWITH_CLIENT_WFS=ON -DWITH_CLIENT_WMS=ON -DWITH_PHP=ON -DWITH_CURL=ON -DWITH_FCGI=ON -DWITH_FRIBIDI=OFF -DWITH_GEOS=ON -DWITH_HARFBUZZ=OFF -DWITH_KML=ON -DWITH_POSTGIS=ON -DWITH_PYTHON=OFF -DWITH_SOS=ON -DWITH_WFS=ON -WITH_CAIRO=ON -DCMAKE_SKIP_RPATH=ON -DWITH_PHPNG=ON This is where things go wrong. The pg_config for postgresql 13 is in my path, yet the PostgreSQL and libpq found is listed as something completely different than the homebrew installed postgresql which is in /usr/local/lib -- * POSTGIS: /Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/lib/libpq.tbd I added the following to the FindPostgreSQL.cmake file to see what it was finding. message(NOTICE "PG_CONFIG is set to ${PG_CONFIG}") message(NOTICE "PG_INC_PATH is set to ${PG_INC_PATH}") message(NOTICE "PG_LIB_PATH is set to ${PG_LIB_PATH}") message(NOTICE "POSTGRESQL_INCLUDE_DIR is set to ${POSTGRESQL_INCLUDE_DIR}") message(NOTICE "POSTGRESQL_LIBRARY is set to ${POSTGRESQL_LIBRARY}") The results were. PG_CONFIG is set to /usr/local/bin/pg_config PG_INC_PATH is set to /usr/local/include PG_LIB_PATH is set to /usr/local/lib POSTGRESQL_INCLUDE_DIR is set to /usr/local/include POSTGRESQL_LIBRARY is set to /Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/lib/libpq.tbd As I understand it, in the FindPostgreSQL.cmake file, the following code tries to find the pg_config file. It looks in the PATHS listed after looking the default places known to cmake. My system finds /usr/local/bin/pg_config, which is the PostgreSQL 13 installed by homebrew. find_program(PG_CONFIG NAMES pg_config PATHS $ENV{ProgramFiles}/PostgreSQL/*/bin $ENV{SystemDrive}/PostgreSQL/*/bin ) The following part executes the pg_config command, if pg_config was found, to set 2 variables to be used as search paths to find libpq-fe.h and libpq. if (PG_CONFIG) exec_program( ${PG_CONFIG} ARGS "--includedir" OUTPUT_VARIABLE PG_INC_PATH ) exec_program( ${PG_CONFIG} ARGS "--libdir" OUTPUT_VARIABLE PG_LIB_PATH ) else() message(WARNING "pg_config not found, will try some defaults") endif() At this point, the following is set on my system. PG_CONFIG is set to /usr/local/bin/pg_config PG_INC_PATH is set to /usr/local/include PG_LIB_PATH is set to /usr/local/lib The following find_path command tries to find the path where the libpg-fe.h include file is located. Since, the PG_INC_PATH on my system is set to /usr/local/include, I assumed that it would find it there and set the POSTGRESQL_INCLUDE_DIR to /usr/local/include. It doesn't because it searches additional paths, as per the documentation for find_path, before using the PATHS specified. It looks like the PATHS specified are number 7 in the search process according to documentation. https://cmake.org/cmake/help/v3.12/command/find_path.html. find_path(POSTGRESQL_INCLUDE_DIR libpq-fe.h ${PG_INC_PATH} /usr/include/server /usr/include/postgresql /usr/include/pgsql/server /usr/local/include/pgsql/server /usr/include/postgresql/server /usr/include/postgresql/*/server /usr/local/include/postgresql/server /usr/local/include/postgresql/*/server $ENV{ProgramFiles}/PostgreSQL/*/include/server $ENV{SystemDrive}/PostgreSQL/*/include/server ) The following find_path command trys to find the path where the libpq library file is located. Since, the PG_INC_PATH on my system is set to /usr/local/lib, I assumed that it would find it there and set the POSTGRESQL_INCLUDE_DIR to /usr/local/lib. It again doesn't because it searches additional paths that cmake may know. find_library(POSTGRESQL_LIBRARY NAMES pq libpq PATHS ${PG_LIB_PATH} /usr/lib /usr/local/lib /usr/lib/postgresql /usr/lib64 /usr/local/lib64 /usr/lib64/postgresql $ENV{ProgramFiles}/PostgreSQL/*/lib/ms $ENV{SystemDrive}/PostgreSQL/*/lib/ms ) To make it work, I changed the IF block for PG_CONFIG as follows. What this does is only search and use the library and include paths that are set by executing the pg_config command. If pg_config is not found, then it searches the default locations. It seems to me that if pg_config is set my by environment, then it should use my pg_config to set the library and include paths. Can anyone comment on whether this makes sense or not? if (PG_CONFIG) exec_program( ${PG_CONFIG} ARGS "--includedir" OUTPUT_VARIABLE PG_INC_PATH ) exec_program( ${PG_CONFIG} ARGS "--libdir" OUTPUT_VARIABLE PG_LIB_PATH ) find_path(POSTGRESQL_INCLUDE_DIR libpq-fe.h PATHS ${PG_INC_PATH} NO_DEFAULT_PATH ) find_library(POSTGRESQL_LIBRARY NAMES pq libpq PATHS ${PG_LIB_PATH} NO_DEFAULT_PATH ) else() message(WARNING "pg_config not found, will try some defaults") find_path(POSTGRESQL_INCLUDE_DIR libpq-fe.h /usr/include/server /usr/include/postgresql /usr/include/pgsql/server /usr/local/include/pgsql/server /usr/include/postgresql/server /usr/include/postgresql/*/server /usr/local/include/postgresql/server /usr/local/include/postgresql/*/server $ENV{ProgramFiles}/PostgreSQL/*/include/server $ENV{SystemDrive}/PostgreSQL/*/include/server ) find_library(POSTGRESQL_LIBRARY NAMES pq libpq PATHS /usr/lib /usr/local/lib /usr/lib/postgresql /usr/lib64 /usr/local/lib64 /usr/lib64/postgresql $ENV{ProgramFiles}/PostgreSQL/*/lib/ms $ENV{SystemDrive}/PostgreSQL/*/lib/ms ) endif() By changing FindPostgreSQL.cmake file I get the following results. PG_CONFIG is set to /usr/local/bin/pg_config PG_INC_PATH is set to /usr/local/include PG_LIB_PATH is set to /usr/local/lib POSTGRESQL_INCLUDE_DIR is set to /usr/local/include POSTGRESQL_LIBRARY is set to /usr/local/lib/libpq.dylib And cmake output shows the libpq that was installed from homebrew. -- * POSTGIS: /usr/local/lib/libpq.dylib After this, the compile works fine and scram-sha-256 authentication works as expected. Thanks, Paul From: Carlos Ruiz Date: Thursday, February 18, 2021 at 5:53 PM To: "Moen, Paul T." , Steve Lime Cc: "mapserver-users at lists.osgeo.org" Subject: Re: [mapserver-users] PostgreSQL authentication method. On Thursday, February 18, 2021, 3:49:48 PM CST, Steve Lime wrote: I wonder if that's more a function of the PostgreSQL client library version/capabilities. Do you know what MapServer is compiled against? You might try connecting to your database with psql as another test of the client lib. From ycharieau at sma-netagis.fr Wed Feb 24 00:09:48 2021 From: ycharieau at sma-netagis.fr (Yoann CHARIEAU) Date: Wed, 24 Feb 2021 09:09:48 +0100 (CET) Subject: [mapserver-users] Mapcache WMTS tile artifacts Message-ID: <1196971705.398766.1614154188790.JavaMail.zimbra@sma-netagis.fr> Hi everyone, I have configured a mapcache server with a few sources. Everything seems to work fine except for some wmts sources : i get random purple/blue artifacts on tiles (screenshots : https://imgur.com/a/hXgWxao) So far i tried playing around gdal_wmts xml config file, with different caches (disk, sqlite, memcache), formats (png and jpg, with rgb and ycbcr colorspace) and grids, and also tried updating gdal. Strangest thing is that artifacts disappear on tile expiration or by manually deleting tiles. Right now i?m thinking about network issues. Has anyone ever encountered these kind of artifacts ? Thanks ! Yoann -------------- next part -------------- An HTML attachment was scrubbed... URL: From Charlotte.Toma at wiesbaden.de Thu Feb 25 22:15:32 2021 From: Charlotte.Toma at wiesbaden.de (Toma, Charlotte) Date: Fri, 26 Feb 2021 06:15:32 +0000 Subject: [mapserver-users] Error/ false colored image with GetMap Message-ID: Hello, I need your help... I installed mapserver on windows server and tested the installation successful. The console output from "mapserv -v" looked like it should and my GetCapabilities worked fine. Then I tested the GetMap and GetLegend from my test-WMS and it isn't working correctly. The requests gives me a false coloured picture with jpeg and an error with png "the image can't be displayed cause it contains errors" (or so in german). I never saw something like this and after my research in the internet I still don't know what to do... The test with "shp2img -m E:/mapserv_ows/rheinek.map -o test.png -layer_debug ug_test 5" worked fine and I got the corret result as an image (jpeg and png); but only after I added the "SIZE" parameter in my mapfile. Until this I got the error "dimensions not defined / can't be calculated". My mapfile is very simple, cause i wanted to test if it works (one shapefile, one polygon, simple red fill and black outline to display). In the following cloud folder you can see my mapfile, the weird jpeg-GetMap answer and the error message: https://my.hidrive.com/lnk/jrySL9oJ Greetings Charly Mit freundlichen Gr??en im Auftrag Charlotte Toma Landeshauptstadt Wiesbaden -Der Magistrat- Stadtplanungsamt -610230- Gustav-Stresemann-Ring 15 65189 Wiesbaden Tel.: 0611 31-3436 Fax: 0611 31-3917 E-Mail: 61GIS at wiesbaden.de Internet: www.wiesbaden.de Jede nicht gedruckte Seite spart Holz, Wasser und Strom. -------------- next part -------------- An HTML attachment was scrubbed... URL: From joerg.thomsen at wheregroup.com Fri Feb 26 00:21:53 2021 From: joerg.thomsen at wheregroup.com (=?UTF-8?Q?J=c3=b6rg_Thomsen_=28WhereGroup=29?=) Date: Fri, 26 Feb 2021 09:21:53 +0100 Subject: [mapserver-users] Error/ false colored image with GetMap In-Reply-To: References: Message-ID: Hi Charly, it works (debian and ubuntu....) have you tried to switch it off and on again? ;) http://schulung.foss.academy/cgi-bin/mapserv?map=/data/charly/rheinek.map&SERVICE=WMS&VERSION=1.3.0&REQUEST=GetMap&BBOX=440663,5538120,452197,5543810&CRS=epsg:25832&WIDTH=823&HEIGHT=406&LAYERS=ug_test&STYLES=&FORMAT=image/png&DPI=96&MAP_RESOLUTION=96&FORMAT_OPTIONS=dpi:96 http://schulung.foss.academy/cgi-bin/mapserv?map=/data/charly/rheinek.map&SERVICE=WMS&VERSION=1.3.0&REQUEST=GetMap&BBOX=440663,5538120,452197,5543810&CRS=epsg:25832&WIDTH=823&HEIGHT=406&LAYERS=ug_test&STYLES=&FORMAT=image/jpeg&DPI=96&MAP_RESOLUTION=96&FORMAT_OPTIONS=dpi:96 Two ideas: what about the OUTPUTFORMAT blocks? Do you need them? perhaps there's a problem with your AGG driver in your installation my first thought pointed at your apache config, "the > image can't be displayed cause it contains errors" looks like a wrong mime-type provided by the apache. also your jpeg_error.jpg looks more like an display-error. The console-output (-v) looks O.K., you forgot to pipe the output into a file ('> test.png') How did you install mapserver and webserver? ms4w? gisinternals? regards from Berlin, J?rg Am 26.02.21 um 07:15 schrieb Toma, Charlotte: > ? > > Hello, > > ? > > I need your help? > > I installed mapserver on windows server and tested the installation > successful. The console output from ?mapserv ?v? looked like it should > and my GetCapabilities worked fine. Then I tested the GetMap and > GetLegend from my test-WMS and it isn?t working correctly. The requests > gives me a false coloured picture with jpeg and an error with png "the > image can't be displayed cause it contains errors" (or so in german). I > never saw something like this and after my research in the internet I > still don?t know what to do? > > ? > > The test with ?shp2img -m E:/mapserv_ows/rheinek.map -o test.png > -layer_debug ug_test 5? worked fine and I got the corret result as an > image (jpeg and png); but only after I added the ?SIZE? parameter in my > mapfile. Until this I got the error ?dimensions not defined / can?t be > calculated?. > > ? > > My mapfile is very simple, cause i wanted to test if it works (one > shapefile, one polygon, simple red fill and black outline to display). > In the following cloud folder you can see my mapfile, the weird > jpeg-GetMap answer and the error message: > > ? > > https://my.hidrive.com/lnk/jrySL9oJ > > ? > > Greetings > > Charly > > Mit freundlichen Gr??en > im Auftrag > > Charlotte Toma > > Landeshauptstadt Wiesbaden > -Der Magistrat- > > Stadtplanungsamt > -610230- > Gustav-Stresemann-Ring 15 > 65189 Wiesbaden > Tel.: 0611 31-3436 > Fax: 0611 31-3917 > E-Mail: 61GIS at wiesbaden.de > Internet: www.wiesbaden.de > > Jede nicht gedruckte Seite spart Holz, Wasser und Strom. > > ? > > > _______________________________________________ > mapserver-users mailing list > mapserver-users at lists.osgeo.org > https://lists.osgeo.org/mailman/listinfo/mapserver-users > Viele Gr??e, J?rg Thomsen -- --------------------------------------------- Einladung zum Mapbender Anwendertreffen online am 25.03.2021 https://mapbender.org --------------------------------------------- J?rg Thomsen WhereGroup GmbH Bundesallee 23 10717 Berlin Germany Fon: +49 (0)30 / 5130 278 74 Fax: +49 (0)30 / 5130 278 11 joerg.thomsen at wheregroup.com www.wheregroup.com Gesch?ftsf?hrer: Olaf Knopp, Peter Stamm Amtsgericht Bonn, HRB 9885 ------------------------------- Folgen Sie der WhereGroup auf twitter: http://twitter.com/WhereGroup_com From Charlotte.Toma at wiesbaden.de Fri Feb 26 01:25:44 2021 From: Charlotte.Toma at wiesbaden.de (Toma, Charlotte) Date: Fri, 26 Feb 2021 09:25:44 +0000 Subject: [mapserver-users] Error/ false colored image with GetMap In-Reply-To: References: Message-ID: <4b3046289c2e4b59a295837b8af6a407@wiesbaden.de> Hi J?rg, nice to hear from you ;) I'm quite happy, that the mapfile is ok and works on your system - thanks for the test! The same error occured without the OUTPUTFORMAT-blocks. I installed mapserver with the bundle from gisinternals (extract to "C:\mapserver", run SDKShell.bat as admin, integrate in apache with alias). This is my mapserv-info: MapServer version 7.6.2 OUTPUT=GIF OUTPUT=PNG OUTPUT=JPEG OUTPUT=PDF SUPPORTS=PROJ SUPPORTS=GD SUPPORTS=AGG SUPPORTS=FREETYPE SUPPORTS=CAIRO SUPPORTS=OPENGL SUPPORTS=ICONV SUPPORTS=FRIBIDI SUPPORTS=WMS_SERVER SUPPORTS=WMS_CLIENT SUPPORTS=WFS_SERVER SUPPORTS=WFS_CLIENT SUPPORTS=WCS_SERVER SUPPORTS=SOS_SERVER SUPPORTS=FASTCGI SUPPORTS=THREADS SUPPORTS=GEOS INPUT=JPEG INPUT=POSTGIS INPUT=SHAPEFILE My apache-alias: Alias /mapserv/ "C:/mapserver/bin/ms/apps/" AddHandler cgi-script .cgi .exe SetHandler cgi-script Options +ExecCGI Require all granted If the problem ist the AGG driver or wrong mime-type provided by the apache... how can i fix or test this? Missing dll/ permission or something like this? Greetings from sunny Darmstadt Charly -----Urspr?ngliche Nachricht----- Von: mapserver-users [mailto:mapserver-users-bounces at lists.osgeo.org] Im Auftrag von J?rg Thomsen (WhereGroup) Gesendet: Freitag, 26. Februar 2021 09:22 An: mapserver-users at lists.osgeo.org Betreff: Re: [mapserver-users] Error/ false colored image with GetMap Hi Charly, it works (debian and ubuntu....) have you tried to switch it off and on again? ;) http://schulung.foss.academy/cgi-bin/mapserv?map=/data/charly/rheinek.map&SERVICE=WMS&VERSION=1.3.0&REQUEST=GetMap&BBOX=440663,5538120,452197,5543810&CRS=epsg:25832&WIDTH=823&HEIGHT=406&LAYERS=ug_test&STYLES=&FORMAT=image/png&DPI=96&MAP_RESOLUTION=96&FORMAT_OPTIONS=dpi:96 http://schulung.foss.academy/cgi-bin/mapserv?map=/data/charly/rheinek.map&SERVICE=WMS&VERSION=1.3.0&REQUEST=GetMap&BBOX=440663,5538120,452197,5543810&CRS=epsg:25832&WIDTH=823&HEIGHT=406&LAYERS=ug_test&STYLES=&FORMAT=image/jpeg&DPI=96&MAP_RESOLUTION=96&FORMAT_OPTIONS=dpi:96 Two ideas: what about the OUTPUTFORMAT blocks? Do you need them? perhaps there's a problem with your AGG driver in your installation my first thought pointed at your apache config, "the > image can't be displayed cause it contains errors" looks like a wrong mime-type provided by the apache. also your jpeg_error.jpg looks more like an display-error. The console-output (-v) looks O.K., you forgot to pipe the output into a file ('> test.png') How did you install mapserver and webserver? ms4w? gisinternals? regards from Berlin, J?rg Am 26.02.21 um 07:15 schrieb Toma, Charlotte: > ? > > Hello, > > ? > > I need your help. > > I installed mapserver on windows server and tested the installation > successful. The console output from "mapserv -v" looked like it should > and my GetCapabilities worked fine. Then I tested the GetMap and > GetLegend from my test-WMS and it isn't working correctly. The > requests gives me a false coloured picture with jpeg and an error with > png "the image can't be displayed cause it contains errors" (or so in > german). I never saw something like this and after my research in the > internet I still don't know what to do. > > ? > > The test with "shp2img -m E:/mapserv_ows/rheinek.map -o test.png > -layer_debug ug_test 5" worked fine and I got the corret result as an > image (jpeg and png); but only after I added the "SIZE" parameter in > my mapfile. Until this I got the error "dimensions not defined / can't > be calculated". > > ? > > My mapfile is very simple, cause i wanted to test if it works (one > shapefile, one polygon, simple red fill and black outline to display). > In the following cloud folder you can see my mapfile, the weird > jpeg-GetMap answer and the error message: > > ? > > https://my.hidrive.com/lnk/jrySL9oJ > > ? > > Greetings > > Charly > > Mit freundlichen Gr??en > im Auftrag > > Charlotte Toma > > Landeshauptstadt Wiesbaden > -Der Magistrat- > > Stadtplanungsamt > -610230- > Gustav-Stresemann-Ring 15 > 65189 Wiesbaden > Tel.: 0611 31-3436 > Fax: 0611 31-3917 > E-Mail: 61GIS at wiesbaden.de > Internet: www.wiesbaden.de > > Jede nicht gedruckte Seite spart Holz, Wasser und Strom. > > ? > > > _______________________________________________ > mapserver-users mailing list > mapserver-users at lists.osgeo.org > https://lists.osgeo.org/mailman/listinfo/mapserver-users > Viele Gr??e, J?rg Thomsen -- --------------------------------------------- Einladung zum Mapbender Anwendertreffen online am 25.03.2021 https://mapbender.org --------------------------------------------- J?rg Thomsen WhereGroup GmbH Bundesallee 23 10717 Berlin Germany Fon: +49 (0)30 / 5130 278 74 Fax: +49 (0)30 / 5130 278 11 joerg.thomsen at wheregroup.com www.wheregroup.com Gesch?ftsf?hrer: Olaf Knopp, Peter Stamm Amtsgericht Bonn, HRB 9885 ------------------------------- Folgen Sie der WhereGroup auf twitter: http://twitter.com/WhereGroup_com _______________________________________________ mapserver-users mailing list mapserver-users at lists.osgeo.org https://lists.osgeo.org/mailman/listinfo/mapserver-users