[mapserver-users] Named style and WMS capabilities document
I'm trying to configure a layer with two styles, let's say: - default - style_2 I'm trying this code: LAYER CLASSGROUP default CLASSITEM urn_litho1 ... CLASS NAME some name GROUP default EXPRESSIONsome expression COLOR 000 END ... CLASS NAME some nemae GROUP style_2 EXPRESSION([some item] eq some expression) COLOR 254 254 254 END Now my problem is that only style_2 is advertised in the GetCapabilities response. On the other side default is still available to a GetLegendGraphic request when I use STYLE= or STYLE=default Can someone help? Thanks Pasquale -- Pasquale Di Donato web: www.padido.eu chat: pad...@jabber.org ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
[mapserver-users] WMS server error. Invalid layer(s) given in the LAYERS parameter
I am not sure if I double-posted this - if so - apologies! I installed MS4W a few days ago to put together a small proof-of-concept. I've been through the tutorial, which I got to work with a little tweaking. When I attempt to use an Oracle spatial table, I get a MS server error: Invalid layers(s)... error - which gives me little indication of where I am going wrong. Can anyone spot a problem here? I am running out of hair to pull out. I have the Oracle client installed on my local machine and am attempting to draw a map from a spatial table on a local vm on which I have Oracle Spatial running (10g). I tried OGRINFO using the Oracle login credentials and table name - with immediate success. mapserv -v shows that ORACLESPATIAL is a valid option GetCapabiltiies contains no warnings The map file is very simple - I have tried at least one hundred variations. The data table has a SRID (though I have other tables with SRIDs and tables without). I've included the SRID in wms_srs and I have excluded it. I am beginning to believe the problem lies elsewhere - but have no idea what approach to use to find it, other than stabbing in the dark. The map file contents are listed below. Thanks for any advice/pointers you can offer. MAP NAME Map1 SIZE 600 400 WEB IMAGEPATH /tmp/ms_tmp/ TEMPLATE ..\Templates\TEMPLATE2.HTML METADATA wms_enable_request * wms_titleTestMap wms_srs EPSG:2205 END END LAYER NAME TestMap TYPE LINE STATUS ON UNITS METERS CONNECTIONTYPE ORACLESPATIAL CONNECTION test_user/test_user@LOCALVM1 DATA SHAPE FROM (SELECT SHAPE FROM XNA_ROUTES) METADATA wms_enable_request * wms_nameTestMap wms_titleTestMapTitle wms_srs EPSG:4326 wms_format image/gif END END #LAYER END #MAP -- View this message in context: http://osgeo-org.1560.x6.nabble.com/WMS-server-error-Invalid-layer-s-given-in-the-LAYERS-parameter-tp5079259.html Sent from the Mapserver - User mailing list archive at Nabble.com. ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
Re: [mapserver-users] WMS server error. Invalid layer(s) given in the LAYERS parameter
The error means you're asking for a layer in you WMS request that doesn't exist in the service. Basically it's not defined in the mapfile. I'd guess you have a typo someplace. Steve -Original Message- From: mapserver-users-boun...@lists.osgeo.org [mailto:mapserver-users-boun...@lists.osgeo.org] On Behalf Of Paul S Sent: Monday, September 23, 2013 8:44 AM To: mapserver-users@lists.osgeo.org Subject: [mapserver-users] WMS server error. Invalid layer(s) given in the LAYERS parameter I am not sure if I double-posted this - if so - apologies! I installed MS4W a few days ago to put together a small proof-of-concept. I've been through the tutorial, which I got to work with a little tweaking. When I attempt to use an Oracle spatial table, I get a MS server error: Invalid layers(s)... error - which gives me little indication of where I am going wrong. Can anyone spot a problem here? I am running out of hair to pull out. I have the Oracle client installed on my local machine and am attempting to draw a map from a spatial table on a local vm on which I have Oracle Spatial running (10g). I tried OGRINFO using the Oracle login credentials and table name - with immediate success. mapserv -v shows that ORACLESPATIAL is a valid option GetCapabiltiies contains no warnings The map file is very simple - I have tried at least one hundred variations. The data table has a SRID (though I have other tables with SRIDs and tables without). I've included the SRID in wms_srs and I have excluded it. I am beginning to believe the problem lies elsewhere - but have no idea what approach to use to find it, other than stabbing in the dark. The map file contents are listed below. Thanks for any advice/pointers you can offer. MAP NAME Map1 SIZE 600 400 WEB IMAGEPATH /tmp/ms_tmp/ TEMPLATE ..\Templates\TEMPLATE2.HTML METADATA wms_enable_request * wms_titleTestMap wms_srs EPSG:2205 END END LAYER NAME TestMap TYPE LINE STATUS ON UNITS METERS CONNECTIONTYPE ORACLESPATIAL CONNECTION test_user/test_user@LOCALVM1 DATA SHAPE FROM (SELECT SHAPE FROM XNA_ROUTES) METADATA wms_enable_request * wms_nameTestMap wms_titleTestMapTitle wms_srs EPSG:4326 wms_format image/gif END END #LAYER END #MAP -- View this message in context: http://osgeo-org.1560.x6.nabble.com/WMS-server-error-Invalid-layer-s-given-in-the-LAYERS-parameter-tp5079259.html Sent from the Mapserver - User mailing list archive at Nabble.com. ___ 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] WMS server error. Invalid layer(s) given in the LAYERS parameter
Thanks Steve, Here is the URL I am using ... http://localhost/cgi-bin/mapserv.exe? map=C:\ms4w\Apache\TEST_Routes.map LAYER=TestMap SERVICE=WMS VERSION=1.1.1 REQUEST=GetMap I wish/hope it is something as simple as a misspelling! But I do not see it. Paul -- View this message in context: http://osgeo-org.1560.x6.nabble.com/WMS-server-error-Invalid-layer-s-given-in-the-LAYERS-parameter-tp5079259p5079278.html Sent from the Mapserver - User mailing list archive at Nabble.com. ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
Re: [mapserver-users] WMS server error. Invalid layer(s) given in the LAYERS parameter
Hi, Your latest mail shows that you do not know yet how a complete and valid GetMap request looks like. Later in this mail you will see an example. Read about EXTENT from http://mapserver.org/mapfile/map.html Read carefully http://mapserver.org/ogc/wms_server.html The mapfile on this page is quite a bit more complete than yours but we can try to improve it. Let's have a try by using EPSG:4326 as a default output projection - Add MS_ERRORFILE into your mapfile at MAP level - Add EXTENT -90 -180 90 180 at MAP level (or better the real extents of your data in EPSG:4326 units) - Add UNITS DD at MAP level - Add projection block at MAP level PROJECTION init=epsg:4326 END - Add projection block at LAYER level (what is the projection of your table in Oracle?) - Add DEBUG 5 at LAYER level - Make your request and look what gets written into the MS_ERRORFILE. Tell us how your GetMap looks like. If you do not know, have a look at the logfile \ms4w\Apache\logs\access.log, the request get logged there. Proper request would look about like this http://localhost/cgi-bin/mapserv.exe?map=your.map; REQUEST=GetMap SERVICE=WMS VERSION=1.1.1 WIDTH=459 HEIGHT=651 LAYERS=TestMap TRANSPARENT=TRUE FORMAT=image/png BBOX=-180,-90,180,90 SRS=EPSG:4326 STYLES= The error suggests that you are giving a layer name that does not exist in your system, thus something else than TestMap. It may not be a good idea to have same name for the service and layer. Consider renaming the service into TestService and layer into TestLayer, it may save your hair in the future. I hope this helps you a bit further. -Jukka Rahkonen- Paul S wrote: I am not sure if I double-posted this - if so - apologies! I installed MS4W a few days ago to put together a small proof-of-concept. I've been through the tutorial, which I got to work with a little tweaking. When I attempt to use an Oracle spatial table, I get a MS server error: Invalid layers(s)... error - which gives me little indication of where I am going wrong. Can anyone spot a problem here? I am running out of hair to pull out. I have the Oracle client installed on my local machine and am attempting to draw a map from a spatial table on a local vm on which I have Oracle Spatial running (10g). I tried OGRINFO using the Oracle login credentials and table name - with immediate success. mapserv -v shows that ORACLESPATIAL is a valid option GetCapabiltiies contains no warnings The map file is very simple - I have tried at least one hundred variations. The data table has a SRID (though I have other tables with SRIDs and tables without). I've included the SRID in wms_srs and I have excluded it. I am beginning to believe the problem lies elsewhere - but have no idea what approach to use to find it, other than stabbing in the dark. The map file contents are listed below. Thanks for any advice/pointers you can offer. MAP NAME Map1 SIZE 600 400 WEB IMAGEPATH /tmp/ms_tmp/ TEMPLATE ..\Templates\TEMPLATE2.HTML METADATA wms_enable_request * wms_titleTestMap wms_srs EPSG:2205 END END LAYER NAME TestMap TYPE LINE STATUS ON UNITS METERS CONNECTIONTYPE ORACLESPATIAL CONNECTION test_user/test_user@LOCALVM1 DATA SHAPE FROM (SELECT SHAPE FROM XNA_ROUTES) METADATA wms_enable_request * wms_nameTestMap wms_titleTestMapTitle wms_srs EPSG:4326 wms_format image/gif END END #LAYER END #MAP -- View this message in context: http://osgeo-org.1560.x6.nabble.com/WMS- server-error-Invalid-layer-s-given-in-the-LAYERS-parameter-tp5079259.html Sent from the Mapserver - User mailing list archive at Nabble.com. ___ 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] WMS server error. Invalid layer(s) given in the LAYERS parameter
If it is a typo it would be in your layers definition Is layer 'TestMap' defined in your mapfile? If so watch for a typo at the layer above, maybe an extra END Anything in your Web server log, and mapserver log? Paul S paul.she...@bentley.com@lists.osgeo.org Envoyé par : mapserver-users-boun...@lists.osgeo.org 2013-09-23 10:21 A mapserver-users@lists.osgeo.org cc Objet Re: [mapserver-users] WMS server error. Invalid layer(s) given in the LAYERS parameter Thanks Steve, Here is the URL I am using ... http://localhost/cgi-bin/mapserv.exe? map=C:\ms4w\Apache\TEST_Routes.map LAYER=TestMap SERVICE=WMS VERSION=1.1.1 REQUEST=GetMap I wish/hope it is something as simple as a misspelling! But I do not see it. Paul -- View this message in context: http://osgeo-org.1560.x6.nabble.com/WMS-server-error-Invalid-layer-s-given-in-the-LAYERS-parameter-tp5079259p5079278.html Sent from the Mapserver - User mailing list archive at Nabble.com. ___ 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
[mapserver-users] Scribe UI Configuration
Hi, I'm trying to configure Scribe UI, but when I run from init import init_db I get this message: AttributeError: 'Flask' object has no attribute 'teardown_request' The related packages that are installed in my Debian Squeeze, all via aptitude, are: python-flask 0.6 sqlite 3.7.3 python 2.6.6 Thanks in advanced, Humberto Cereser Ibanez Programmer at Pastoral da Criança humberto@p210:~/mapfiles/scribeui/application$ sudo python [sudo] password for humberto: Python 2.6.6 (r266:84292, Dec 26 2010, 22:31:48) [GCC 4.4.5] on linux2 Type help, copyright, credits or license for more information. from init import init_db Traceback (most recent call last): File stdin, line 1, in module File init.py, line 102, in module @app.teardown_request AttributeError: 'Flask' object has no attribute 'teardown_request' ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
Re: [mapserver-users] Scribe UI Configuration
Hi Humberto, You should use pip install to get Flask (instead of aptitude): sudo pip install Flask If that doesn't work I found this link that might help: http://rajaseelan.com/2011/06/18/attributeerror-flask-object-has-no-attribute-teardown_request/ Jessica ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
[mapserver-users] mapserver 6.4 binary?
http://www.gisinternals.com/sdk/ still shows release-1600-x64-gdal-1-10-mapserver-6-2. is release-1600-x64-gdal-1-10-mapserver-6-4 available anywhere? thanks tamas, jzs ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
Re: [mapserver-users] mapserver 6.4 binary?
Hi John, Just working on it. Needs a bit of time to compile them all. Best regards, Tamas 2013/9/23 John Smith jayzee.sm...@gmail.com http://www.gisinternals.com/sdk/ still shows release-1600-x64-gdal-1-10-mapserver-6-2. is release-1600-x64-gdal-1-10-mapserver-6-4 available anywhere? thanks tamas, jzs ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
Re: [mapserver-users] Bad BBOX passed to db query
Any help here would be greatly appreciated. Thanks, Jack Walters Web Development Engineer III Zonar Systems On 9/16/2013 10:27 AM, Jack Walters wrote: We are updating to mapserver 6.2.1 from 5.6.5 and have found that several polygons/polylines/labels in western North America are not being drawn. We are using: - epsg 4326 - DB Postgres - tile_map_edge_buffer 256 - tile_metatile_level 2 - Bing map tile quadrant key example 0231 I have tried: - changing the tile_map_edge_buffer and tile_metatile_level - made sure the Proj.4 was up to date and definition was set with '+over' -- http://lists.osgeo.org/pipermail/mapserver-users/2012-June/072538.html - manipulating labels with labelcache_map_edge_buffer No luck. The polygons and polylines will draw if I remove tile_map_edge_buffer and tile_metatile_level, but then the labels are bad. I set up debugging and the only real difference from the previous version to the new one was the bounding box passed to the db call was different. - I did note that the msTileSetExtent from both are the same: msTileSetExtent (-22537304.912690, -2499796.572690) (-7518957.597310, 12518550.742690) The resulting bounding boxes: mapserver 5.6.5: GeomFromText('POLYGON((-179.52099606876 -21.9022779637684,-179.52099606876 74.0074402855723,179.129882837677 74.0074402855723,179.129882837677 -21.9022779637684,-179.52099606876 -21.9022779637684))',4326) mapserver 6.2.1: ST_GeomFromText('POLYGON((157.543945340682 -21.9022779637684,157.543945340682 74.0074402855723,292.456054696902 74.0074402855723,292.456054696902 -21.9022779637684,157.543945340682 -21.9022779637684))',4326) Any ideas? Maybe a bad compile? I originally added this to the github bug submission, but I thought I would post it here as well. Thanks, Jack Walters Web Development Engineer III Zonar Systems Confidentiality Notice: This e-mail may contain proprietary information some of which may be legally privileged. It is for the intended recipient(s) only. If you believe that it has been sent to you in error, please notify the sender by reply e-mail and delete the message. Any disclosure, copying, distribution or use of this information by someone other than the intended recipient(s) is prohibited and may be unlawful. ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users Confidentiality Notice: This e-mail may contain proprietary information some of which may be legally privileged. It is for the intended recipient(s) only. If you believe that it has been sent to you in error, please notify the sender by reply e-mail and delete the message. Any disclosure, copying, distribution or use of this information by someone other than the intended recipient(s) is prohibited and may be unlawful. ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
Re: [mapserver-users] Bad BBOX passed to db query
UPDATE - Possible fix - Removed PROJECTION items from all layers - Set main PROJECTION to AUTO - Only reference to epsg 4326 is in MAP-METADATA wms_srs and postgresql db calls All items are now returning as expected. BBOX now: GeomFromText('POLYGON((-179.52099606876 -21.9022779637684,-179.52099606876 74.0074402855723,179.129882837677 74.0074402855723,179.129882837677 -21.9022779637684,-179.52099606876 -21.9022779637684))',4326) Any issues using it this way? Could the extra PROJECTION statments cause mapserver to calculate the longitude differently? Thanks, Jack Walters Web Development Engineer III Zonar Systems Confidentiality Notice: This e-mail may contain proprietary information some of which may be legally privileged. It is for the intended recipient(s) only. If you believe that it has been sent to you in error, please notify the sender by reply e-mail and delete the message. Any disclosure, copying, distribution or use of this information by someone other than the intended recipient(s) is prohibited and may be unlawful. ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users