Re: [mapserver-users] Union Layers and GetLegendGraphic
Keith, The idea looks promising. Which source layer should be used to copy the styles? In case if the source layer contains multiple classes (with expressions, classitem etc.), the actual feature may be required to select the class to be used. Best regards, Tamas 2011/5/19 Keith Moss keith.m...@landgate.wa.gov.au Hi all, Just noticed an issue with the new 'UNION' layer type in MapServer 6. With 'STYLEITEM AUTO' set the styles are inherited for GetMap requests but, it seems, not for GetLegendGraphic requests. Giving the UNION layer a copy of the styles for the source layers works, but obviously this is exactly ideal. Just wondering if this is on anyone's to implement list? cheers __ Keith Moss Satellite Remote Sensing Services Operations Landgate 65 Brockway Road, FLOREAT WA 6014 PO Box 741 Wembley WA 6913 Ph. (08) 9387 0332 | Fx. (08) 9383 7142 keith.m...@landgate.wa.gov.au www.landgate.wa.gov.au This e-mail and any files transmitted with it are intended only for the use of the addressee(s). It may contain information that is confidential and privileged, in which case neither is intended to be waived or lost by mistaken delivery to you. If you are not an intended recipient, any use, interference with, disclosure, distribution or copying of this material is unauthorised and prohibited. If you receive this e-mail in error, please notify the sender by return e-mail and delete the message and any attachments from your system. Unless specifically indicated, this e-mail does not constitute formal advice or commitment by the sender or the Western Australian Land Information Authority (Landgate). Information in this message not relating to the official business of Landgate shall be understood as neither given nor endorsed by it. It is your responsibility to check any attachments for viruses and defects before opening or sending them on. Landgate’s liability is limited to re-supplying affected attachments. ___ 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] confused about mapscript java configuration
hello I think I am confused about mapscript java configuration I added my configuration file --with-java-include-os-name=$JAVA_HOME/include But It still cannot find jni.h I checked $JAVA_HOME: orkun@orkun-HP:~$ ls $JAVA_HOME/include/ classfile_constants.h jawt.h jdwpTransport.h jni.h jvmti.h linux // jni.h seems to exist. what might have caused the problem ? regards -- Ahmet Temiz Jeoloji Müh. Afet ve Acil Durum Yönetimi Başkanlığı Planlama ve Zarar Azaltma Dairesi Başkanlığı Bilgi ve CBS grubu Eskişehir Yolu 10. km. Lodumlu / Ankara Tel : 0 312 2872680 / 1535 Ahmet Temiz Geological Eng. Information Systems - GIS Group Disaster and Emergency Management of Presidency ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
[mapserver-users] mapscript owsdispatch does not work, cgi mapserver does
Hi, I have strange problem, I need to use mapobject.OWSDispatch with WMS GetMap request, and I do expect image at the output. I have prepared small python wrapper script, which should load the mapfile, perform owsdispatch and return the result. It does not work (saying something about missing xerces support, which is not true, see below). When I use *exactly the same* mapfile, but with simple shell wrapper (so no mapscript), it works perfectly. Examples: (1) Shell script wrapper: #!/bin/sh export MS_MAPFILE=/tmp/wfs02.map /usr/lib/cgi-bin/mapserv http://localhost/cgi-bin/owsviewer2.sh?LAYERS=krajeTRANSPARENT=TRUEFORMAT=image%2FpngEXCEPTIONS=XMLVERSION=1.3.0STYLES=defaultCRS=EPSG%3A4326SERVICE=WMSREQUEST=GetMapBBOX=49,12,51,18WIDTH=1000HEIGHT=634 - Image is returned (2) Python script: #!/usr/bin/python import mapscript mapobj = mapscript.mapObj(/tmp/wfs02.map) request = mapscript.OWSRequest() request.loadParams() print mapobj.OWSDispatch(request) http://localhost/cgi-bin/owsviewer2.py?LAYERS=krajeTRANSPARENT=TRUEFORMAT=image%2FpngEXCEPTIONS=XMLVERSION=1.3.0STYLES=defaultCRS=EPSG%3A4326SERVICE=WMSREQUEST=GetMapBBOX=49,12,51,18WIDTH=1000HEIGHT=634 - ?xml version='1.0' encoding=ISO-8859-1 standalone=no ? ServiceExceptionReport version=1.3.0 xmlns=http://www.opengis.net/ogc; xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; xsi:schemaLocation=http://www.opengis.net/ogc http://schemas.opengis.net/wms/1.3.0/exceptions_1_3_0.xsd; ServiceException msDrawMap(): Image handling error. Failed to draw layer named #39;kraje#39;. msOGRFileOpen(): OGR error. Open failed for OGR connection in layer `kraje#39;. File /tmp/mapserv/4dd50e3f_54c_0..tmp.gml appears to be GML but the GML reader can#39;t be instantiated, likely because Xerces support wasn#39;t configured in. /ServiceException /ServiceExceptionReport What am I doing wrong? Thanks Jachym -- Jachym Cepicky e-mail: jachym.cepicky gmail com URL: http://les-ejk.cz GPG: http://les-ejk.cz/pgp/JachymCepicky.pgp wfs02.map Description: Binary data owsviewer2.sh Description: Bourne shell script #!/usr/bin/python import mapscript mapobj = mapscript.mapObj(/tmp/wfs02.map) request = mapscript.OWSRequest() request.loadParams() print mapobj.OWSDispatch(request) ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
RE: [mapserver-users] savequery and queryfile
Hi Nikos: It's pretty straight forward. Using the CGI, if you issue a mode=xxxquery call with savequery=true MapServer will write a file that serializes the query parameters to a temporary file. Then, if you make a call with mode=map with queryfile=queryfile name.qy MapServer will execute that query and render a query map instead of a regular map. The trick is how the file is named. MapServer CGI generates a unique ID each time it's run and it's used to name all temp files including the queryfile. Format is map name + id.qy. You can access that ID via template. Often that's not possible and you might want to generate it yourself (as a pseudo-session id) and pass it using the id CGI param. This way the queryfile name is known on the client. In OpenLayers-land I've used query files successfully to maintain a selection overlay layer even for complex queries. You can even maintain cache multiple queries using multiple session ids. Let me know if you need more info. Steve -Original Message- From: mapserver-users-boun...@lists.osgeo.org [mailto:mapserver-users-boun...@lists.osgeo.org] On Behalf Of ni...@maich.gr Sent: Wednesday, May 18, 2011 7:20 AM To: mapserver-users@lists.osgeo.org Subject: [mapserver-users] savequery and queryfile Hello, I am wondering if someone could explain how to use savequery and queryfile functionality to make a query map persistent for further operations. I've read the docs but cant seem to get a handle on it. regards, nikos ___ 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] Issues with Bilinear Rendering of Raster Images in MapServer 6.0.0-2
Hello, I just upgraded MapServer today on (Ubuntu Lucid Lynx) to 6.0.0-2 from MapServer 5.6.6, and am experiencing a weird error with the bilinear rendering from GeoTiff (the underlying data store) to PNG (the display format). Whereas before there were nice tapered edges and smoothing, there is now a strange black / blue /green border around all of our pngs. I read through the upgrade documentation, and it seems like there have been a number of changes to the way in which rasters are rendered, but I can't figure out the element(s) that I might be able to adjust to get the rasters to look fabulous again. Has anyone run into this particular issue? I've attached before / after pngs. Thank you! Sarah Relevant parts of my map config file http://osgeo-org.1803224.n2.nabble.com/file/n6382806/MapServer5.6BilinearInterpolation.png MapServer5.6BilinearInterpolation.png http://osgeo-org.1803224.n2.nabble.com/file/n6382806/MapServer6.0BilinearInterpolation.png MapServer6.0BilinearInterpolation.png : MAP ... IMAGETYPE aggpng24 OUTPUTFORMAT NAME aggpng24 DRIVER AGG/PNG MIMETYPE image/png IMAGEMODE RGBA TRANSPARENT ON EXTENSION png END ... LAYER NAME snowpack TYPE RASTER DUMP true OFFSITE 0 0 0 DATA /path_to_directory/the_geotiff.tif EXTENT -124.625 31.875 -113 44 METADATA wms_titlesnowpack gml_include_items all wms_include_items all END STATUS OFF PROCESSING BANDS=1,1,1 PROCESSING RESAMPLE=BILINEAR PROCESSING SCALE=10,500 # Brighter purple gradient PROCESSING LUT_1=1:249, 64:223, 128:200, 220:112, 255:112 #192:174 PROCESSING LUT_2=1:213, 64:184, 128:145, 220:12, 255:12 #192:108 PROCESSING LUT_3=1:242, 64:230, 128:220, 220:242, 255:242 #192:198 PROJECTION proj=longlat ellps=WGS84 datum=WGS84 no_defs END END ... END -- View this message in context: http://osgeo-org.1803224.n2.nabble.com/Issues-with-Bilinear-Rendering-of-Raster-Images-in-MapServer-6-0-0-2-tp6382806p6382806.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] opacity and outputformat
i'm using MapScript to create un mapObj. finally a draw the image with Map-draw(); but the OPACITY is not good. Just one OPACITY, of my two layers, is set to all image i got this for my Outputformat : OUTPUTFORMAT NAME aggpng24 MIMETYPE image/png; mode=24bit DRIVER AGG/PNG EXTENSION png IMAGEMODE RGBA TRANSPARENT TRUE END i think it's good. if the address is not the same in the parameter CONNECTION it's all good. can i add a random number in my CONNECTION ? with the mapscript Marc-André Trottier 2011/5/12 thomas bonfort thomas.bonf...@gmail.com Opacity is set as a single integer between 0 and 100 on the layer level. There are no limitations on setting it on multiple layers, but in that case the opacity adds up, so if you have two layers with opacity 50, the final opacity of the image ends up being 75. If your final images end up with no opacity, this could be because your are also including a layer with full opacity, or because you are using a format which does not support an alpha channel (i.e. jpeg) regards, thomas On Mon, May 9, 2011 at 19:18, Marc-André Trottier trottier.marcan...@gmail.com wrote: hi! how can i get a output with opacity on 2 or more layers. with only 1 layer it's working fine but not with 2 or more. How should be written OPACITY when using IMAGEMODE RGBA ? (ALPHA) i tried something like OPACITY 22,22,22,22 but looks bad in all my tests, all i got was my 2 layers with full opacity (100) ... here is my mapfile : MAP EXTENT -8146324.306063 5632144.09953312 -8137075.425642 5638229.88815488 FONTSET fonts IMAGECOLOR 255 255 255 IMAGETYPE AGGA SIZE 732 482 STATUS ON UNITS METERS NAME MS OUTPUTFORMAT NAME 'AGGA' DRIVER AGG/PNG IMAGEMODE RGBA TRANSPARENT TRUE END PROJECTION init=epsg:900913 END LEGEND IMAGECOLOR 255 255 255 KEYSIZE 20 10 KEYSPACING 5 5 LABEL ANGLE 0.00 ANTIALIAS TRUE FONT arial MAXSIZE 256 MINSIZE 4 SIZE 10 TYPE TRUETYPE BUFFER 0 COLOR 255 255 255 FORCE FALSE MINDISTANCE -1 MINFEATURESIZE -1 OFFSET 0 0 PARTIALS TRUE END OUTLINECOLOR 0 0 0 POSITION LR POSTLABELCACHE TRUE STATUS EMBED TRANSPARENT FALSE END QUERYMAP COLOR 255 255 0 SIZE -1 -1 STATUS OFF STYLE HILITE END SCALEBAR ALIGN CENTER COLOR 0 0 0 IMAGECOLOR 255 255 255 INTERVALS 4 LABEL SIZE MEDIUM TYPE BITMAP BUFFER 0 COLOR 0 0 0 FORCE FALSE MINDISTANCE -1 MINFEATURESIZE -1 OFFSET 0 0 PARTIALS TRUE POSITION CR END OUTLINECOLOR 0 0 0 POSITION LL SIZE 200 3 STATUS EMBED STYLE 0 UNITS METERS END WEB IMAGEPATH path IMAGEURL QUERYFORMAT text/html LEGENDFORMAT text/html BROWSEFORMAT text/html END LAYER CONNECTION PATATE3 CONNECTIONTYPE WMS DEBUG 5 METADATA wms_srsEPSG:900913 wms_namePATATE3 wms_formatimage/png wms_server_version1.1.1 END NAME Carte PROCESSING CLOSE_CONNECTION=NORMAL PROJECTION init=epsg:900913 END STATUS ON TRANSFORM FALSE TYPE RASTER UNITS METERS END LAYER CONNECTION PATATE2 CONNECTIONTYPE WMS DEBUG 5 METADATA wms_srsEPSG:900913 opacity100 wms_namePATATE2 wms_formatimage/png wms_server_version1.1.1 END NAME PATATE2 PROCESSING CLOSE_CONNECTION=NORMAL PROJECTION init=epsg:900913 END STATUS ON TRANSFORM FALSE TYPE RASTER UNITS METERS END LAYER CONNECTION PATATE CONNECTIONTYPE WMS DEBUG 5 METADATA wms_srsEPSG:900913 opacity40 wms_namePATATE wms_formatimage/png wms_server_version1.1.1 END NAME PATATE PROJECTION init=epsg:900913 END STATUS ON OPACITY 40 TYPE RASTER UNITS METERS END END __ _ 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] Rasters and WFS
I am very new to GIS software. We are developing an application that will use both QGis and/or a web browser as the front end. Basically, we have large image files we will be sending as a background layer, and we want to overlay them with points having various attributes. The user should be able to click on each of the points and read off that point's attributes. This works well if we load our background image through a WMS layer and load the points via a shapefile as a vector layer in QGis; points are displayed atop the image and are clickable, bringing up a table of attributes for the selected point. In QGis, at least, adding the shapefile to the WMS mapfile does not permit clicking on points in the UI. It is not possible for the user to obtain shapefiles locally, so we need a solution that will allow both sets of information to be sent through a web service. Will WFS allow raster images to be embedded? Documentation seems to indicate not, but isn't quite clear. We can insist that the user open both a WMS and WFS layer, but this gets messy; we would really prefer a single data stream solution. A browser-based solution seems feasible with WMS, based on the quick trip I've taken through MapServer tutorials. Our customers, however, are comfortable with QGis and strongly prefer that option as an interface. Any thoughts would be appreciated. -- View this message in context: http://osgeo-org.1803224.n2.nabble.com/Rasters-and-WFS-tp6383431p6383431.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] Rasters and WFS
On 11-05-19 03:36 PM, SixDegrees wrote: Will WFS allow raster images to be embedded? Documentation seems to indicate not, but isn't quite clear. Paul, MapServer WFS does not serve raster data. We can insist that the user open both a WMS and WFS layer, but this gets messy; we would really prefer a single data stream solution. I think you will need to insist though there may be ways of simplifying things with a qgis plugin or something. Best regards, -- ---+-- I set the clouds in motion - turn up | Frank Warmerdam, warmer...@pobox.com light and sound - activate the windows | http://pobox.com/~warmerdam and watch the world go round - Rush| Geospatial Programmer for Rent ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
[mapserver-users] Re: Rasters and WFS
Thanks for clearing that up. Is there support within QGis for using WMS' GetFeatureInfo request when a point from the shapefile is clicked? This doesn't seem to be happening in my setup, but I may have something configured incorrectly. -- View this message in context: http://osgeo-org.1803224.n2.nabble.com/Rasters-and-WFS-tp6383431p6383792.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] Union Layers and GetLegendGraphic
Hi Tamas, The notion we had was that a GetLegendGraphic on a union layer would just work in the same way as a GetLegendGraphic on a layer group does at the moment. i.e. Displays all of the classes for all of the source layers. cheers __ Keith Moss Satellite Remote Sensing Services Operations Landgate 65 Brockway Road, FLOREAT WA 6014 PO Box 741 Wembley WA 6913 Ph. (08) 9387 0332 | Fx. (08) 9383 7142 keith.m...@landgate.wa.gov.au mailto:keith.m...@landgate.wa.gov.au www.landgate.wa.gov.au http://www.landgate.wa.gov.au/ From: Tamas Szekeres [mailto:szeker...@gmail.com] Sent: Thu 19/05/2011 16:12 To: Keith Moss Cc: mapserver-users@lists.osgeo.org Subject: Re: [mapserver-users] Union Layers and GetLegendGraphic Keith, The idea looks promising. Which source layer should be used to copy the styles? In case if the source layer contains multiple classes (with expressions, classitem etc.), the actual feature may be required to select the class to be used. Best regards, Tamas 2011/5/19 Keith Moss keith.m...@landgate.wa.gov.au Hi all, Just noticed an issue with the new 'UNION' layer type in MapServer 6. With 'STYLEITEM AUTO' set the styles are inherited for GetMap requests but, it seems, not for GetLegendGraphic requests. Giving the UNION layer a copy of the styles for the source layers works, but obviously this is exactly ideal. Just wondering if this is on anyone's to implement list? cheers __ Keith Moss Satellite Remote Sensing Services Operations Landgate 65 Brockway Road, FLOREAT WA 6014 PO Box 741 Wembley WA 6913 Ph. (08) 9387 0332 | Fx. (08) 9383 7142 keith.m...@landgate.wa.gov.au mailto:keith.m...@landgate.wa.gov.au www.landgate.wa.gov.au http://www.landgate.wa.gov.au/ This e-mail and any files transmitted with it are intended only for the use of the addressee(s). It may contain information that is confidential and privileged, in which case neither is intended to be waived or lost by mistaken delivery to you. If you are not an intended recipient, any use, interference with, disclosure, distribution or copying of this material is unauthorised and prohibited. If you receive this e-mail in error, please notify the sender by return e-mail and delete the message and any attachments from your system. Unless specifically indicated, this e-mail does not constitute formal advice or commitment by the sender or the Western Australian Land Information Authority (Landgate). Information in this message not relating to the official business of Landgate shall be understood as neither given nor endorsed by it. It is your responsibility to check any attachments for viruses and defects before opening or sending them on. Landgate's liability is limited to re-supplying affected attachments. ___ 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] Cascading Mapserver - WMS client - GetLegendGraphic ?
Hello list, We have a cascading WMS using Mapserver as a client to request maps from another Mapserver. We have it working well, however we are wondering whether it is possible to do a GetLegendGraphic request to this top level Mapserver and have it in turn pass on that request to the underlying mapserver, which would then return the legend graphic. Here's a snippet of our 'top level' Mapserver mapfile, which sits on our public server: ... LEGEND STATUS OFF KEYSIZE 30 15 KEYSPACING 10 10 LABEL COLOR 0 0 0 FONT 'arialbd' TYPE truetype SIZE 10 END END LAYER NAME 'coastpoly' TYPE RASTER CONNECTIONTYPE WMS CONNECTION http://ourprivateserver/wms?; PROCESSING CLOSE_CONNECTION=DEFER METADATA wms_name coastpoly wms_title Topographic Coastline Polygons wms_server_version1.1.1 wms_formatimage/png wms_srs EPSG:2193 EPSG:27200 EPSG:4326 END END ... And a snippet from our underlying Mapserver: ... LEGEND STATUS OFF KEYSIZE 30 15 KEYSPACING 10 10 LABEL COLOR 0 0 0 FONT 'arialbd' TYPE truetype SIZE 10 END END LAYER NAME 'coastpoly' TYPE POLYGON STATUS OFF CONNECTIONTYPE postgis CONNECTION dbname='ourdb' host='ourprivateserver' port=5432 user='user' password=pass PROCESSING CLOSE_CONNECTION=DEFER DATA 'the_geom FROM data.coastlinepoly USING UNIQUE gid USING srid=2193' PROJECTION proj=tmerc lat_0=0 lon_0=173 k=0.9996 x_0=160 y_0=1000 ellps=GRS80 towgs84=0,0,0,0,0,0,0 units=m END EXTENT 983515.7211 4728776.8709 2117458.3527 6223676.2306 METADATA wms_name coastpoly wms_title Topographic Coastline Polygons wms_version 1.1.1 wms_formatimage/png wms_srs EPSG:2193 EPSG:27200 EPSG:4326 wms_abstract Abstract END CLASS NAME 'Coast Polygon' STYLE COLOR 225 223 197 END END END ... I think we may be missing something obvious here, so any ideas greatly appreciated... :) Andrew Please consider the environment before printing this email Warning: This electronic message together with any attachments is confidential. If you receive it in error: (i) you must not read, use, disclose, copy or retain it; (ii) please contact the sender immediately by reply email and then delete the emails. The views expressed in this email may not be those of Landcare Research New Zealand Limited. http://www.landcareresearch.co.nz ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users