Re: [mapserver-users] Named WMS styles - CLASSGROUP and GROUP
Have you tried using GROUP ST instead of wms_layer_group metadata? This seems to be the intended way to create a named group that can be requested. There seems to be no way to declare styles at group (or root) level. Requesting the group ST with style grey or color works but clients might be confused if the capabilities advertise a style at each leaf layer but none at group level. Changing your mapfile to LAYER NAME circle GROUP ST METADATA # wms_layer_group /ST/circles ... LAYER NAME square GROUP ST METADATA # wms_layer_group /ST/squares At least allows requesting the group ST with style color or grey: ...layers=STstyles=grey... or ...layers=STstyles=color... and requesting each single leaf layer: ...layers=circle,squarestyles=color,grey... HTH -Ursprüngliche Nachricht- Von: mapserver-users-boun...@lists.osgeo.org [mailto:mapserver-users- boun...@lists.osgeo.org] Im Auftrag von lars.schylb...@blixtmail.se Gesendet: Donnerstag, 28. Mai 2015 15:38 An: mapserver-users@lists.osgeo.org Betreff: Re: [mapserver-users] Named WMS styles - CLASSGROUP and GROUP Hi again, I have modified my example and found out some things that works and some that don't work. Actually I got a little furhter looking at: https://github.com/mapserver/mapserver/issues/4660 One layer with layer name as Layer=square gives correct result with both styles=color and styles=grey. That is the layer name from the Layer name declaration. http://localhost/cgi- bin/mapserv?map=/home/lars/Maps/Style_test/style_test_5.mapSERVICE=WMSRE QUEST=GetmapVERSION=1.1.1 LAYERS=squarestyles=grey srs=EPSG:4326BBOX=0,0,20,15FORMAT=image/pngWIDTH=200HEIGHT=150 Two layers with layer name as Layer=square,circle gives correct result if I give two arguments to styles ie. styles=grey,grey or styles=color,color or styles=grey,color. http://localhost/cgi- bin/mapserv?map=/home/lars/Maps/Style_test/style_test_5.mapSERVICE=WMSRE QUEST=GetmapVERSION=1.1.1 LAYERS=circle,squarestyles=grey,grey srs=EPSG:4326BBOX=0,0,20,15FORMAT=image/pngWIDTH=200HEIGHT=150 If I specify the layer with layers from wms_layer_group /ST/circles and /ST/squares that is layers=circles,squares it seem like the style given with styles parameter is ignored. It is only showing the default CLASSGROUP regardless of how styles is specified. as long as I have two arguments. http://localhost/cgi- bin/mapserv?map=/home/lars/Maps/Style_test/style_test_5.mapSERVICE=WMSRE QUEST=GetmapVERSION=1.1.1 LAYERS=squares,circlesstyles=grey,grey srs=EPSG:4326BBOX=0,0,20,15FORMAT=image/pngWIDTH=200HEIGHT=150 It seems like the style is not assosiated with the the layer handling with wms_layer_groups. I suspect that there is some undocumented way to do that. If I specify the layers with the root layer name , ST http://localhost/cgi- bin/mapserv?map=/home/lars/Maps/Style_test/style_test_5.mapSERVICE=WMSRE QUEST=GetmapVERSION=1.1.1 LAYERS=STstyles=grey srs=EPSG:4326BBOX=0,0,20,15FORMAT=image/pngWIDTH=200HEIGHT=150 I get the following error. ServiceException code=StyleNotDefined msWMSLoadGetMapParams(): WMS server error. Style (grey) not defined on root layer. /ServiceException So to conclude, I am wordering if there is a way to specify the style for the root layer? Because that is really what I would like to do. Second question is how do I associate the style to layers in wms_layer_group instead of the layers specified in the layer name. I hope this wasn't to long. All input would be welcome. Lars Schylberg New mapfile: style_test_5.map -- MAP NAME ST EXTENT 0 0 20 15 SIZE 200 150 UNITS DD IMAGECOLOR 200 200 200 CONFIG MS_ERRORFILE /tmp/style_test.log DEBUG 5 OUTPUTFORMAT NAME 'AGG' DRIVER AGG/PNG IMAGEMODE RGB END WEB IMAGEPATH /tmp/ms_tmp/ IMAGEURL /ms_tmp/ METADATA wms_srs EPSG:3006 EPSG:4326 ows_enable_request * END END PROJECTION init=epsg:4326 END SYMBOL NAME circle TYPE ELLIPSE FILLED TRUE POINTS 1 1 END END SYMBOL NAME square TYPE VECTOR FILLED TRUE POINTS 0 0 0 1 1 1 1 0 0 0 END END # # Start of layer definitions # LAYER NAME circle TYPE POINT FEATURE POINTS 10 5 END END FEATURE POINTS 15 10 END END METADATA wms_title Circles wms_enable_request * wms_layer_group /ST/circles END STATUS on CLASSGROUP color CLASS NAME circle-color GROUP color STYLE COLOR 255 0 0 SIZE 15 WIDTH 1 SYMBOL circle END
Re: [mapserver-users] [EXTERNAL] Re: Mapserver 7+oracle - wfs getFeature with filter on numeric field
But the original post was about a WFS filter and it's schema defines the Literal element very loosely as xsd:element name=Literal type=ogc:LiteralType substitutionGroup=ogc:expression/ xsd:complexType name=LiteralType xsd:complexContent mixed=true xsd:extension base=ogc:ExpressionType xsd:sequence xsd:any minOccurs=0/ /xsd:sequence /xsd:extension /xsd:complexContent /xsd:complexType And the implementation specification is also very imprecise about it: The Literal element is used to encode literal scalar and geometric values. So the schema does not restrict the Literal's value to be xsd:double nor does the spec. FES 2.0 adds a type attribute and uses a XML schema datatype as example. Therefore I guess it's intended that a Literal element holds content matching the datatype advertised by a DescribeFeatureType request. -Ursprüngliche Nachricht- Von: mapserver-users-boun...@lists.osgeo.org [mailto:mapserver-users- boun...@lists.osgeo.org] Im Auftrag von Gertjan van Oosten Gesendet: Donnerstag, 28. Mai 2015 15:07 An: Rahkonen Jukka (MML); mapserver-users@lists.osgeo.org Betreff: Re: [mapserver-users] [EXTERNAL] Re: Mapserver 7+oracle - wfs getFeature with filter on numeric field As quoted from Rahkonen Jukka (MML) jukka.rahko...@maanmittauslaitos.fi: By reading the GML 3 standard it for example defines that Real and Number are of type xsd:double, and following that path to http://books.xmlschemata.org/relaxng/ch19-77065.html [Missed Jukka's reply first time round.] Yes, xsd:double (not xsd:float as in my previous reply). Which means the gory details are in: http://www.w3.org/TR/xmlschema11-2/#nt-doubleRep but everything else remains the same, notably: a decimal *point*. Cheers, -- -- Gertjan van Oosten, Principal Consultant, West Consulting B.V. -- gert...@west.nl +31 15 2191 600 www.west.nl ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
Re: [mapserver-users] getting corrupted png with WMS request to mapserv CGI on command line
thx for input, find comments inline On Thu, 28 May 2015 08:41:22 -0300, Jeff McKenna jmcke...@gatewaygeomatics.com wrote: Some thoughts on your pull request: - since you are submitting a docs enhancement, be sure to consider all platforms (e.g. in your example also include options for Windows users, where there is no 'tail' command) I am not a windows user, therefore I con only do reseacrh and commented on pull request: https://github.com/mapserver/docs/pull/121 and hope someone verifies this :) - consider submitting your request to the branch-7-0 They explicitly state that pull requests shoould be on branch 6.4: https://github.com/mapserver/docs ciao,renzo -jeff On 2015-05-28 3:49 AM, Renzo Kottmann wrote: thx Fabian, indeed you are right. However, is this then a bug or a feature? In any case, I thought it might be helpful to improve the documentation to a) point out that use of OGC compliant requests is possible and b) that for creating png it is important to remove first 3 lines. See pull request https://github.com/mapserver/docs/pull/121 . bests,renzo On Wed, 27 May 2015 15:36:32 +0200, Fabian Schindler fabian.schind...@eox.at wrote: Renzo, As far as I remember you have to remove the HTTP headers from the response (the first 2-4 lines or so) when you use mapserv -nh with OGC services. Regards, Fabian On 27.05.15 13:02, Renzo Kottmann wrote: nope. I tried IMAGEPATH /tmp/ and IMAGEPATH /tmp both still result in corrupt pngs. thx,renzo On Wed, 27 May 2015 12:12:02 +0200, thomas bonfort thomas.bonf...@gmail.com wrote: IMAGEPATH /tmp/ should be changed to IMAGEPATH /tmp/ -- thomas On 27 May 2015 at 11:47, Renzo Kottmann rkott...@mpi-bremen.de wrote: Hi All, I have installed mapserver 6.4.1 in a docker container based on debian jessie (see dockerfile below) If I run: /usr/lib/cgi-bin/mapserv -nh QUERY_STRING=EXCEPTIONS=application/vnd.ogc.se_inimageREQUEST=GetMapSERVICE=WMSVERSION=1.1.1map=/genes-mapserver/wms_test.mapSRS=EPSG:4326BBOX=-180,-90,180,90FORMAT=image/pngWIDTH=1080HEIGHT=614STYLES=LAYERS=satellite_mod /tmp/test.png The png is corrupt and I can not open it with neither gimp nor firefox. However, I get valid pngs using the very same map file with shp2img or mapserv -nh QUERY_STRING=map=/genes-mapserver/wms_test.mapmode=maplayers=satellite_mod . Find below more details (mapserver version, exact command lines I used and resulting debug logs, map file, and docker file) I searched google, the mailing list archives, but nothing seems to be similar to this problem. Therefore, any help is very much appreciated :) ciao, renzo * Mapserver Version: MapServer version 6.4.1 OUTPUT=GIF OUTPUT=PNG OUTPUT=JPEG OUTPUT=KML SUPPORTS=PROJ SUPPORTS=GD 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 INPUT=JPEG INPUT=POSTGIS INPUT=OGR INPUT=GDAL INPUT=SHAPEFILE * Command lines Generates valid png: /usr/lib/cgi-bin/mapserv -nh QUERY_STRING=map=/genes-mapserver/wms_test.mapmode=maplayers=satellite_mod /tmp/test.png shp2img --all_debug 2 -m /genes-mapserver/wms_test.map -o /tmp/test.png Generates invalid corrupt png: /usr/lib/cgi-bin/mapserv -nh QUERY_STRING=EXCEPTIONS=application/vnd.ogc.se_inimageREQUEST=GetMapSERVICE=WMSVERSION=1.1.1map=/genes-mapserver/wms_test.mapSRS=EPSG:4326BBOX=-180,-90,180,90FORMAT=image/pngWIDTH=1080HEIGHT=614STYLES=LAYERS=satellite_mod /tmp/test.png * Log file (for all three runs in that order): [Wed May 27 08:51:44 2015].475696 CGI Request 1 on process 79 [Wed May 27 08:51:44 2015].476881 msDrawMap(): rendering using outputformat named png (AGG/PNG). [Wed May 27 08:51:44 2015].476916 msDrawMap(): WMS/WFS set-up and query, 0.000s [Wed May 27 08:51:44 2015].478222 msDrawRasterLayerLow(satellite_mod): entering. [Wed May 27 08:51:45 2015].16608 msDrawMap(): Layer 0 (satellite_mod), 0.540s [Wed May 27 08:51:45 2015].16665 msDrawMap(): Drawing Label Cache, 0.000s [Wed May 27 08:51:45 2015].16677 msDrawMap() total time: 0.541s [Wed May 27 08:51:45 2015].38545 msSaveImage(stdout) total time: 0.022s [Wed May 27 08:51:45 2015].38838 mapserv request processing time (msLoadMap not incl.): 0.563s [Wed May 27 08:56:29 2015].752703 msDrawMap(): rendering using outputformat named png (AGG/PNG). [Wed May 27 08:56:29 2015].752820 msDrawMap(): WMS/WFS set-up and query, 0.000s [Wed May 27 08:56:29 2015].754465 msDrawRasterLayerLow(satellite_mod): entering. [Wed May 27 08:56:30 2015].295590 msDrawMap(): Layer 0 (satellite_mod), 0.543s [Wed May 27 08:56:30 2015].295664 msDrawMap(): Drawing Label Cache, 0.000s [Wed May 27 08:56:30 2015].295684 msDrawMap() total time: 0.544s [Wed May 27 08:56:30 2015].323794
Re: [mapserver-users] [EXTERNAL] Re: Mapserver 7+oracle - wfs getFeature with filter on numeric field
As quoted from Eichner, Andreas - SID andreas.eich...@sid.sachsen.de: And the implementation specification is also very imprecise about it: The Literal element is used to encode literal scalar and geometric values. So the schema does not restrict the Literal's value to be xsd:double nor does the spec. FES 2.0 adds a type attribute and uses a XML schema datatype as example. Therefore I guess it's intended that a Literal element holds content matching the datatype advertised by a DescribeFeatureType request. In which case it boils down to: so what is actually advertised in the DescribeFeatureType response? There we see that a feature has an attribute called 'type'. In the end this will have to be a defined type with a defined representation, otherwise it will be anybody's guess what happens (e.g. if my client has a locale with decimal comma and the server has a locale with decimal point, who's to say what's the truth when I send the value 1,234 ?). If it's a standard type like xsd:double, its representation is defined in the W3C standard. Cheers, -- -- Gertjan van Oosten, Principal Consultant, West Consulting B.V. -- gert...@west.nl +31 15 2191 600 www.west.nl ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
Re: [mapserver-users] Named WMS styles - CLASSGROUP and GROUP
Thanks for the input Andreas, Yes, your aproach works and might be part of the solution. I think that You are right about that WMS styles are intended be used with LAYER.GROUP. What makes me wonder is the statement in the INSPIRE section of Mapserver manual about the root layer. http://mapserver.org/ogc/inspire.html#style-section-for-root-layer-and-possibly-existing-group-layers - The following method is implemented to support (customizable) style sections in the root layer: - use wms_style_name in the WEB.METADATA section to add a style section to the root layer - use wms_style_title to override the style title (optional) - use wms_style_legendurl_* to override width, heigth, format and href of the legendURL (optional) and possibly existing group layers: - use wms_group_style_name in the first corresponding LAYER.METADATAsection to add a style section to the group layer Is that only valid when INSPIRE support has been activated? Or could this be achieved with regular mapserver conf. When I specify wms_style_name grey or color in the WEB.METADATA section it seems to accept that I have a root level style but it is not using it. But I can only specify one. Specifying wms_group_style_name in LAYER.METADATA seems to do nothing. So I have no way to specify the other possible style. I have tried both with Mapserver 6.4.1 and 7.0beta. I have also tried both WMS 1.1.1 and 1.3.0. My real use case is 150 - 300 layers and 3-7 groups. Thanks again, Lars Schylberg -Originalmeddelande- Från: Eichner, Andreas - SID andreas.eich...@sid.sachsen.de Till: lars.schylb...@blixtmail.se, mapserver-users@lists.osgeo.org Datum: 2015-05-29 10:51 Ämne: AW: [mapserver-users] Named WMS styles - CLASSGROUP and GROUP Have you tried using GROUP ST instead of wms_layer_group metadata? This seems to be the intended way to create a named group that can be requested. There seems to be no way to declare styles at group (or root) level. Requesting the group ST with style grey or color works but clients might be confused if the capabilities advertise a style at each leaf layer but none at group level. Changing your mapfile to LAYER NAME circle GROUP ST METADATA # wms_layer_group /ST/circles ... LAYER NAME square GROUP ST METADATA # wms_layer_group /ST/squares At least allows requesting the group ST with style color or grey: ...layers=STstyles=grey... or ...layers=STstyles=color... and requesting each single leaf layer: ...layers=circle,squarestyles=color,grey... HTH ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
[mapserver-users] Issue adding mapcache into AutoCAD Civil 3D via WMS
Hello, I am having trouble loading the MapCache WMS layers into AutoCAD Civil 3D. I set the projection to my county coordinates, which is what MapCache uses. Next I loaded the MapCache WMS server. Unfortunately I got an error: There was a problem adding data to Map. Failed to get bands data. The HTTP request could not be understood by the server due to malformed syntax. I was able to load other WMS layers in AutoCAD. In ArcMap, I initially received an error that there is no grid with suitable srs found for the layer. This issue was quickly resolved when I changed the coordinate system to county coordinates? Questions: If possible, What needs to be done so that I can load mapcache layers into AutoCAD Civil 3D? Do I just need to break down and cache the WGS 84 grid? Thank You Sincerely, Mark Volz ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
Re: [mapserver-users] Issue adding mapcache into AutoCAD Civil 3D via WMS
Whenever I have problems with WMS or cache requests, I always start with the actual request (example: if QGIS has problems, either get the full WMS request through QGIS logs, or check the Apache logs on the server). Then I would paste that request in a browser window and see the actual response from the MapServer server. You might actually even paste the full WMS request here for the community to analyze. I bet that would help you diagnose your problem. -jeff -- Jeff McKenna MapServer Consulting and Training Services http://www.gatewaygeomatics.com/ On 2015-05-29 11:52 AM, Mark Volz wrote: Hello, I am having trouble loading the MapCache WMS layers into AutoCAD Civil 3D. I set the projection to my county coordinates, which is what MapCache uses. Next I loaded the MapCache WMS server. Unfortunately I got an error: There was a problem adding data to Map. Failed to get bands data. The HTTP request could not be understood by the server due to malformed syntax. I was able to load other WMS layers in AutoCAD. In ArcMap, I initially received an error that there is no grid with suitable srs found for the layer. This issue was quickly resolved when I changed the coordinate system to county coordinates? Questions: If possible, What needs to be done so that I can load mapcache layers into AutoCAD Civil 3D? Do I just need to break down and cache the WGS 84 grid? Thank You Sincerely, *Mark Volz* ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
Re: [mapserver-users] Issue adding mapcache into AutoCAD Civil 3D via WMS
FWIW, Firebug (Firefox add-in) or similar tools are invaluable for getting the request string if you are using openlayers. cheers Ben On 2015-05-29, at 23:08 , Jeff McKenna jmcke...@gatewaygeomatics.com wrote: Whenever I have problems with WMS or cache requests, I always start with the actual request (example: if QGIS has problems, either get the full WMS request through QGIS logs, or check the Apache logs on the server). Then I would paste that request in a browser window and see the actual response from the MapServer server. You might actually even paste the full WMS request here for the community to analyze. I bet that would help you diagnose your problem. -jeff -- Jeff McKenna MapServer Consulting and Training Services http://www.gatewaygeomatics.com/ On 2015-05-29 11:52 AM, Mark Volz wrote: Hello, I am having trouble loading the MapCache WMS layers into AutoCAD Civil 3D. I set the projection to my county coordinates, which is what MapCache uses. Next I loaded the MapCache WMS server. Unfortunately I got an error: There was a problem adding data to Map. Failed to get bands data. The HTTP request could not be understood by the server due to malformed syntax. I was able to load other WMS layers in AutoCAD. In ArcMap, I initially received an error that there is no grid with suitable srs found for the layer. This issue was quickly resolved when I changed the coordinate system to county coordinates? Questions: If possible, What needs to be done so that I can load mapcache layers into AutoCAD Civil 3D? Do I just need to break down and cache the WGS 84 grid? Thank You Sincerely, *Mark Volz* ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users -- Ben Madin t : +61 8 6102 5535 m : +61 448 887 220 e : b...@ausvet.com.au AusVet Animal Health Services Western Australia AusVet's website: http://www.ausvet.com.au This transmission is for the intended addressee only and is confidential information. If you have received this transmission in error, please delete it and notify the sender. The contents of this email are the opinion of the writer only and are not endorsed by AusVet Animal Health Services unless expressly stated otherwise. Although AusVet uses virus scanning software we do not accept liability for viruses or similar in any attachments. Thanks for reading. ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users