[mapserver-users] Using a attribute substring for labeling
Hello, while using a ShapeFile, created with gdaltindex, as data source for a layer I'd like to use a substring of the location attribute for labeling. I could (and probably will) preprocess the ShapeFile to add the label text as additional attribute. But I wanted to try this step within MapServer first. My current example contains a path and file name. The file name has a 4 digit number in it I would like to use as label. To make it more complicated, the substring has various positions within the whole string. Maybe there is a way with tostring() which accepts sprintf formatting, but I couldn't figure out the correct syntax yet. With a database layer of course I would be able to use SQL to extract a substring and pass it as additional attribute, but not with a ShapeFile. Is there a way to extract a substring from an attribute value and use it as label? It would be nice to have a function available to use in EXPRESSION or TEXT parameter. Thank you in advance for any hints. Lars ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
Re: [mapserver-users] OSM via mapserver setup help?
Hi Brent, On 05.07.2015 03:46, Brent Wood wrote: Hi, I'm looking to create a WMS WM(T)S server for OSM data in New Zealand, on Mint 17 (Ubuntu 14.04 Trusty LTS) I have followed the instructions here:https://github.com/mapserver/mapserver/wiki/Rendering-OSM-data-on-Ubuntu-12.04 These are still valid as far as I can tell. Keep in mind that your system may have individual settings like where to store the data, what user accounts and permissions are available. These where often the things I had to struggle with. [...] have got mapserver working as a cgi OK - with the usual error message to say it is working from the browser, No query information to decode. QUERY_STRING is set, but empty. That is actually a good sign. I would try to get MapServer running first and then configure MapCache. MapServer needs to be told where the mapfile is and what the request is about. At first I'd try a capabilities request like this: http://yourserver.tld/cgi-bin/mapserv?map=/path/to/your/mapfile.mapREQUEST=GetCapabilitiesSERVICE=WMSVERSION=1.1.1 If everything is fine, you'll get the capabilities document in xml format. The path to your mapfile needs to be accessible by MapServer/webserver and regarding security aspects it shouldn't be accessible from outside world. How did you configure your webserver with cgi and MapServer? Can you show some configuration like a vhost file from apache? When MapServer can't access it, you will get an error message about it. When it is accessible but it have configuration issues within your mapfile, you will also get a error message most often with a hint where in your mapfile the (first) error is. The message is displayed in your browser and probably in you webserver error log file. If you are interested in verbose messages you can enable DEBUG [1] in your mapfile. There you can set a global logging and logging at layer level and log everything in an separate file. Even if your mapfile is syntactically correct and all your data sources are configured properly, especially projections and expressions for filtering, you can end up getting a completely white (depending on your background color) image. That happens when you are requesting via GetMap an area where you have no data or your mapfile simply don't have a configuration for this specific bounding box and/or scale. Here is a valid GetMap request from the MapServer docs [2] http://my.host.com/cgi-bin/mapserv? map=mywms.map SERVICE=WMS VERSION=1.1.1 REQUEST=GetMap LAYERS=prov_bound STYLES= SRS=EPSG:4326 BBOX=-173.537,35.8775,-11.9603,83.8009 WIDTH=400 HEIGHT=300 FORMAT=image/png That implies that the server can access mywms.map AND is actually serving projection with epsg:4326 (*) AND your mapfile as a layer configured with name prov_bound AND you have data within this BBOX. For testing MapServer you don't have to craft the requests by hand. I'm using the build in openlayers mode [3] and Qgis [4]. Best wishes Lars (*) when a WMS isn't serving epsg:4326 it isn't actually a WMS regarding the OGC official standard. [1] http://mapserver.org/optimization/debugging.html [2] http://mapserver.org/de/ogc/wms_server.html [3] http://mapserver.org/de/cgi/openlayers.html [4] http://qgis.org/ ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
Re: [mapserver-users] searching for a solution to render polygons crossing the antimeridan
Hi Peter, I could reproduce your findings. Excellent issue report btw. Data-SQL and mapfile are just working with copy paste :) Displaying in epsg:4326 is working fine. I noticed a difference in your epsg code 3785 (in your request URL and 3875 in your wms_srs parameter. But even if I add 3785 to it nothing changes. Interisting: When I'm viewing the data in QGIS (postgis layer), with 3785 the geometries have a similar artistic look. Best wishes, Lars On 01.09.2014 15:49, Peter Freimuth wrote: Hi, i think this problem was solved already thousand times but i could not find a solution via google. We have polygons in a postgis 2.1 db describing the satellite images which sometimes cross the antimeridan. These polygons shall be rendered to a map via WMS calls using google Mercator in the map client (or any other projection supported by the WMS). The problem is that the polygons are drawn incorrect (see attached image which is the outcome of the following call http://db5.devel.intern/cgi-bin/catalog_view.fcgi?SERVICE=WMSVERSION=1.1.1REQUEST=getmaplayers=coveragepols_testbbox=19068286.820724,-2282715.4123002,20749901.442696,-1809417.3332432srs=epsg:3785format=image/pngwidth=800height=800) Any hint on documentation or how to overcome this problem is very welcome! Kind regards, Peter These are the details: umn ms 6.4.1 ## layer defintion LAYER NAME coveragepols_test TYPE POLYGON STATUS ON DEBUG 5 UNITS dd SIZEUNITS PIXELS TOLERANCE 3 TOLERANCEUNITS PIXELS PROCESSING CLOSE_CONNECTION=DEFER CONNECTIONTYPE POSTGIS CONNECTIONuser=… password=…. dbname=… host='localhost' port=5432 DATA coverage_poly FROM (SELECT id as image_id, coveragepoly as coverage_poly FROM public.view_test ) foo USING UNIQUE image_id USING SRID=4326 PROJECTION init=epsg:4326 END METADATA ows_title Coverage Polygons #ows_extent -20037508.34 -20037508.34 20037508.34 20037508.34 ows_extent -180 -89 180 89 wms_srs EPSG:3875 EPSG:900913 EPSG:4326 #output END CLASS NAME Coverage Polygons #STYLE # COLOR 231 182 21 #END STYLE OUTLINECOLOR 10 255 0 WIDTH 2 END END END ##used data CREATE TABLE view_test ( id bigserial NOT NULL, catalog_id integer, dataset_id integer, image_path character varying(256) NOT NULL, coveragepoly geometry(MultiPolygon,4326), CONSTRAINT view_test_pkey PRIMARY KEY (id) ) WITH ( OIDS=FALSE ); ALTER TABLE view_test OWNER TO searchdb_admin; INSERT INTO public.view_test (catalog_id,dataset_id,image_path,coveragepoly) VALUES (15829509, 2061925, '', st_multi(st_geomfromtext('POLYGON((180.655999799 -15.8486300543,180.606999598 -16.0696710923,180.558000402 -16.2907050895,180.509000201 -16.5117270167,180.459000201 -16.7327328505,180.41 -16.9537185677,180.36 -17.1746801448,180.310999799 -17.3956135586,180.260999799 -17.6165178033,180.210999799 -17.8373888554,180.160999799 -18.0582267149,180.110999799 -18.2790293703,180.06 -18.4997958157,180.01 -18.7205260511,179.991351841 -18.8027016697,180.235999799 -18.8380677932,180.478000402 -18.8720267552,180.716999598 -18.9047223899,180.735999799 -18.8224783746,180.785 -18.6015670891,180.834000201 -18.3806216053,180.883000402 -18.1596439348,180.931999598 -17.9386350835,180.980999799 -17.7175950513,181.03 -17.4965258499,181.079000201 -17.2754304969,181.128000402 -17.054309998,181.175999799 -16.8331663649,181.225 -16.6120056327,181.273000402 -16.3908308187,181.321999598 -16.1696449407,181.37 -15.9484540334,181.134000201 -15.9164302957,180.896999598 -15.8832025749,180.655999799 -15.8486300543))',4326))); INSERT INTO public.view_test (catalog_id,dataset_id,image_path,coveragepoly) VALUES (15836184, 2063096, '', st_multi(st_geomfromtext('POLYGON((179.545984711 -15.9171514786,179.495243412 -16.1403429893,179.30698 -16.3635103601,179.39354657 -16.5866535908,179.342587005 -16.8097726816,179.291548984 -17.0328726614,179.240427479 -17.2559535305,179.189217461 -17.4790142828,179.137916918 -17.7020488835,179.086521827 -17.9250553209,179.035031181 -18.1480315832,178.983387648 -18.3712140414,179.243388654 -18.4105864011,179.497604104 -18.4480185073,179.746907061 -18.4837567894,179.797483404 -18.2603590827,179.847922953 -18.0371695836,179.898278012 -17.8139509153,179.948551599 -17.5907060954,179.998746731 -17.3674381412,180.049000201 -17.1441520821,180.099000201
Re: [mapserver-users] Capabilities / queryable GROUPed layer
On 16.06.2014 19:59, b.j.kob...@utwente.nl wrote: Just checking: you did make sure that each LAYER has TOLERANCEUNITS and TOLERANCE values, and a TEMPLATE in each CLASS (as required by Mapserver to make a layer queryable)...? I didn't configure TOLERANCEUNITS. Each layer has a TEMPLATE (header/body/footer) and the GetFeatureInfo-Request is working. My problem is, the grouped layer is advertised in the capabilities document as queryable=0 although it is actually queryable. When I'm disabling the group, each individual layer is marked as queryable. Best wishes, Lars ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
[mapserver-users] Capabilities / queryable GROUPed layer
Hello, I'm out of ideas configuring a WMS with grouped layers for a GetFeatureInfo-Request. The problem is, in the capabilities document at the layer level ...queryable=1... is missing. The actual gfi request is working. Since my client is processing the capabilities doc and is looking for queryable layers, I had to work around with a static capabilities document. My search resulted only in an old ticket [1], but maybe this isn't related. Can someone here confirm or deny this issue? /usr/lib/cgi-bin/mapserv -v MapServer version 6.2.1 OUTPUT=GIF OUTPUT=PNG OUTPUT=JPEG SUPPORTS=PROJ SUPPORTS=GD SUPPORTS=AGG SUPPORTS=FREETYPE SUPPORTS=CAIRO SUPPORTS=SVG_SYMBOLS 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 OS: Ubuntu 12.04 Best wishes, Lars [1] http://trac.osgeo.org/mapserver/ticket/3931 ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
Re: [mapserver-users] How to help translating MS documentation
Thanks Yves, I signed up as a German translator. Only the dashboard links aren't valid anymore. Best wishes, Lars On 16.04.2014 10:08, Yves Jacolin wrote: Hello, I wrote a few weeks ago a short how to in the MS doc to give some info to help translating via transifex. This howto has currently no reference in any toc of the doc, so it still an hidden and secret page ;) Here it is: http://mapserver.org/development/translation.html Any feedback is welcome (english proof reading very welcome). Thanks, Y. -- Responsable Formation et Support Camptocamp France SAS Savoie Technolac, BP 352 73377 Le Bourget du Lac, Cedex Tel (France) : +33 4 79 26 57 98 Tel (Suisse) : 021 619 10 43 Mob. : +33 6 18 75 42 21 Fax : 04 79 70 15 81 Mail : yves.jaco...@camptocamp.com mailto:yves.jaco...@camptocamp.com http://www.camptocamp.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 Optimization?
Hi, thats an interesting case. Like Jukka said, could you check your Apache log files and identify the request URL send by AutoCad? I would run these request by hand and check the resulting image. For comparison it would be interesting to do this also with a request from GrobalMapper or other clients who run normally. MapServer itself can also write timing information to the log file. Enable debugging by adding DEBUG 3 at map level (see docs for more settings). Than you will see how much time each layer as well as the whole map needed to complete. Maybe these information can help. Best wishes, Lars On 02.04.2014 23:28, gom wrote: Thanks for the tip Andrea. I tried the settings but it makes no difference. I have included my map file to be sure I am am asking the question clearly and to be sure I am implelemnting you suggestion correctly. MAP NAME RasterSample SIZE 300 450 EXTENT 496500.000 6234300.00 597000.000 6401200.000 SHAPEPATH D:/mapserv/shapes CONFIG PROJ_LIB D:/proj/SHARE/ WEB IMAGEPATH D:\tmp METADATA wms_title WMS Demo Server wms_onlineresource http://myserver:8080/cgi-bin/mapserv.exe?map=d:/mapserv/images/images.map; wms_srs EPSG:26910 wms_enable_request GetMap GetCapabilities END END PROJECTION init=epsg:26910 END OUTPUTFORMAT NAME png8 DRIVER AGG/PNG8 MIMETYPE image/png; mode=8bit IMAGEMODE RGB EXTENSION png FORMATOPTION QUANTIZE_FORCE=on FORMATOPTION QUANTIZE_COLORS=256 END LAYER NAME 2013-12-23_5m EXTENT 496500.000 6234300.00 597000.000 6401200.000 METADATA wms_title2013-12-23_5m wms_extent 496500.000 6234300.00 597000.000 6401200.000 END TYPE RASTER STATUS OFF TILEINDEX 2013-12-23_be_5m.shp TILEITEM LOCATION PROJECTION init=epsg:26910 END MINGEOWIDTH 8000.01 MAXGEOWIDTH 25000 END LAYER NAME 2013-12-23 EXTENT 496500.000 6234300.00 597000.000 6401200.000 METADATA wms_title2013-12-23 wms_extent 496500.000 6234300.00 597000.000 6401200.000 END TYPE RASTER STATUS OFF TILEINDEX 2013-12-23_be.shp TILEITEM LOCATION PROJECTION init=epsg:26910 END MAXGEOWIDTH 8000 END END Andrea Peri wrote I set always the EXTEND information at the layer level. This speed really the startup of mapserver. Without the EXTENT al layer level the WMS try to calculate it to respond at a GetCapability request. I guess the wms_extents is not sufficient to speed up mapserver. hope to help. Andrea. 2014-04-02 21:55 GMT+02:00 gom lt; gord.mckenzie@ gt;: I have created a Mapserver site and published a couple of large raster layers through WMS. They work as expected and perform quiite well. When i add the wms layers to Gaia or to Global Mapper they add and display great. I want to display the layers in AutoCAD Map. When I add the WMS layer there it takes 1.5 to 3 minutes to add the layer. After that it works fine. No other WMS layers behave like that in AutoCAD Map and as I mentioned previously, the layers don't work like that in any other program. The layers are made up of about 1600 PNG images that are referenced in the .map file by tileindexes. One layer is at 2 metre pixels and the other at 5 metre pixels. If I remove the layer that references the 2 metre images and only use the 5 metre images, the layer is attached quite quickly. If I switch and use only the 2 metre image layer the speed is slow again. My output format is PNG8. The images are stored in the same projection as they are being queried. I have added the wms_extents metadata to each layer. The MAXGEOWIDTH is such that no data is queried on inital loading of the layer. I have asked the question in the AutoCAD support forums, from the AutoCAD MAp perspective, but was hoping there might be some suggestions as to configuration/map options, in Mapserver, that might help speed up this operation. Thanks -- View this message in context: http://osgeo-org.1560.x6.nabble.com/WMS-Server-Optimization-tp5132723.html Sent from the Mapserver - User mailing list archive at Nabble.com. ___ mapserver-users mailing list mapserver-users@.osgeo
Re: [mapserver-users] join shp with csv
Hi Jörg, On 13.03.2014 11:07, Jörg Thomsen wrote: [...] tried upper und lower cases for column-names funny: the only output in errorlog (level5) is: [Thu Mar 13 10:48:52 2014].209278 msSearchDiskTree(): Search returned no results. Unable to open spatial index for /home/user/data/mapserverIIWS/./shapes_join/places_join.qix. In most cases you can safely ignore this message, otherwise check file names and permissions. [Thu Mar 13 10:48:52 2014].209678 freeLayer(): freeing layer at 0x9451cd8. 'Search returned no results.' but there are results $ ogrinfo join.csv lookup -summary INFO: Open of `join.csv' using driver `CSV' successful. FAILURE: Couldn't fetch requested layer lookup! I don't have a working example anymore. But I can remember I used a vrt [1] for processing CSV files. Here is a snipped I used working with toll data [2]: OGRVRTDataSource OGRVRTLayer name=mautdaten SrcDataSourcemautdaten.csv/SrcDataSource GeometryTypewkbPoint/GeometryType LayerSRSWGS84/LayerSRS GeometryField encoding=PointFromColumns x=lon y=lat/ /OGRVRTLayer /OGRVRTDataSource Lars [1] http://www.gdal.org/ogr/drv_vrt.html [2] http://wiki.openstreetmap.org/wiki/Mautdaten ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
Re: [mapserver-users] layer mask without clipping
Hi Thomas, On 25.02.2014 11:11, thomas bonfort wrote: Lars, I don't understand what you're trying to obtain. Can you clarify and/or post a couple screenshots? In the image [1] you can see a district (10e Arrondissement) in Paris and his surrounding. The area of interest is only the district, which I marked with a dotted line in gimp. Everything outside is rendered differently, here in gray scale. But also some kind of hatching or a colored transparent overlay would be thinkable. But only for the unmasked area (outside) - the masked area (inside) should use the original style. My current work flow is a) render the whole area with the gray style b) render the district (applied mask) with the colored style c) put b) on top of a) with image processing software I probably should mention that this isn't for a interactive map, just for one time rendering. My first try was slightly different, which raises a issue at the border: a) render the masked area b) render everything else (masked area is a whole) c) put a) and b) together When you look at the result [1] you see - doubled labels (blue A) here was the feature labeled in the both (masked and inverted mask) and they are overlapping - cut labels (blue B) The rendered label of the inverted mask is actually placed partially in the masked area I acknowledge these aren't issues at all when you stick to clipping the mask. Don't know why I'm attracting lots of special use cases, but then... this is what keeps my work with MapServer interesting. :) Thanks for listening, Lars [1] http://s1.directupload.net/images/140226/w2kjgxbm.png ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
[mapserver-users] layer mask without clipping
Hello, I really like the MapServer layer mask feature. Is there a way that MapServer doesn't clip the mask, instead just setting a opacitiy / color value? I'm getting the result by rendering two passes with mask and inverted mask. The latter is using a white opacity layer on top. Afterwards I can stack the images together. The is working well, as long as there are no labels rendered along the mask boundary. If they are, then they are not clipped. Best wishes, Lars ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
Re: [mapserver-users] Mapserver can't read mapfile
Hello, I can see a difference between map=/home/mapdata/pelop.mapmode=map and map=/home/mapdata/pelop/mapmode=map Hopefully it is just this typo . vs / Lars On 10.02.2014 16:15, Stefanos Anastasiou wrote: Hello!! I'am having my mapfile place in /home/mapdata folder whereas I also keep a couple of other mapfiles too. I'm trying to load it in the following form on the browser: http://127.0.0.1/cgi-bin/mapserv?map=/home/mapdata/pelop.mapmode=map and all I get is a blank page. No errors no nothing. Then I created an html template in order to click it from there by creating a simple link (and not a from) in the following hyperlink: a href=http://127.0.0.1/cgi-bin/mapserv?map=/home/mapdata/pelop/mapmode=map This link /a And I get the following error: msLoadMap(): Unable to access file. Last time this happened I was invoking Mapserver through a form but this time it's just a simple link. Why is it happening ? The weird thing is that all the other mapfiles that are seem to be working are are having the same permission settings with the current: -rw-r--r-- Thanks a lot! ___ 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] Σχετ: Mapserver can't read mapfile
On 10.02.2014 16:49, Stefanos Anastasiou wrote: Sorry fellows... indeed there is a typo but in this e-mail... I checked my files again and they seem correct... Ok, fine. I would check the webserver error/acces log file. Also, you can enable debug log in MapServer, see [1]. A blank file (== a white png/jpg I assume) indicates that mapserver is running fine, e.g. no errors happened while rendering. It can be a projection issue or expression issue for your classes, so that MapServer is actually rendering 0 objects. If you can share your mapfile it would help to give further informations. Lars [1] http://mapserver.org/optimization/debugging.html ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
Re: [mapserver-users] Σχετ: Σχετ: Mapserver can't read mapfile
Hi Stefanos, thanks for the mapfile. Here are some points I would check: - you habe MAP two times in your file (might be ok, though) - you don't have a projecten defined In which projection are your data? The white color you see in your browser come from the IMAGECOLOR. So MapServer is actually creating a image without objects rendered. I would enable the debugging to check in the logfile whether MapServer is getting any data out of your data source. If this is not the case than you need to check your GetMap request if the srs and bbox is matching your data source projection. You also defined the EXTENT with -5.00 0.00 0.00 5.00. Is this the correct extent of your source data? Lars with the help of Jörg :) On 10.02.2014 17:10, Stefanos Anastasiou wrote: Yeah sorry... I guess you're right. This is my mapfile: MAP NAME Peloponisos MAP UNITS dd SIZE 640 480 IMAGECOLOR 255 255 255 IMAGETYPE png SHAPEPATH /home/mapdata/data EXTENT -5.00 0.00 0.00 5.00 WEB TEMPLATE '/usr/local/apache2/htdocs/pelop.html' IMAGEPATH '/usr/local/apache2/htdocs/tmp' IMAGEURL '/tmp/' END LAYER NAME 'geodata' DATA aisthitika_dash STATUS default TYPE polygon LABELCACHE on LABELITEM 'TEXTSTRING' CLASS NAME Dasi STYLE COLOR 212 192 100 END LABEL COLOR 0 0 0 SIZE small END #Label END #Class END #layer END #mapfile Στις 6:00 μ.μ. Δευτέρα, 10 Φεβρουαρίου 2014, ο/η Fawcett, David (MNIT) david.fawc...@state.mn.us έγραψε: To further diagnose this, it would be useful to see the contents of you mapfile. If no errors are being thrown, it is quite possible that there is an issue with spatial reference systems, bounding boxes, or class expressions. David. *From:*mapserver-users-boun...@lists.osgeo.org [mailto:mapserver-users-boun...@lists.osgeo.org] *On Behalf Of *Stefanos Anastasiou *Sent:* Monday, February 10, 2014 9:50 AM *To:* j...@mapmedia.de; mapserver-users@lists.osgeo.org *Subject:* [mapserver-users] Σχετ: Mapserver can't read mapfile Sorry fellows... indeed there is a typo but in this e-mail... I checked my files again and they seem correct... If I type on my browser: http://127.0.0.1/cgi-bin/mapserv?map=/home/mapdata/pelop.mapmode=map all I get is a blank page. The data folder has full permissions: drwxrwxrwx All other shapefiles are working correctly but yesterday I just added two more in the folder and all I get is a blank screen... (?) Στις 5:37 μ.μ. Δευτέρα, 10 Φεβρουαρίου 2014, ο/η Jörg Thomsen j...@mapmedia.de mailto:j...@mapmedia.de έγραψε: Hi, please have a look at your path: http://127.0.0.1/cgi-bin/mapserv?map=/home/mapdata/pelop.map and http://127.0.0.1/cgi-bin/mapserv?map=/home/mapdata/pelop/map I guess the first one is correct and that's why you get the error-msg with the 2nd one. So, what exactly is the result of the request http://127.0.0.1/cgi-bin/mapserv?map=/home/mapdata/pelop.mapmode=map ? it sounds like a white image, not nothing. In this case you should check the bboxes and srs first. regards, Jörg Am 10.02.2014 16:15, schrieb Stefanos Anastasiou: Hello!! I'am having my mapfile place in /home/mapdata folder whereas I also keep a couple of other mapfiles too. I'm trying to load it in the following form on the browser: http://127.0.0.1/cgi-bin/mapserv?map=/home/mapdata/pelop.mapmode=map and all I get is a blank page. No errors no nothing. Then I created an html template in order to click it from there by creating a simple link (and not a from) in the following hyperlink: a href=http://127.0.0.1/cgi-bin/mapserv?map=/home/mapdata/pelop/mapmode=map This link /a And I get the following error: msLoadMap(): Unable to access file. Last time this happened I was invoking Mapserver through a form but this time it's just a simple link. Why is it happening ? The weird thing is that all the other mapfiles that are seem to be working are are having the same permission settings with the current: -rw-r--r-- Thanks a lot! ___ mapserver-users mailing list mapserver-users@lists.osgeo.org mailto:mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users ___ mapserver-users mailing list mapserver-users@lists.osgeo.org mailto: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 mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
[mapserver-users] really huge maps / MAXSIZE
Hello MapServer users, with the MAXSIZE parameter I can limit the output size. Does the value depend only on the available memory? When I set it to high, MapServer is crashing. I was wondering if there is an option to force MapServer to use an additional (slow) memory like a hard disk to make sure the rendering size doesn't matter. An other solution would be to write a script which splits a render request into smaller ones and stitches the results together. That would be independent from MapServer. With really huge maps I mean more than 5 pixel. With 32GB I can manage up to 4 pixel. Is anyone else running MapServer at its pixel limit? How do you handle it? Best wishes, Lars ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
Re: [mapserver-users] Problem using WMS GetFeatureInfo in OpenLayers with different projections
On 17.01.2014 11:10, Dejan Gambin wrote: What is the mywms? MapServer binary, wrapper script, ...? wrapper script. Something like: #! /bin/sh MS_MAPFILE=/path_to_my_map_file export MS_MAPFILE /usr/lib/cgi-bin/mapserv6 AFAIK nothing wrong here. Did you check the actual requests? Does the bbox parameter fit to the srs? Could you compare a working GetFeatureInfo request in 900913 with a failing one in 4326? Yes, bbox parameter fits to srs in both cases. So, if I put bbox/srs params in 426 everything works, if I put them in 900913 then error happens Does other maps work with 900913? I would check which pro4 epsg file mapserver is using, check if there is a definition for 90013 and if it looks like +proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0 +k=1.0 +units=m +nadgrids=@null +wktext +no_defs On the other hand, if GetMap ist working fine, projection definition should be fine too. Just thinking out loud... Raise the debug level to 3 at map level and layer level. You can let MapServer write its own error logfile, so your apache log stays clean. Could you find anything in the MapServer log file? Here I would identify a working 4326 GFI request and compare the corresponding log with a 900913 request. There should be a difference. Best wishes, Lars ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
Re: [mapserver-users] Problem using WMS GetFeatureInfo in OpenLayers with different projections
Hi Dejan, On 16.01.2014 11:03, Dejan Gambin wrote: [...] The problem is - when I click to get the info I get Internal server error and in apache log I get Segmentation fault followed by Premature end of script headers: mywms Soory I have no answer yet, instead I have these questions. What is the mywms? MapServer binary, wrapper script, ...? Did you check the actual requests? Does the bbox parameter fit to the srs? Could you compare a working GetFeatureInfo request in 900913 with a failing one in 4326? Are there any errors or hints in the capabilities file? Raise the debug level to 3 at map level and layer level. You can let MapServer write its own error logfile, so your apache log stays clean. Does it segfault only at GetFeatureInfo request? GetMap is working fine? If the logs doesn't seem to help you, feel free to post it somewhere so this list can have a look. Best wishes, Lars ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
[mapserver-users] group layer and GetFeatureInfo
Hello, my mapfile has three layers (same data, but different Min/MaxScale) and each of them is queryable. Every Layer is in a group and the group get advertised in the Capabilities-Document. Only the queryable info is missing for the group layer. The gfi request itself works on the group layer. But I have to modify my Capabilities-Document, so my webclient will recognize it can query the group. I found an posting from last year [1] but no open/closed ticket. So I'm wondering if there are other settings to get the query info into the Capabilities-Document. If somebody can confirm it as a bug, I'm happy to create ticket. Thanks in advance, Lars [1] http://lists.osgeo.org/pipermail/mapserver-users/2012-July/072893.html ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
Re: [mapserver-users] securing mapserver layers
Hello, i'm having a similar use case at the moment. For the authorizaion and authentication I'm using MapProxy [1]. Basically it is a proxy your users will query. The proxy itself uses MapServer as source. Your can restrict whole WMS, layers or even regions, defined by bbox/shapefile. It is running well with MapServer and I was able to set it up by using the online documentation. Lars [1] http://mapproxy.org/docs/nightly/auth.html ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
[mapserver-users] mapserver, ogr, osm/pbf
Hello, since gdal 1.10 it is possible to access OSM files directly. Somehow I'm struggling with the configuration. I'm using a small extract from Berlin [1]. The ogrinfo output looks fine [2] to me. Within in the mapfile [3] I managed to access the osm file and getting a map back. For the rendering I need to access the fields and their values. Thats where I'm struggling. This works: ... CONNECTIONTYPE ogr CONNECTION /data/berlin-small.osm DATA 1 ## that are the lines ... This doesn't: ... CONNECTIONTYPE ogr CONNECTION /data/berlin-small.osm DATA lines ## DATA SELECT * from lines ... I also tried using a VRT file [4] so I can access the lines directly and applying a filter. But this didn't work either. Probably I'm making something wrong with the DATA statement. The second problem is with accessing a pbf file directly. Response is File not found or unsupported format. I compiled MapServer with ogr/gdal 1.10 and the system is Ubuntu 12.04 and with ogrinfo I get back all infos like from the osm raw file. My goal is to create a service which processes a small extract and renders a overview map, without using any database. Anybody listening here who solved something like this? Or can give other feedback? Thanks in advance Lars [1] http://extract.bbbike.org/?sw_lng=13.425sw_lat=52.4657ne_lng=13.4601ne_lat=52.4812format=osm.bz2city=neukoelln [2] https://gist.github.com/gislars/6048063 [3] https://gist.github.com/gislars/6048079 [4] https://gist.github.com/gislars/6048109 ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
[mapserver-users] wfs_namespace_prefix / DescribeLayer Response
Hello, while setting up MapServer and TinyOWS I'm facing a problem configuring wfs_namespace_prefix. My WEB-METADATA ... wms_onlineresource http://1.1.1.1:81/cgi-bin/wms; wfs_onlineresource http://1.1.1.1:81/cgi-bin/tinyows; wfs_title WFS Dienst wfs_namespace_prefix tows ows_enable_request * ... LAYER ... METADATA 'ows_title' 'WFS Punktobjekte' END NAME wfsobjects ... END TinyOWS is configured via xml file. The MapServer is offering WMS and is advertising the WFS onlineresource. WMS_DescribeLayerResponse version=1.1.1 script/ LayerDescription name=wfsobjects wfs=http://1.1.1.1:81/cgi-bin/tinyows; owsType=WFS owsURL=http://1.1.1.1:81/cgi-bin/tinyows; Query typeName=wfsobjects/ /LayerDescription /WMS_DescribeLayerResponse Somehow the namespace prefix isn't advertised. Shouldn't it be included in the typeName? Am I missing something obvious? Does someone have a working setup and can help here? Since the namespace prefix is mandatory, I cant disable it in the TineOWS configuration. Thanks in advance Lars ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
Re: [mapserver-users] How can I avoid long notation of double values in label or info template for shapes?
On 23.11.2012 10:12, Astrid Emde wrote: Hello, I have a shapefile with a column of type double that contains values like 2.54 or -2.03. When I label the geometrie with this column or display this column in my infotemplate I get the following notation of the values: 2.540e+000 -2.030e+000 If there a way to tell MapServer to display the normal notation of the value? Or do I have to change the shape? You can define your own format by using ... CLASS ... TEXT (round[numbercolumn], 2) ... LABEL ... END END ... In RFC 64 [1] you'll find some informations. I'm pretty sure I used it for myself. But grepping through my current mapfiles say otherwise. So I can't give an working example. Lars [1] http://mapserver.org/development/rfc/ms-rfc-64.html ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
Re: [mapserver-users] How can I avoid long notation of double values in label or info template for shapes?
Hi Lars, thanks for the information! It works fine for the label. Before I defined LABELITEM mycolumn and got the long notation: 2.540e+000 with definition TEXT mycolumn the label looks fine (without using any function): 2.54 Is there a solution for the query result too? I assume that you cant use any of these functions in your template file. Would be nice if I'm wrong. An workaround could be to use the ogr connection type. This way, you can access and modify your features/attributes with SQL. Look at example #4 here [1]. I think you can use SELECT ..., round(numbercolumn,2) as mycolumn FROM... here. But than... if the performance isn't good enough, it might me worth to just preprocess the shape files. Or put them in a database to be more flexibel. Lars [1] http://mapserver.org/input/vector/ogr.html#examples-of-layer-definitions-using-ogr ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
[mapserver-users] mapserver scalebar
Hello, I have an issue with the mapserver scalebar. Hopefully it is just my understanding thats wrong. My data is epsg:4326 which is also used for displaying the map requested via wms. When I embed a scalebar, the length of it isn't correct. It show an value about as twice (200+ meter) the right value (~120 m). The region I'm displaying is in northern europe about 55.8 latitude. My mapfile looks like this: MAP ... UNITS METERS EXTENT ... PROJECTION init=epsg:4326 END SCALEBAR IMAGECOLOR 255 255 255 LABEL COLOR 0 0 0 SIZE SMALL END STYLE 1 SIZE 100 3 COLOR 0 0 0 UNITS METERS INTERVALS 2 POSITION lc TRANSPARENT TRUE STATUS EMBED END WEB ... METADATA wms_title WMS wms_srs epsg:4326 wms_extent ... wms_onlineresource http://example.com/cgi-bin/mapservice; ... END END [LAYERCONFIGURATION] END I'm using MapServer 5.6, data comes from shapefiles and Postgis-DB. It is quite important to have an scalebar rendered in the image so the user can estimate the objects length. I also tested the scalebar from OpenLayers and for epsg:4326 its also wrong. When I use epsg:3857 with the geodesic=true option the scalebar in OpenLayers looks correct. Whereas MapServer is still wrong. Is MapServer able to calculate an correct scalebar for 4326? Should I use an other projection? In which cases does MapServer create a reliable scalebar? Thank you in advance for any hints. Lars ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
[mapserver-users] how does mapserver determine shapefile encoding?
Hello, I have a shapefile from which I don't really know the encoding. It might be latin1 or ISO-8559-5. The good thing is, when MapServer is accessing the shapefile, the labels are shown correct. QGis is also displaying everything fine. But when I try to convert with shp2pgsql or ogr I get only garbage back. I tried different source encodings. Since I need the data to be in the database I'm now trying to find out where the problem is. I tried converting the data on different systems (Ubuntu, RedHat), with postgis/shp2pgsql from repository as well as self compiled. Same results. Also iconv and recode wasn't a help. As I said QGis is displaying everything fine it fails in converting the shapefile too. Opening the dbf in LibreOffice doesn't helped either. Finally my (odd) questions are: Why does MapServer do everything right? How is the encoding determined? Can I see somewhere which encoding is used by MapServer? Thanks in advance for any pointers. Lars ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
Re: [mapserver-users] how does mapserver determine shapefile encoding?
Hello Carlos, I should have been be more precise. By using all the tools, shp2pgsql, iconv, recode I set the source encoding parameter. And I tried different encodings. My database is configured for utf8. But the problem arise before the data is send to the database. With shp2pgsql I generated an sql file, containing wrong character strings. With ogr2ogr I tried to convert to csv or json just for testing, but without success. Depending on the encoding I get garbage or the error message that the data couldn't be converted to utf8. Thank you for your answer. Lars Am 02.08.2011 22:01, schrieb Carlos Ruiz: Lars, When you try to load some data to a PostgreSQL server, you can specify the encoding to use. This can be done with client_encoding. For example, if you want to populate a table with some CSV file contents, you have to do the following: SET client_encoding = 'LATIN1'; COPY my_table FROM '/usr/file.csv' WITH CSV Now, when you use shp2pgsql you can't set the client encoding, but you can set the default client_encoding of your database and every data transfer between some client and your database will be encoded properly: ALTER DATABASE my_database SET client_encoding = 'LATIN1' Hope this helps Cheers from Guadalajara, México IC Carlos Ruiz From: Lars Lingner gislars+l...@googlemail.com To: 'mapserver-users@lists.osgeo.org' mapserver-users@lists.osgeo.org Sent: Tuesday, August 2, 2011 2:45 PM Subject: [mapserver-users] how does mapserver determine shapefile encoding? Hello, I have a shapefile from which I don't really know the encoding. It might be latin1 or ISO-8559-5. The good thing is, when MapServer is accessing the shapefile, the labels are shown correct. QGis is also displaying everything fine. But when I try to convert with shp2pgsql or ogr I get only garbage back. I tried different source encodings. Since I need the data to be in the database I'm now trying to find out where the problem is. I tried converting the data on different systems (Ubuntu, RedHat), with postgis/shp2pgsql from repository as well as self compiled. Same results. Also iconv and recode wasn't a help. As I said QGis is displaying everything fine it fails in converting the shapefile too. Opening the dbf in LibreOffice doesn't helped either. Finally my (odd) questions are: Why does MapServer do everything right? How is the encoding determined? Can I see somewhere which encoding is used by MapServer? Thanks in advance for any pointers. Lars ___ 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] Mapserver compliance
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Am 17.08.2010 20:14, schrieb Joshua Lieberman: Where can I find information on OGC compliance test results for Mapserver (WMS, WCS)? There is a Page on the MapServer Trac: http://trac.osgeo.org/mapserver/wiki/MapServerOGCCITECompliance Lars -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.10 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAkxq40sACgkQ0GRF77ebR/maHwCdEwz38zucSO8H6GndNLuUodxz W0gAoJsUD8YJlwInNhriaD3T1j2V0W6C =EWyB -END PGP SIGNATURE- ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
Re: [mapserver-users] HTML Templates
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Am 23.06.2010 20:44, schrieb Andrew Lewin: Hi Listers, I am trying to learn MapServe as a beginner and I am having lots of trouble with the fundamentals of setting up the program. I am running Mac OSX Snow Leopard with Apache. I'm not familiar with OSX but I hope to be at least of some help. According to my httpd-conf file, my document root is /usr/local/apache2/htdocs/ ; however, when I use the tutorial data the files need to be in my root directory i.e. /ws4w/etc... I thought that all the data had to be in the document root. Can someone explain this to me please? In your htdocs folder you have to place everything which should be delivered by your webserver, in this case apache. So here you place any html or php files you need for your application as well as icons or images you need. When you put files in here make sure apache can read them. Its usually a good idea to make apache own the files. Then you have your mapserver application staying in a directory configured for cgi applications, like mapserver is. In the end mapserver can be called by an URL like this: http://server.tld/cgi-bin/mapserv Configuration files for almost all applications stay in /etc, so for apache its /etc/apache2. There is also the configuration where the cgi directory and your document root is configured. To build an mapserver application you need a mapfile and some data you want to show. You don't want to put this in your document root, because then these files would be accessible by anyone. If you are using an mapserver version 5.0 then you need obey some rules which are described in [1]. Basically your mapfile has to start with the keyword MAP Another problem I am having...I bought the book Beginning Mapserver: Open Source GIS Development. The first simple example is a Hello World example. The program starts off with a Click Me botton and a broken image. When you click on the button, it is supposed to show the Hello World text. When I click, I get an error like this: msLoadMap(): Premature End-of-File. Below are the two files that I used for the program premature end of file means that something with your mapfile is wrong. Could be a missing quote, a missing keyword... Maybe the examples in the book are a little old (I don't know this tutorial). You can take a look at the tutorials on the mapserver website [2] Hello.html html headtitleMapServer Hello World/title/head body form method=POST action=/cgi-bin/mapserv input type=submit value=Click Me input type=hidden name=map value=/home1/mapdata/Hello.map input type=hidden name=map-web-imagepath value=/usr/local/apache2/htdocs/ form IMG SRC=[img] width=400 height=300 border=0 /body /html Put this html file in your document root. OR It looks like you can also use an public_html folder in your home directory. Maybe I'm wrong here, but this would work on debian and ubuntu, if apache is configured with mod_userdir. Try this: Hello.map # This is our Hello World maple MAP NAME Hello_World SIZE 400 300 IMAGECOLOR 249 245 186 IMAGETYPE png EXTENT -1.00 -1.00 1.00 1.00 WEB TEMPLATE http://192.168.2.12/~andrewlewin/hello.html; IMAGEPATH /home/andrewlewin/public_html/ IMAGEURL /~andrewlewin/tmp/ END END (Thats the shortest mapfile I've ever seen, but it that doesn't mean its wrong) The book suggests that I should Configure MapServer and Apache like this: shapes: mkdir /home/mapdata chown nobody:nobody /home/mapdata chmod u+rx /home/mapdata Maybe its better to stay in you home directory: mkdir /home/andrewlewin/mapdata chown nobody:nobody /home/andrewlewin/mapdata chmod u+rx /home/andrewlewin/mapdata If apache is not configured with user and group nobody you need to change nobody:nobody to the right username:groupname images: mkdir /var/www/htdocs/tmp chown nobody:nobody /var/www/htdocs/tmp chmod u+rx /var/www/htdocs/tmp You can probably use also an directory underneath you home. mkdir /home/andrewlewin/public_html/tmp chown nobody:nobody /home/andrewlewin/public_html/tmp chmod u+rx /home/andrewlewin/public_html/tmp The problem is that when I try to run these commands, I get a Permission denied error. How can I get permission to do this. The error means your user account don't have permissions to create the directory. Use a user which has the permission or place the directory in you home. I remember when I was installing the various components from binaries that there was a command to ask me for my password before I did anything to the directory, but I forgot. Can anyone tell me? Sorry for posting all this at once. I believe once I figure out these problems I will be able to move on. Good luck. To setup such an environment the very first time looks always complicated. But when you have it running you will see that
Re: [mapserver-users] MapServer as fast-cgi
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 30.05.2010 16:10, Kai Behncke wrote: Dear users, I try to set up Mapserver with fast-cgi, but so far it doesn`t work as it should do (well I think it doesn`t, I`m also not so sure how to test ist). * I have succesfully compiled MapServer 5.6.3 with fast-cgi (on Debian 5.0) * Apache runs with mod_fcgid * In the mapfile I have implemented in the layers PROCESSING CLOSE_CONNECTION=DEFER But some steps I don`t understand: In the apache-conf I set: ScriptAlias /fcgi-bin/ /etc/apache2/cgi-bin/mapserv Location /fcgi-bin Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch SetHandler fcgid-script Order allow,deny Allow from all #FastCgiConfig -initial-env PROJ_LIB=/usr/share/proj -initial-env #LD_LIBRARY_PATH=/usr/lib:/usr/local/lib:/usr/local/pgsql/lib #-appConnTimeout 60 -idle-timeout 60 -init-start-delay 1 -minProcesses 2 #-maxClassProcesses 30 -startDelay 5 /Location a) If I comment in FastCGIConfig .. I always get from the Apache: Invalid command 'FastCgiConfig', perhaps misspelled or defined by a module not included ?? What might be the reason for that? Does Apache load the fcgid module? You can check in /etc/apache2/mods-enabled if its enabled and in /etc/apache2/mods-available if its installed Or check the error.log of apache: [Sun May 30 16:38:27 2010] [info] mod_fcgid: server /var/www/clients/client1/web1/fcgi-bin/mapserv(21099) started I have the following config: ScriptAlias /fcgi-bin/ /path/to/fcgi-bin/ Location /fcgi-bin SetHandler fcgid-script Options None Order allow,deny Allow from all /Location my /etc/apache2/mods-enabled/fcgid.conf looks like this: IfModule mod_fcgid.c AddHandlerfcgid-script .fcgi IPCConnectTimeout 20 /IfModule b) I start the Apache without the FastCGIConfig in the apache-conf-file and I run the MapServer as: http://www.xyz.de/fcgi-bin/?map=/path_to_my/mapfile.map ...this should be the way to run MapServer as fast-cgi, shouldn`t it? Hmm. I defined the scriptalias as path to the fcgi directory and not to the binary. So the request URL is something like this: http://example.org/fcgi-bin/mapserv?map...;... But I don't know if your way might also be ok. c) I thought, if I run MS with Debug 5 the layers should be produced much faster, right? But the log-file doesn`t show any difference betwenn MS as cgi or fcgi, this might be because of the missing FastCgiConfig in Apache, right? With fcgi your MapServer processes will stay in memory. You should see them within top even when the map is already delivered. And with CLOSE_CONNECTION=DEFER you can then reuse database connections which in turn will make your application faster. Lars -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.10 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAkwCenEACgkQ0GRF77ebR/lSTACeO/vSeKLqQ1WphIb95/WqgZ3m qOkAnjvmSo5NA1+6uE5b34RWOp7nZXPy =lEMY -END PGP SIGNATURE- ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
Re: [mapserver-users] MapServer as fast-cgi
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 30.05.2010 17:44, kai-behn...@gmx.de wrote: Hi Lars, also working on a sunday :-) Oh, its sunday already? :) Thank you very much for your reply. The fcgid-module is enabled/installed. I changed the pathes in the pathes you use, in the access.log of apache is written: 131.173.59.53 - - [30/May/2010:17:31:55 +0200] GET /blabla/blabla/Testkarte12752335142537.jpg HTTP/1.1 200 26397 http://www.mydomain.de/fcgi-bin/mapserv?map=/my_path/mapdatei.map; Mozilla/5.0 (Windows; U; Windows NT 5.1; de; rv:1.9.2.3) Gecko/20100401 Firefox/3.6.3 GTB7.0 ( .NET CLR 3.5.30729) ...what looks quite good I think. Yes. And you get an image back which looks fine, right? If I restart apache I get: [Sun May 30 17:35:25 2010] [notice] mod_fcgid: process /blabla/cgi-bin/mapserv(2537) exit(shutting down), terminated by calling exit(), return code: 0 [Sun May 30 17:35:26 2010] [notice] Apache/2.2.9 (Debian) PHP/5.2.6-1+lenny8 with Suhosin-Patch configured -- resuming normal operations but I don`t get something like: [Sun May 30 16:38:27 2010] [info] mod_fcgid: server /var/www/clients/client1/web1/fcgi-bin/mapserv(21099) started Probably you have set your log level to notice and not to info. But as the mod_fcgid process get shutted down, it definitely was started up before :) So in the end I think fast cgi is already working. With fcgi your MapServer processes will stay in memory. You should see them within top even when the map is already delivered. And with CLOSE_CONNECTION=DEFER you can then reuse database connections which in turn will make your application faster. I`m not sure if I understand. What do you mean with: You should see them within top even when the map is already delivered. I meant you can monitor with the command top (or htop) your processes. You would see one or more mapserv processes staying there. Would it be an cgi process it would only be live until the request is completed. And can`t I check it with the Debug 5 in the log-file? You don't see any information about fcgi/cgi in the MapServer logile, as far as I know. Lars -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.10 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAkwCk58ACgkQ0GRF77ebR/kR6ACfQnv4JDFmbbthTSyrC/OFi5Cn sx8AoJPZ9L38sKx78PGh5WB4lPyyhTN5 =z8PH -END PGP SIGNATURE- ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
Re: [mapserver-users] mapserver logging
On 10.05.2010 11:20, Chantal Rosmuller wrote: Hi list, I have a few questions about mapserver logging, Where can I change the log file location and logging verbosity? Where can I find documentation about the logfile syntax? The debug parameter is described here: http://mapserver.org/mapfile/map.html I would like to analyse the logfiles (get some statistiscs about amount of visitors etc) is there software or a script for that or should I write one myself? I'm not aware of such an script. Lars ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
Re: [mapserver-users] mapserver logging
On 10.05.2010 14:05, Jeff McKenna wrote: Lars Lingner wrote: Where can I find documentation about the logfile syntax? Hello Lars, There is a new document available, Debugging MapServer, that should help you learn how to log through MapServer: http://www.mapserver.org/optimization/debugging.html Great. Something more to translate ;) Lars ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
Re: [mapserver-users] Re: Problem with OpenStreetMap, osm2pgsql, MapServer, OpenLayers and epsg=900913
On 09.05.2010 20:32, roshni.spain wrote: Hi Edward, Un fortunately i had tried that and other many options with no result. But i finally managed to find the solution: it was the EXTENT on the map level, that was just wrong. I finally took the min(x1), min(y1), max(x1), max(y1) values from my plnet_osm_lines, and adjusted the parameters. It worked ! But now im facing another problem. I need to new that map on OpenLayers. The test i was doing up to now was form a demo that used php but i need to implement it in OpenLayers. I got few examples and all, and i could see that they all need WMS conection to the layer. Is this right? If it is then this means that i have to start the map file all over again I'm not really sure if I understand your issue. On this page http://trac.osgeo.org/mapserver/wiki/RenderingOsmData you find an example where MapServer is used rendering OSM data. The result is displayed via OpenLayers. Maybe this is of any help... ? Lars ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
Re: [mapserver-users] Re: Invalid Layer(s) in Layer parameter
Tonton schrieb: Hello i try to make WebMapping with mapserver/Openlayer i meet some trouble with projection and extent because i have blank map in Qgis request it is working on SIS cardcorp *with getmap request * http://geomap/cgi-bin/mapserv?map=/var/www/geomod/test.mapSERVICE=WMSVERSION= *1.1.1*REQUEST=GetMapLAYERS=Parcelles : ServiceExceptionReport version=1.1.1− ServiceException code=MissingParameterValue msWMSLoadGetMapParams(): WMS server error. *Missing required parameter SRS * Reading the error message, I would try to add parameter SRS like SERVICE=WMSVERSION=1.1.1REQUEST=GetMapLAYERS=ParcellesSRS=EPSG:27572 But you'll need a few more parameters: BBOX=minx,miny,maxx,maxy - replace with your values WIDTH=300 Height=200 FORMAT=image/png STYLES='' *in openlayer:* WMS server error Invalid Layer(s) given in LAYER parameter May be i forgot somthing to define in my web or layer Object ? Maybe. Can you show the request URL or your layer definition in OpenLayers? You have to match the layername defined in you map file. Lars PS: There is no need to double post your issue. Give people time to answer or try to be more specific in your description. ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
Re: [mapserver-users] Can map server do this?
Jackey Cheung schrieb: Just found a web site today. The map looks pretty like Google map, except that it's not on Google. Can map server do this? Or anyone has any idea which application can render this kind of image? I got a similar result using opacity and offset with MapServer. See image http://www.lingner.eu/mydownloads/pics/icc_building.png Lars ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
Re: [mapserver-users] mapserver.org down?
Jan Hartmann schrieb: Hi all, Am I the only one that doesn't get through to mapserver.org? Pages take ages to load and then break off with a timeout. Same situation here... gdal.org also doesn't respond. Maybe some trouble with the osgeo infrastructure? Lars ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
Re: [mapserver-users] watermark
Milo van der Linden schrieb: Hi list, I am trying to create a watermark on an wms aerial photo layer using the following technique: - Create a new shp for my area of interest - hatch the shape with an image - set the image to a very low opacity - add this shape as layer to my mapfile - trying to set the layer to always on top, always on for the aerial photo I am failing at the last step, somehow I cannot get the layer to be always on. If I do a wms request calling both layers: aerial_photo and watermark, I get the effect I want, but when I only call the aerial_photo, my watermark is not showing, whether I set it to ON, DEFAULT, or OFF. Did you try to put the areal layer and the watermark layer in one group? You can then request the group name. (but the docs say if a layer status is set to DEFAULT it is delivered when requested as WMS. H... I would have to test it to be completely sure) Lars ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
Re: [mapserver-users] Url encoding problem in Mapserver 5.0.3
ahlah schrieb: Hi, I have Mapserver in Debian Lenny. Mapserver is version 5.0.3-3 installed from official Lenny package (http://packages.debian.org/fi/lenny/cgi-mapserver). My Mapserver acts as WMS-client to another WMS-server. Problem is that that Mapserver 5.0.3 encodes special characters in WMS-parameters in url to %xF format before sending and WMS server rejects the request. WMS parameters in url should be in format: LAYERS=map_250kREQUEST=GetMapSERVICE=WMSFORMAT=image/pngSTYLES=. etc. Mapserver 5.0.3 encodes the url string like this: LAYERS=map%5F250kREQUEST=GetMapSERVICE=WMSFORMAT=image%2FpngSTYLES= etc. I found discussion about this issue and it seems that it is a bug which is fixed in new versions: http://trac.osgeo.org/mapserver/ticket/1296 Is there any workaround to prevent this happen in version 5.0.3? It is the latest version in official lenny packages. The other alternative is to compile new MapServer version from sources but can I do that in Debian Lenny without meeting never ending dependency problems in compiling? There might be a further alternative: You could use the repository from gfoss.it They have the current stable version 5.6.3 You just have to update your /etc/apt/sources.list as in http://debian.gfoss.it/README Lars ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
Re: [mapserver-users] WMS Server problem
Tony Baylis schrieb: Hi guys, Apologies for adding another question related to a similar previous post but I too am having problems getting MapServer to serve a WMS layer. At this stage I can't get a GetCapabilities (it wants to download the mapserv file) or Mode=map to work via the browser. I have been able to get the layer to render correctly using openLayers in WMS mode however. The mapserv file is actually the response. If you save it and open it in an text editor you can view the content. The MapServer FAQ has also an entry to this question: http://mapserver.org/faq.html#when-i-do-a-getcapabilities-why-does-my-browser-want-to-download-mapserv-exe-mapserv Lars ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
[mapserver-users] compiling error current trunk and --with-wfs
Hello, with current trunk (r9997) I'm getting ./libmapserver.a(mapwfs.o): In function `msWFSGetCapabilities': mapwfs.c:(.text+0x57cd): undefined reference to `msOWSCommonNegotiateVersion' ./configure --with-ogr --with-proj --with-gdal --with-wfs Its compiling successfull when using ./configure --with-ogr --with-proj --with-gdal With 5.6.3. I couldn't reproduce the problem. I'm using a debian system. Can someone confirm this problem? Should I file a ticket? Lars ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
Re: [mapserver-users] LABEL-formatting options
Stephan Holl schrieb: Hello mapservers, we are using MapServer for visualizing shapefiles with double entries inside. Mainly this are contour-lines from waterdepth. The double values have 32 decimal places and mapserver tries to render them _all_ along a contourline. This does not look nice... Is there an option to trim the values with a dedicated mapfile-parameter, e.g. where a prinft-syntax can be used to format the values? The shapefiles are generated automatically so adding another column with trunc()ed or round()ed values is no option. Are there any options to format label-values/strings? I have not found anything in the docs. AFAIK there isn't a trim/cut function. If the numbers have the same ending you could define them as WARP character and they would be replaced by a line break. Would mapscript help you here? Or to make things more complicated: Couldn't you write the the shapefiles into an database? Then you could use trim/cut the value within your sql statement. Lars ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
Re: [mapserver-users] Translate MapServer Doc into french
Yves Jacolin schrieb: Hello, What is the process to translate the documentation into french? Does someone began to work on this? I'm not sure if someone is working on french translation, but the process of translating the docs has been described by Jeff McKenna here http://lists.osgeo.org/pipermail/mapserver-dev/2010-February/009653.html I will add to this: Just check in the translated files. The build script will take care of missing translation by inserting the English version. Its really nice to see that the multilingual setup attracts more and more people ;) Thank you! Lars ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
Re: [mapserver-users] Changelog of version 4 to 5
Christian Braun schrieb: Hello list members, currently I am doing a migration of our servers and changed mapserver from version 4.10 to the latest 5.6. As I figured out some problems with the syntax of the map file I wanted to know where I can find some kind of 'changelog' for mapfile syntax between the versions. I remember that there was somehing on the old web site layout but I am not able to find it anymore. Could someone please help me out with a document, The migration guides are here: 4.x. - 5.0 http://trac.osgeo.org/mapserver/browser/branches/branch-5-0/mapserver/MIGRATION_GUIDE.TXT 5.0 - 5.2 http://trac.osgeo.org/mapserver/browser/branches/branch-5-2/mapserver/MIGRATION_GUIDE.TXT 5.2 - 5.4 http://trac.osgeo.org/mapserver/browser/branches/branch-5-4/mapserver/MIGRATION_GUIDE.TXT (I'm not sure if the obove are all the same) 5.4 - 5.6 http://trac.osgeo.org/mapserver/browser/branches/branch-5-6/mapserver/MIGRATION_GUIDE.TXT They should be referenced in the docs, but I don't have a link handy. Lars ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
Re: [mapserver-users] Mapserver ignore DATA in layer definition
Oliver Christen schrieb: hi I have a mapserver 5.2.1 on a server which totally ignore the DATA in a postgis layer definition in my mapfile. I can write anything I want, even gibberish, in the DATA without even geting an error. This is my layer : LAYER NAME plan_points STATUS ON TYPE POINT CONNECTIONTYPE POSTGIS CONNECTION dbname=sitn user=plans_intervention password=sitn_plans_intervention host=nesitn2 #DATA 'geom from (select geom,oid,id,fk_obj,code,com,sf,op_saisie,rem,rotation,url_lien,owner from plans_intervention.plan_points) as foo' #DATA geom from (select * from test.plan_points) as foo using unique id DATA dfsdfsdfd TEMPLATE ttt OPACITY 100 CLASSITEM code TOLERANCE 20 CLASS STYLE SYMBOL background1 SIZE 20 COLOR 255 255 255 ANGLE [rotation] END STYLE SYMBOL VHC1 SIZE 20 COLOR 0 0 255 ANGLE [rotation] END TEXT ([com]) LABEL COLOR 0 0 255 OUTLINECOLOR 255 255 255 FONT arial TYPE truetype SIZE 12 ANGLE [rotation] POSITION uc PRIORITY 10 PARTIALS FALSE FORCE true ANTIALIAS true END END END as you can see I have made different try for the DATA, all are ignored, even the DATA dfsdfsdfd one. the server is running on Windows Server 2008 any idea why the DATA string is ignored ? My first idea: Are you sure that this mapfile is used? Or do you have two layer with the same name? I just tried to use DATA kakja as statement end got an internal server error back. But I tried on current trunk (5.7-dev) Lars ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
Re: [mapserver-users] Mapserver ignore DATA in layer definition
Oliver Christen schrieb: hi Lars yes I checked that, the layer is effectively used as I get a layer not found error as soon as I remove/comment it Ok. I think I would enable debug logs on map and layer level to get more informations. I have no Windows Server here to test. Do you also use IIS then? But if its on windows, I really cant help. First thing what comes to my mind is case sensitive filenames and CR/LF line ends, but this doesn't apply here. Lars ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
Re: [mapserver-users] Latest mapserver windows binaries
Intengu Technologies schrieb: Where can I find the latest Windows Mapserver binaries MapServer Windows binaries are included in the MS4W package at http://maptools.org/ms4w/ Lars ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
Re: [mapserver-users] msProcessProjection(): Projection library error. no system list, errno: 13
Adrian Popa schrieb: Hmm, any idea on this one? How can I find out if proj is trying to read the epsg file? I'm thinking of using strace to see what files it tries to open, but I don't know what syntax to use to try to project from 4326 to 900913... Just to clarify: - Your data is in wgs84 (epsg:4326) - you want to serve mercator projection (epsg:900913) A few questions: - are there any errors in the capabilities document? - did you tried to use mapserver logging (MS_ERRORFILE) and high debug level (DEBUG 5) - could you try to use shp2img, maybe this gives you a bit more information? - did you compile MapServer and the dependencies by yourself? - what MapServer version do you use? - do you have Proj4 installed? (OpenLayers doesn't use the same lib, it uses the javascript lib) I hope it does not look like keeping you busy, but without further information its difficult to help. Lars ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
Re: [mapserver-users] msProcessProjection(): Projection library error. no system list, errno: 13
Adrian Popa schrieb: [...] The output returned is: ?xml version='1.0' encoding=ISO-8859-1 standalone=no ? !DOCTYPE ServiceExceptionReport SYSTEM http://schemas.opengis.net/wms/1.1.1/exception_1_1_1.dtd; ServiceExceptionReport version=1.1.1 ServiceException msProcessProjection(): Projection library error. no system list, errno: 13 It looks like you are working with an linux distribution. On debian you can find the epsg-database at /usr/share/proj/epsg Try to add the following line to this file: 900913 +proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0 +k=1.0 +units=m +nadgri...@null +no_defs Then you can reference it with epsg:900913 Lars ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
Re: [mapserver-users] Tips on generating tiles from mapserver
Adrian Popa schrieb: Hello everyone, I have some mapserver layers that I would like to generate into tiles (because the content doesn't change much). I would like to find out the following: 1) a link to a tutorial or help on how to do this (which tools to use) You could use TileCache. It comes with an tilecache_seed.py script which generates the tiles queering MapServer. A sample config can look like: - MapServer layer LAYER TYPE POLYGON STATUS ON NAME landuse CONNECTIONTYPE POSTGIS CONNECTION host=host port=port dbname=dbname user=dbuser password=dbpasswd DATA way from (select way,id ,landuse from otg_polygon where landuse is not null ) as foo using unique id using srid=900913 PROCESSING LABEL_NO_CLIP=ON PROCESSING CLOSE_CONNECTION=DEFER CLASSITEM landuse METADATA WMS_TITLE landuse WMS_GROUP_TITLE landuse WMS_EXTENT -3654301.4476046 3830412.5307382 6971056.978358 9730128.1208444 WMS_ABSTRACT layer landuse END #metadata CLASS STYLE COLOR #E3E2DF END END END - corresponding TileCache config [landuse] type=WMS url=http://example.org/cgi-bin/mapserv?map=/path/to/mapfile.map layers=landuse extension=png bbox=-3654301.4476046,3830412.5307382,6971056.978358,9730128.1208444 maxResolution=9783.93961875 srs=EPSG:900913 metaTile=true metaSize=8,8 You have to adjust the extents, resolutions, srs, url to your needs Have a look at TileCache docs for further explanation. (www.tilecache.org) 2) how can I calculate an estimate of the size those tiles would occupy I have no formula at hand. 3) what naming convention (or extra details) are needed to make the tiles viewable in OpenLayers. Either you are using TileCache or you can direct access the cache directory via an OpenLayers.Layer.TileCache so you don't have to bother with naming. Lars ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
[mapserver-users] 5.6.0-b2 and GetFeatureInfo
Hello, I'm seeing an diference between 5.4.2 and last beta regarding GetFeatureInfo. While 5.4.2 sends back my template with requested values, beta2 gives me lists of coordinates of the requested features. The result looks like this: map name=map1 width=1086 height=414 area href=javascript:Clicked('7'); title=7 shape=poly coords= -5,-5, 209,-5, 205,10, 185,1, 159,-5, -5,-5 / /map My request url: http://myserver/mywrapper?LAYERS=grenzenFORMAT=aggSERVICE=WMSVERSION=1.1.1REQUEST=GetFeatureInfoSTYLES=EXCEPTIONS=application%2Fvnd.ogc.se_xmlSRS=EPSG%3A900913BBOX=1173585.468193%2C6770353.815697%2C1215090.774545%2C6786176.280549X=596Y=272INFO_FORMAT=text%2FhtmlQUERY_LAYERS=grenzenFEATURE_COUNT=10WIDTH=1086HEIGHT=414 I just have to change the binary to get this behavior. MapServer details: ./configure --with-postgis --with-wms --with-gdal --with-geos --with-ogr --with-fastcgi --with-proj --with-wfs -with-agg --with-freetype --with-experimental-png MapServer version 5.6.0-beta2 OUTPUT=GIF OUTPUT=PNG OUTPUT=JPEG OUTPUT=WBMP OUTPUT=SVG SUPPORTS=PROJ SUPPORTS=AGG SUPPORTS=FREETYPE SUPPORTS=ICONV SUPPORTS=WMS_SERVER SUPPORTS=WFS_SERVER SUPPORTS=FASTCGI SUPPORTS=GEOS SUPPORTS=RGBA_PNG INPUT=EPPL7 INPUT=POSTGIS INPUT=OGR INPUT=GDAL INPUT=SHAPEFILE Maybe its not related to the changes in beta2, but in general to 5.6. I can send further infos on request if that helps to solve this case. Lars ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
Re: [mapserver-users] display feature name beside feature
sunny74 schrieb: Hi Michael, Thanks for your reply. I had gone thru' the links you have given before making this post.But I am having the problems given in the link below: http://n2.nabble.com/font-error-while-trying-to-show-Label-on-map-td3654455.html#a3654455 When using truetype I get the error probably bec' I am not able to specify the fontset file. So I need to know the following: 1) What kind of file is the fontset file?I think it is a text file its just a textfile, yes 2) Where do I keep the fontset file - in the same folder as the map file or in different folder.If different folder how do I specify the path in the map file. as you wish. You have to tell MapServer the place with the keywortd FONTSET. 3) Where do I keep the fonts? Is it okay if I keep it in the Windows Font Folder i.e C:/Windows/Fonts yes, you can keep it there. MapServer needs read permissions to the fonts. In the fonset file you can define the path. 4)How do I specify the path of the fonts in the fontset file? /path/to/fonts/font.ttf Please have a look at http://mapserver.org/mapfile/map.html and http://mapserver.org/mapfile/fontset.html Lars ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
Re: [mapserver-users] Updated MapServer flyer
Steve Lime schrieb: Hi Lars, thanks for working up an updated brochure, looking at the old one it could use it. Some comments... - I think I'd avoid the MapServer website screen shot in favor of another app. The website text features the security fix announcements which while a reality in a project aren't marketing friendly. I can offer a couple of sites as could others I bet. I like your example, nice and colorful. If someone could point me to MapServer powered sites, I'll update the screenshot in the flyer. - Perhaps the screen shots could be a bit taller, more of a square aspect ratio? Ok, I'll take a further look. - Under features it might make sense to highlight output options: all sorts of raster images, PDF, SWF, SVG and templated text - Might include input and the new output plugin architectures as features - The Leverages best-of-breed sentence could be reworked to say we leverage other OSGeo projects including GDAL, GEOS, PostGIS and Proj.4. I think we should really emphasize the reliance on other OSGeo projects. - In the last feature sentence I think MapBuilder can be removed. There are some frameworks specific to (or that at least favor) MapServer (e.g. p.mapper and GeoMoose) that could get some love here... Thanks for this info. I'm putting it in. I think the 5.6 features are performance centric (raster rendering improvements, single pass, etc...). The 6.0 release *should* have a more output-based focus with full support for the rendering plugin, new object structures including references, better SLD support, styles within labels and so on. XML mapfiles will be in 5.6. It's important to note that XML mapfiles allow users to define a configuration in XML but you must transform it to a .map file for use. I hope that might really have an impact on wysiwyg editors eventually. Sounds like an interesting roadmap, I'll spread the word... ;) Lars ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
Re: [mapserver-users] problem reading log/debug
jim white schrieb: I am having a problem seeing the log/debug output. In order to see the log out I have to restart the Apache server. On shutdown it outputs the log files. Besides having to restart the server I would prefer to monitor the logs in real time with tail -f logfile. I am running Mapserver version 5.4.1. My map file has this in the map section. CONFIG MS_ERRORFILE stderr DEBUG 5 Just a note, no solution: I have an installation of MapServer (a week old svn version) with fastcgi and lighttpd. There are 6 processes available. The logging isn't reliable, if I tail -f the log file, I don't see the messages in real time. The idle timeout is set to 20. I didn't try the restart of lighttpd. I assume that this behavior depends on my lighttpd config (and not in MapServer), but I did not put time in it to find the cause. Not sure if this helps at all, I just wanted to say something ;) Lars ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
Re: [mapserver-users] duplicate labels
Andy Colson schrieb: Hi All, Here is a screen shot: http://maps.camavision.com/map.jpg There are, as far as I can tell, 4 lines. The label is duplicating and I dont want it too. Here is the layer from the mapfile: LAYER NAME annotate_pin TYPE line STATUS on CLASS NAME HIGHLIGHT STYLE COLOR 0 255 0 OUTLINECOLOR 0 255 0 WIDTH 3 END LABEL TYPE truetype FONT Vera SIZE 10 COLOR 0 0 0 ANGLE follow POSITION auto BACKGROUNDCOLOR 255 255 255 MINDISTANCE 900 END END END I have played with MINDISTANCE from 0 to 99,000 and it does not seem to make a difference. I googled a little but have not found a useful answer. If you want to use MINDISTANCE you have to set the SIZEUNITS parameter at layer level like this: LAYER ... SIZEUNITS meters # one of [pixels|feet|inches|kilometers|meters|miles] ... LABEL ... MINDISTANCE 500 ... END ... END So the label wouldn't repeated for distances smaller than 500 meter. Lars ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
Re: [mapserver-users] duplicate labels
Andy Colson schrieb: Lars Lingner wrote: Andy Colson schrieb: Hi All, Here is a screen shot: http://maps.camavision.com/map.jpg There are, as far as I can tell, 4 lines. The label is duplicating and I dont want it too. Here is the layer from the mapfile: LAYER NAME annotate_pin TYPE line STATUS on CLASS NAME HIGHLIGHT STYLE COLOR 0 255 0 OUTLINECOLOR 0 255 0 WIDTH 3 END LABEL TYPE truetype FONT Vera SIZE 10 COLOR 0 0 0 ANGLE follow POSITION auto BACKGROUNDCOLOR 255 255 255 MINDISTANCE 900 END END END I have played with MINDISTANCE from 0 to 99,000 and it does not seem to make a difference. I googled a little but have not found a useful answer. If you want to use MINDISTANCE you have to set the SIZEUNITS parameter at layer level like this: LAYER ... SIZEUNITS meters # one of [pixels|feet|inches|kilometers|meters|miles] ... LABEL ... MINDISTANCE 500 ... END ... END So the label wouldn't repeated for distances smaller than 500 meter. Lars ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users That didn't seem to work. It made all my fonts really small, but the labels still duped. Do you have at MAP level the UNITS parameter? [feet|inches|kilometers|meters|miles|dd] Please try that, I should have told you that in my last reply ;) also: which projection have you set at MAP level? The help says layer.sizeUnits Sets the unit of CLASS object SIZE, does that include label font size? it sets the unit of the object size, not the size itself. The font size is controlled by the SIZE parameter (LABEL object) It defaults to pixels, yes? Wouldnt a really big MINDISTANCE still have removed dups? Not necessarily... Often they are different in orders of magnitude Lars ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
Re: [mapserver-users] duplicate labels
Andy Colson schrieb: [...] The help says layer.sizeUnits Sets the unit of CLASS object SIZE, does that include label font size? it sets the unit of the object size, not the size itself. The font size is controlled by the SIZE parameter (LABEL object) Then why did the labels font size change? I'm not sure about this. If I'm changing sizeunits from meters to kilometers, my style looks realy awkward but my labels are stay the same. Here is my entire mapfile, the annotate_pin layer is at the bottom: MAP NAME bremer SIZE 800 800 UNITS feet SHAPEPATH '/pub/maps/bremerIA' FONTSET /pub/www/fonts/fonts.txt # full extent EXTENT 5166680.718750 3687027.837500 5306080.031250 3802972.662500 # testing #EXTENT 5191357.283967 3726454.400032 5205566.339522 3738272.725606 PROJECTION init=epsg:3417 END [...] WEB IMAGEPATH '/tmp/' IMAGEURL '/tmp/' METADATA 'wms_title' 'bremer' 'wms_onlineresource' 'http://my.host.com/cgi-bin/mapserv?map=wms.map;' 'wms_srs' 'EPSG:3417' END END [...] LAYER NAME annotate_pin TYPE line STATUS on # if I comment the SIZEUNITS out it only changes the label size SIZEUNITS feet CLASS NAME HIGHLIGHT STYLE COLOR 0 255 0 OUTLINECOLOR 0 255 0 WIDTH 3 END LABEL TYPE truetype FONT Vera SIZE 10 COLOR 0 0 0 BACKGROUNDCOLOR 255 255 255 ANGLE follow POSITION auto PARTIALS false MINDISTANCE 95000 END END END END The mapfile looks fine. I'm unsing MINDISTANCE the same way for controlling road labels. One other thing you can try is to play with BUFFER for the labels. Which version of MapServer are you using? I know along with 5.4 there where some enhancements for labeling. One last thought: Do you have this problem just with the layer annotate_pin? Does the labeling of other layers work as you expect? lars ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
Re: [mapserver-users] 5.x Tutorial on mapserv -v (raster doesn't work)
Lucena, Ivan schrieb: [...] --- msLoadSymbolSet(): Unknown identifier. First token must be SYMBOLSET, this doesn't look like a symbol file. --- In C:\OSGeo4W\apache\logs\error.log there is no error message related to that. Does anyone know what could be wrong? There was a security fix a few month ago and the tutorials aren't updated. Please add the keyword SYMBOLSET at the beginning of the symbol file (and the END keyword at the end). The fixes and requirements are described in http://mapserver.org/development/rfc/ms-rfc-56.html Lars ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
Re: [mapserver-users] Map File for Open Street Map symbology
thomas bonfort schrieb: [...] I don't think you can if you need to do a string comparison in your sql where clause, as there's no way in mapserver to escape the ' or characters Ok, thanks for clarification. DATA way from (select way,osm_id ,name from planet_osm_polygon where 'natural'='water' ) as foo using unique osm_id using srid=900913 was not working... but I just tried it again, just to make sure I don't say anything wrong... and its working. *doh* it's a valid sql clause, but useless for mapserver as it won't return any data (as the string 'water' and 'natural' are never equal) Right, I only checked if mapserver returns an error... I didn't review the actual rendered image. Lars ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
Re: [mapserver-users] Map File for Open Street Map symbology
Rahkonen Jukka schrieb: Lars Lingner wrote: I see that you also had to rename the column natural. As this is an reserved name by postgres, is there an way to use such a name in an mapserver expression? Although renaming the column did work for me I just want to know how to quote correctly. Natural is reserved keyword in PostgrSQL, but it is not actually denied to use it as a column name. It just needs to be queried like select natural from osm_line limit 10; Renaming the column may make living a bit easier, many PostGIS drivers I have used with GIS programs are sending SQL simply like select natural... and that will fail. Yes you are right but I couldn't find a way to quote this keyword in an mapfile data statement. DATA way from (select way,osm_id ,name from planet_osm_polygon where 'natural'='water' ) as foo using unique osm_id using srid=900913 was not working... but I just tried it again, just to make sure I don't say anything wrong... and its working. *doh* Allright than. I don't know what I did wrong. Thanks for your response! Lars ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
Re: [mapserver-users] Map File for Open Street Map symbology
thomas bonfort schrieb: I've created a wiki page with (I hope) a step by step tutorial for rendering OSM data with mapserver. enjoy it (or hate it) here: http://trac.osgeo.org/mapserver/wiki/RenderingOsmData Thank you. You put a lot of work in this! It was a big surprise to see that MIN/MAXSCALEDENOM is allowed at Label-Level. At least with current trunk version. That are great news! I see that you also had to rename the column natural. As this is an reserved name by postgres, is there an way to use such a name in an mapserver expression? Although renaming the column did work for me I just want to know how to quote correctly. Lars ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
Re: [mapserver-users] missing symbol file on mapserver.org
percy schrieb: There's a broken link on http://www.mapserver.org/mapfile/symbology/construction.html The symbol file which is referenced throughout the document is missing: http://www.mapmedia.de/dokumente/umn_signaturen_howto/vortrag_demo.zip The new URL is http://www.mapmedia.de/fileadmin/user_upload/dokumente/umn_signaturen_howto/ vortrag_demo.zip So for other link you have to replace http://www.mapmedia.de/dokumente/umn_signaturen_howto/ with http://www.mapmedia.de/fileadmin/user_upload/dokumente/umn_signaturen_howto/ Lars ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
[mapserver-users] LABELMAXSCALEDENOM at class level possibly?
Hello, since I can have several classes in an layer and a class can have a label object, I thought I can use LABELMAXSCALEDENOM (or LABELMINSCALEDENOM) at class level. But LABELMAXSCALEDENOM seems only valid at layer level. Of course I can use MAXSCALEDENOM at class level, but this effects the whole class not just the label. Am I doing something wrong, do I oversee something? Or is this behavior intended like it is? I'm using current trunk: ./mapserv -v MapServer version 5.3-dev OUTPUT=GIF OUTPUT=PNG OUTPUT=JPEG OUTPUT=WBMP OUTPUT=SVG SUPPORTS=PROJ SUPPORTS=AGG SUPPORTS=FREETYPE SUPPORTS=ICONV SUPPORTS=WMS_SERVER SUPPORTS=WFS_SERVER SUPPORTS=GEOS INPUT=EPPL7 INPUT=POSTGIS INPUT=OGR INPUT=GDAL INPUT=SHAPEFILE Lars ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
[mapserver-users] different attribute values of subfeatures and its visualization
Hello list, I have a bunch of spatial data in my PostgreSQL/PostGIS-DB. They are polyline features. Each polyline has some global attributes, which means the attributes are describing the whole line. Length is such an attribute but also the overall diameter could be one. To make it more visual, the polylines should represent tubes. A polyline consists (of course) of one or more lines. Such a line I would call subfeature. Every line has its own length and also e.g. its own diameter attribute. Sometimes the values of diameter are equal at the whole length, that is no problem. I have issues if the values are not equal. My idea was to give the subfeatures with different values an different stroke width, to represent the diameter, or at least an different color. Is there a way to tell mapserver that a feature should have such a complex visualization? I have the coordinates stored at the DB and can query it, if it helps at any point. 1) First I thought I cut the features apart and can then define classes in my mapfile. The drawback is then: I'll loose the state of the whole feature. I want to be able to query the feature and the response should include the global attributes and the ones specified by the subfeature. Hmmm... 2) I also could store the global attributes with the subfeature. But then I'll end up with a lot redundancy, which I want to avoid. Hmmm... At the end I want to define an WMS and WFS. With way 1) I also get a lot of features returned by the WFS which makes the handling at the client very memory consuming and very very slow. Therefore I want to start with the WMS but now I'm at a dead end. My question is: Is there a an other way (independent from my 1+2) to make the sizing of a feature depended on the attribution on a subfeature? I hope I could make myself understandable. But with such a complex issue (isn't it?) I'll happy to answer any open questions. Thanks in advance lars ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users