[mapserver-users] retrieve map coordinates with different EPSG
Hi, Usign the templating capabilities of mapserver. I need the parameters [mapx] and [mapy] will return the coordinate of a clicked point. I possible in the templates set semothing to have this coordinates [mapx], [mapy] in a different SRS ? I see there is the [maplon] and [maplat] parameter. But I need have the coords in another projected EPSG system rather than geographic 4326. Thx -- - Andrea Peri . . . . . . . . . qwerty àèìòù - ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
Re: [mapserver-users] Show build options for php_mapserver.so
On 12-09-07 1:21 AM, Ian Walberg wrote: Is there a way of doing the equivalent of ./mapserv –v with php or php_mapsript.so? A very easy way to see PHP build information (including mapscript details) is to go to the commandline and simply call 'php -i' Have a good Friday everyone. -jeff -- Jeff McKenna MapServer Consulting and Training Services http://www.gatewaygeomatics.com/ ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
Re: [mapserver-users] MapServer 6.2.0 beta3 release
Ubuntu package is available for precise in testing PPA: https://launchpad.net/~ubuntugis/+archive/ubuntugis-testing/+packages?field.name_filter=field.status_filter=publishedfield.series_filter=precise Alan On 12-09-06 02:07 PM, thomas bonfort wrote: The MapServer Team is pleased to announce the release of MapServer 6.2.0 beta3. This is the third beta on our way to a final 6.2 release, and contains many fixes that we encourage you to test. Depending on issues found in this beta release, we should probably be able to publish a release candidate for the next iteration. The changelog since beta3 is included in this email, or can be consulted here: http://www.mapserver.org/en/development/changelog/changelog-6-2-0-beta3.html The source for this release can be downloaded at: http://mapserver.org/download.html or http://download.osgeo.org/mapserver/mapserver-6.2.0-beta3.tar.gz The binary distributions listed in the download page should be updated with binaries for the new 6.2.0-beta3 release in the next couple of days. Once again we need your help to ensure a high quality product, so please help out by testing your applications with this new code base. Thanks! - The MapServer Team $ git --no-pager log --no-merges --pretty=format:%h %ai (%an)%n%s%n rel-6-2-0-beta2..HEAD | gsed 's!#\([0-9]\+\)! https://github.com/mapserver/mapserver/issues/\1 !g' 00791ca 2012-09-06 19:28:18 +0200 (Thomas Bonfort) update header version for beta3 af90e5a 2012-09-06 19:10:49 +0200 (Stephan Meissl) Fixing Style inheritance in WMS ( https://github.com/mapserver/mapserver/issues/4442 ) c55668e 2012-09-06 15:48:04 +0200 (Thomas Bonfort) avoir writing default values to STYLE ( https://github.com/mapserver/mapserver/issues/4446 ) 191d0c9 2012-09-06 15:32:36 +0200 (Thomas Bonfort) php-mapscript allow setting NULL template ( https://github.com/mapserver/mapserver/issues/4443 ) f8d8837 2012-09-06 14:23:01 +0200 (Thomas Bonfort) create python-mapscript install destination directory ( https://github.com/mapserver/mapserver/issues/4445 ) 8b61e09 2012-09-06 12:39:30 +0200 (Thomas Bonfort) adjust clip buffer for polygons in image space ( https://github.com/mapserver/mapserver/issues/179 ) f5e1bec 2012-09-05 17:48:45 +0200 (Thomas Bonfort) adjust clipping buffer to avoid edge artifacts ( https://github.com/mapserver/mapserver/issues/179 ) 9c9d999 2012-09-05 01:35:27 -0700 (Umberto Nicoletti) fix for https://github.com/mapserver/mapserver/issues/4417 : Oracle and queryByAttributes doesn't run d6be4e6 2012-09-05 14:27:22 +0200 (Stephan Meissl) Fixing wrong size in LegendURL of root layer ( https://github.com/mapserver/mapserver/issues/4441 ). 40ad795 2012-09-05 14:22:12 +0200 (Thomas Bonfort) build and clean mapscriptvars utility file ( https://github.com/mapserver/mapserver/issues/4440 ) fadc37a 2012-09-05 14:14:50 +0200 (Thomas Bonfort) fix ogc equals operator after rfc 64 ( https://github.com/mapserver/mapserver/issues/3613 ) ee0e42c 2012-09-05 14:11:57 +0200 (Thomas Bonfort) allow empty wms styles ( https://github.com/mapserver/mapserver/issues/4355 ) 5e9c8a1 2012-09-05 13:32:02 +0200 (Thomas Bonfort) deactivate postgis getextent function ( https://github.com/mapserver/mapserver/issues/4039 ) 9184876 2012-09-05 13:26:43 +0200 (Thomas Bonfort) avoid token collisions in parser when reading char by char ( https://github.com/mapserver/mapserver/issues/4012 ) 9cb9e5e 2012-09-05 13:19:44 +0200 (Thomas Bonfort) adjust letterspacing on follow labels ( https://github.com/mapserver/mapserver/issues/4404 ) 2d474ae 2012-09-04 20:47:34 +0200 (szekerest) SDE: Fix for the crash with NCLOB type ( https://github.com/mapserver/mapserver/issues/3001 ) 73c9d9d 2012-09-03 18:55:09 +0200 (Stephan Meissl) Fixing wms_style_name in GetMap requests ( https://github.com/mapserver/mapserver/issues/4439 ). ca2cbad 2012-08-31 17:30:53 +0200 (Thomas Bonfort) add branch-6-2 to stable merge script ( https://github.com/mapserver/mapserver/issues/4437 ) 155c827 2012-08-30 14:49:57 + (Alan Boudreault) Fix queryByFilter segfault in SWIG... 6f293c3 2012-08-30 14:18:18 + (Alan Boudreault) Fix in msQueryBy* functions to support the startindex from MapScript 75be13f 2012-08-30 13:30:24 + (Alan Boudreault) Modified WFSGetFeature to support maxfeatures across layers rather than within ( https://github.com/mapserver/mapserver/issues/4011 ) 5af6da6 2012-08-30 10:39:12 +0200 (Stephan Meissl) Updating HISTORY.TXT 5ca7cf0 2012-08-29 16:40:20 + (Alan Boudreault) Fix segfault in queryByFilter function in PHP/MapScript 6990f04 2012-08-29 15:27:01 + (Alan Boudreault) Fix another issue in symbolObj.getImage related to internal renderer object e1d9b33 2012-08-29 15:59:49 +0200 (Stephan Meissl) Adjusting to GMLCOV 1.0 corrigendum 1.0.1 ( https://github.com/mapserver/mapserver/issues/4003 ). 5849069 2012-08-29 15:18:14 +0200 (Stephan Meissl) Adjusting to WCS 2.0 Core corrigendum 2.0.1 (
Re: [mapserver-users] WMS layer example
Just in case anyone else needs this here is the working map file. MAP NAME 'Simple' STATUS ON SIZE 640 480 EXTENT -121 32 -100 45 UNITS MILES SHAPEPATH shp IMAGECOLOR 40 40 40 IMAGETYPE PNG CONFIG MS_ERRORFILE c:/ms4w/Apache/htdocs/mapserver.log DEBUG 5 LAYER DEBUG 5 NAME weather_radar TYPE RASTER STATUS DEFAULT CONNECTIONTYPE WMS CONNECTION http://nowcoast.noaa.gov/wms/com.esri.wms.Esrimap/obs?; METADATA wms_srs EPSG:4326 wms_name RAS_RIDGE_NEXRAD wms_server_version 1.1.1 wms_format image/png END PROJECTION init=epsg:4326 END END PROJECTION proj=latlong ellps=WGS84 datum=WGS84 END END -Original Message- From: mapserver-users-boun...@lists.osgeo.org [mailto:mapserver-users-boun...@lists.osgeo.org] On Behalf Of Ian Walberg Sent: Friday, August 31, 2012 9:02 AM To: mapserver-users@lists.osgeo.org Subject: [mapserver-users] WMS layer example Hello folks, We had weather layers working ok previously and now cannot find the map file we used. Anyone got an example that works with the AS_RIDGE_NEXRAD layer from here http://nowcoast.noaa.gov/help/mapservices.shtml Works with QGIS but cannot get the syntax correct for mapserver. Thanks Ian ___ 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] retrieve map coordinates with different EPSG
I looked at the documentation because I haven't used in a while. The docs aren't clear, but seem to imply that MAPXY should return coordinates in the same spatial reference system as the layer that you are querying. I kind of think that they should be in the spatial reference system of the map. Either way, try setting the map projection to the SRS that you want to get the coordinates back in. You will also have to change the extent values. David. http://mapserver.org/cgi/controls.html From: mapserver-users-boun...@lists.osgeo.org [mailto:mapserver-users-boun...@lists.osgeo.org] On Behalf Of Andrea Peri Sent: Friday, September 07, 2012 4:18 AM To: mapserver-users@lists.osgeo.org Subject: [mapserver-users] retrieve map coordinates with different EPSG Hi, Usign the templating capabilities of mapserver. I need the parameters [mapx] and [mapy] will return the coordinate of a clicked point. I possible in the templates set semothing to have this coordinates [mapx], [mapy] in a different SRS ? I see there is the [maplon] and [maplat] parameter. But I need have the coords in another projected EPSG system rather than geographic 4326. Thx -- - Andrea Peri . . . . . . . . . qwerty àèìòù - ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
[mapserver-users] [Python+MapScript] Convert imageObj to PIL Image
Hi All, I've been testing today in Python, trying to get a MapScript imageObj into an python Image object. This works via the following code: map.transparent = MS_ON map.selectOutputFormat('png8') map.outputformat.imagemode = MS_IMAGEMODE_RGBA map.outputformat.transparent = MS_ON img = map.draw() mem_png = StringIO.StringIO(img.saveToString()) _img = Image.open(mem_png) However, the _img file lost its transparency, even though it's still (or again) PNG. There MUST be a better way of getting the PNG file into PIL, right? Something besides writing it to a tempfile, opening it, and deleting it? On a side note, I only use this rendered image temporarily, I only need to cut it up in smaller bits and return those to my client. So if there's some sort of format that supports transparcency but without the PNG compression overhead, that would be even better! Regards, Jelmer Baas ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
Re: [mapserver-users] [Python+MapScript] Convert imageObj to PIL Image
IIRC, PIL does not support 8bit pngs with transparency, so writing it to a file won't help. If you need alpha, you'll have to stick with 32bit pngs. -- thomas On Fri, Sep 7, 2012 at 3:35 PM, Jelmer Baas b...@speerit.nl wrote: Hi All, I've been testing today in Python, trying to get a MapScript imageObj into an python Image object. This works via the following code: map.transparent = MS_ON map.selectOutputFormat('png8') map.outputformat.imagemode = MS_IMAGEMODE_RGBA map.outputformat.transparent = MS_ON img = map.draw() mem_png = StringIO.StringIO(img.saveToString()) _img = Image.open(mem_png) However, the _img file lost its transparency, even though it's still (or again) PNG. There MUST be a better way of getting the PNG file into PIL, right? Something besides writing it to a tempfile, opening it, and deleting it? On a side note, I only use this rendered image temporarily, I only need to cut it up in smaller bits and return those to my client. So if there's some sort of format that supports transparcency but without the PNG compression overhead, that would be even better! Regards, Jelmer Baas ___ 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] [Python+MapScript] Convert imageObj to PIL Image
Oh, wow, that was so simple. I changed map.selectOutputFormat('png8') to map.selectOutputFormat('png24') And done. Strangely, though, saving it to a file and re-opening *does* work! Thanks for the quick reply! -- Jelmer -Original Message- From: thomas bonfort [mailto:thomas.bonf...@gmail.com] Sent: Friday, September 07, 2012 15:50 To: Jelmer Baas Cc: mapserver-users@lists.osgeo.org Subject: Re: [mapserver-users] [Python+MapScript] Convert imageObj to PIL Image IIRC, PIL does not support 8bit pngs with transparency, so writing it to a file won't help. If you need alpha, you'll have to stick with 32bit pngs. -- thomas On Fri, Sep 7, 2012 at 3:35 PM, Jelmer Baas b...@speerit.nl wrote: Hi All, I've been testing today in Python, trying to get a MapScript imageObj into an python Image object. This works via the following code: map.transparent = MS_ON map.selectOutputFormat('png8') map.outputformat.imagemode = MS_IMAGEMODE_RGBA map.outputformat.transparent = MS_ON img = map.draw() mem_png = StringIO.StringIO(img.saveToString()) _img = Image.open(mem_png) However, the _img file lost its transparency, even though it's still (or again) PNG. There MUST be a better way of getting the PNG file into PIL, right? Something besides writing it to a tempfile, opening it, and deleting it? On a side note, I only use this rendered image temporarily, I only need to cut it up in smaller bits and return those to my client. So if there's some sort of format that supports transparcency but without the PNG compression overhead, that would be even better! Regards, Jelmer Baas ___ 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] retrieve map coordinates with different EPSG
Assuming you're sending the request in pixels, along with a map extent, MapServer will convert the point based on the SRS of the extent you passed. I'm thinking that won't get you what you want and I'm not sure of a way to do so. The various extent tags have projection capabilities built in but the point ones don't. Steve From: mapserver-users-boun...@lists.osgeo.org [mapserver-users-boun...@lists.osgeo.org] on behalf of Fawcett, David (MPCA) [david.fawc...@state.mn.us] Sent: Friday, September 07, 2012 8:36 AM To: Andrea Peri; mapserver-users@lists.osgeo.org Subject: Re: [mapserver-users] retrieve map coordinates with different EPSG I looked at the documentation because I haven’t used in a while. The docs aren’t clear, but seem to imply that MAPXY should return coordinates in the same spatial reference system as the layer that you are querying. I kind of think that they should be in the spatial reference system of the map. Either way, try setting the map projection to the SRS that you want to get the coordinates back in. You will also have to change the extent values. David. http://mapserver.org/cgi/controls.html From: mapserver-users-boun...@lists.osgeo.org [mailto:mapserver-users-boun...@lists.osgeo.org] On Behalf Of Andrea Peri Sent: Friday, September 07, 2012 4:18 AM To: mapserver-users@lists.osgeo.org Subject: [mapserver-users] retrieve map coordinates with different EPSG Hi, Usign the templating capabilities of mapserver. I need the parameters [mapx] and [mapy] will return the coordinate of a clicked point. I possible in the templates set semothing to have this coordinates [mapx], [mapy] in a different SRS ? I see there is the [maplon] and [maplat] parameter. But I need have the coords in another projected EPSG system rather than geographic 4326. Thx -- - Andrea Peri . . . . . . . . . qwerty àèìòù - ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
Re: [mapserver-users] [TINYOWS] 'Looser' XSD?
Eric, Thanks for reporting this because I have to dive into doing the same shortly. I would suggest that OpenLayers is where the problem is because it is generating the XML that is going to TinyOWS. I have not looked into this specific issue but in general OL is pretty flexible and you might only need to set the appropriate namespace or GML level in OL to fix this problem. I would check with that list first. Thanks, -Steve On 9/7/2012 1:08 AM, Eric wrote: Hello list, I am trying to save features to a PostGIS DB using tinyows. Saving geometries alone works fine, updating records works well, but as soon as I combine attributes and geometries, I get an error from tinyows indicating that the XML is not in the right format. I have noticed a difference between the 3 scenarios. For instance, when I save a geometry without attributes, I get the following: (this works fine) wfs:Insert feature:parcels xmlns:feature=http://www.tinyows.org/; feature:geom gml:MultiSurface xmlns:gml=http://www.opengis.net/gml; srsName=EPSG:3857 gml:surfaceMember gml:Polygon gml:exterior gml:LinearRing gml:posList-10752./gml:posList /gml:LinearRing /gml:exterior /gml:Polygon /gml:surfaceMember /gml:MultiSurface /feature:geom /feature:washco_parcels /wfs:Insert And, when I add attributes, I get the following: (generates an error to teh effect that feature:address1test is unexpected) wfs:Insert feature:parcels xmlns:feature=http://www.tinyows.org/; feature:geom gml:MultiSurface xmlns:gml=http://www.opengis.net/gml; srsName=EPSG:3857 gml:surfaceMember gml:Polygon gml:exterior gml:LinearRing gml:posList-10752./gml:posList /gml:LinearRing /gml:exterior /gml:Polygon /gml:surfaceMember /gml:MultiSurface /feature:geom *feature:address1test/feature:address1* /feature:washco_parcels /wfs:Insert Finally, if I do a simple UPDATE, I get the following: (works fine) wfs:Update xmlns:demo=http://www.tinyows.org/; typeName=demo:parcels wfs:Property wfs:Namegeom/wfs:Name wfs:Value gml:MultiSurface xmlns:gml=http://www.opengis.net/gml; srsName=EPSG:3857 gml:surfaceMember gml:Polygon gml:exterior gml:LinearRing gml:posList-10737./gml:posList /gml:LinearRing /gml:exterior /gml:Polygon /gml:surfaceMember /gml:MultiSurface /wfs:Value /wfs:Property *wfs:Property wfs:Nameobjectid/wfs:Name wfs:Value18785/wfs:Value /wfs:Property* ... The first difference is in the namespace used (feature vs wfs). Any reason why it is doing so? Another difference is in the way attributes are included: wfs:Property wfs:Nameobjectid/wfs:Name wfs:Value18785/wfs:Value /wfs:Property vs feature:address1test/feature:address1 The third example (using wfs:Property) seems to be the correct way to specify information in a WFS file. The first example works fine despite not using that format, because I suspect the GML schema is more flexible and since it does not have attributes that are not geometries, it is considered valid. So I tried turning off schema checking in the tinyows.xml file and the problem payload go through without issues. So this seem to indicate that some of the XSD used are strict and don't allow attributes to be defined like feature:address1test/feature:address1. So my question is how do I fix this best? 1. remove schema enforcing at the tinyows level. Couldn't this lead to potential security issues with the server? 2. Change the XSD files to allow both ways to define attributes. Wouldn't this go against the WFS standard? 3. Change the way OL generates the payload. Not sure where it does it or how to force it to use a different one. BTW, I am using OL 2.12 and Tinyows 1.0.0 thanks! Eric ___ 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 6.2.0 beta3 release
A beta3 Windows package is also available now for testing: http://www.maptools.org/ms4w/index.phtml?page=RELEASE_mapserver_ms4w3.x_dev-6.2.0.html -jeff -- Jeff McKenna MapServer Consulting and Training Services http://www.gatewaygeomatics.com/ ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
[mapserver-users] MODE=legendicon GROUP Layers
Hello list Wondering if anyone can help… We have been utilising the legendicon mode to create a custom legend in our application, however some recent work to try and speed up our WMS has reworked our mapfiles slightly, making use of GROUP LAYERs to group almost identical LAYERs together, the only difference in the LAYERs being MAX MINSCALEDENOM and the DATA request string to our PostGIS database – hitting a generalised version of the geometry at smaller scales. LAYER NAME 'lri_luc_main_gen_500k' GROUP 'lri_luc_main' DATA 'the_geom_gen_500k FROM data.lri USING UNIQUE gid USING srid=2193' INCLUDE 'includes/lri_luc_main_layer.inc' MINSCALEDENOM 251001 END LAYER NAME 'lri_luc_main_full' GROUP 'lri_luc_main' DATA 'the_geom FROM data.lri USING UNIQUE gid USING srid=2193' INCLUDE 'includes/lri_luc_main_layer.inc' MAXSCALEDENOM 251000 MINSCALEDENOM 15000 END The request for the legend icon is of the form: http://servername/cgi-bin/mapserv.fcgi?FORMAT=image/gifMAP=lri.mapMODE=legendiconICON=lri_luc_main,1 This worked fine before we started using GROUPs, however now we now encounter the error: mapserv(): Web application error. Icon layer=lri_luc_main not found in map file. Does the legendicon mode work with GROUP layers? If not, is there a way round this? Or alternatively, perhaps there is a better way to request a generalised version of the geometry that doesn't involve GROUP LAYERs? Any help or suggestions much appreciated. Many thanks 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
Re: [mapserver-users] MODE=legendicon GROUP Layers
All, I've gotten around this in the past by using dummy layers specifically for Legend Creation. You have complete control over the legend this way and can mix and match data sources however is required without needing to actually map the data out. It is more work overall, but if your MapFiles don't change often, it's usually a one time setup thing. I have a few map layers that have 7 or 8 different thresholds for display set MIN/MAXSCALEDENOMs and they all get a dummy layer that displays the same thing for all thresholds. Bobb From: mapserver-users-boun...@lists.osgeo.org [mailto:mapserver-users-boun...@lists.osgeo.org] On Behalf Of Andrew Cowie Sent: Friday, September 07, 2012 10:46 AM To: mapserver-users@lists.osgeo.org Subject: [mapserver-users] MODE=legendicon GROUP Layers Hello list Wondering if anyone can help... We have been utilising the legendicon mode to create a custom legend in our application, however some recent work to try and speed up our WMS has reworked our mapfiles slightly, making use of GROUP LAYERs to group almost identical LAYERs together, the only difference in the LAYERs being MAX MINSCALEDENOM and the DATA request string to our PostGIS database - hitting a generalised version of the geometry at smaller scales. LAYER NAME 'lri_luc_main_gen_500k' GROUP 'lri_luc_main' DATA 'the_geom_gen_500k FROM data.lri USING UNIQUE gid USING srid=2193' INCLUDE 'includes/lri_luc_main_layer.inc' MINSCALEDENOM 251001 END LAYER NAME 'lri_luc_main_full' GROUP 'lri_luc_main' DATA 'the_geom FROM data.lri USING UNIQUE gid USING srid=2193' INCLUDE 'includes/lri_luc_main_layer.inc' MAXSCALEDENOM 251000 MINSCALEDENOM 15000 END The request for the legend icon is of the form: http://servername/cgi-bin/mapserv.fcgi?FORMAT=image/gifMAP=lri.mapMODE=legendiconICON=lri_luc_main,1http://%3cservername%3e/cgi-bin/mapserv.fcgi?FORMAT=image/gifMAP=lri.mapMODE=legendiconICON=lri_luc_main,1 This worked fine before we started using GROUPs, however now we now encounter the error: mapserv(): Web application error. Icon layer=lri_luc_main not found in map file. Does the legendicon mode work with GROUP layers? If not, is there a way round this? Or alternatively, perhaps there is a better way to request a generalised version of the geometry that doesn't involve GROUP LAYERs? Any help or suggestions much appreciated. Many thanks 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
Re: [mapserver-users] MODE=legendicon GROUP Layers
Legend icon only works with layers. Groups are just too ambiguous to uniquely identify the class to be rendered. Groups don't have to be organized by scale ranges. Often they link related layers, for example a bunch of road feature types. I think It would be possible to add support to see if a group name can resolve to a single layer based on scale but that doesn't exist in the code at this point. Steve From: mapserver-users-boun...@lists.osgeo.org [mapserver-users-boun...@lists.osgeo.org] on behalf of Andrew Cowie [cow...@landcareresearch.co.nz] Sent: Friday, September 07, 2012 10:46 AM To: mapserver-users@lists.osgeo.org Subject: [mapserver-users] MODE=legendicon GROUP Layers Hello list Wondering if anyone can help… We have been utilising the legendicon mode to create a custom legend in our application, however some recent work to try and speed up our WMS has reworked our mapfiles slightly, making use of GROUP LAYERs to group almost identical LAYERs together, the only difference in the LAYERs being MAX MINSCALEDENOM and the DATA request string to our PostGIS database – hitting a generalised version of the geometry at smaller scales. LAYER NAME 'lri_luc_main_gen_500k' GROUP 'lri_luc_main' DATA 'the_geom_gen_500k FROM data.lri USING UNIQUE gid USING srid=2193' INCLUDE 'includes/lri_luc_main_layer.inc' MINSCALEDENOM 251001 END LAYER NAME 'lri_luc_main_full' GROUP 'lri_luc_main' DATA 'the_geom FROM data.lri USING UNIQUE gid USING srid=2193' INCLUDE 'includes/lri_luc_main_layer.inc' MAXSCALEDENOM 251000 MINSCALEDENOM 15000 END The request for the legend icon is of the form: http://servername/cgi-bin/mapserv.fcgi?FORMAT=image/gifMAP=lri.mapMODE=legendiconICON=lri_luc_main,1 This worked fine before we started using GROUPs, however now we now encounter the error: mapserv(): Web application error. Icon layer=lri_luc_main not found in map file. Does the legendicon mode work with GROUP layers? If not, is there a way round this? Or alternatively, perhaps there is a better way to request a generalised version of the geometry that doesn't involve GROUP LAYERs? Any help or suggestions much appreciated. Many thanks 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
Re: [mapserver-users] Fw: mapserver binary for CentOS?
Thanks a lot Peter for your kind help Extracting mapserv6.rpm, i got a 1.3 MB file. Now, i'm gonna test it on the server. Thanks again From: Peter Hopfgartner peter.hopfgart...@r3-gis.com To: mapserver-users@lists.osgeo.org Sent: Thursday, September 6, 2012 12:22 PM Subject: Re: [mapserver-users] Fw: mapserver binary for CentOS? On 09/05/2012 08:24 PM, Saka Royban wrote: Hi Saka Thanks a world for your helpful answer I wasn't aware that rpm could be extracted. Anyhow, in the link provided, i.e. http://elgis.argeo.org/repos/6/elgis-release-6-6_0.noarch.rpm, i can get a 11 kb file when i download above-mentioned link. This is the configuration file for enabling the whole ELGIS repo. If you're on a 64 bit machine, you propbably want http://elgis.argeo.org/repos/6/elgis/x86_64/mapserver5-5.6.7-3.el6.x86_64.rpm or http://elgis.argeo.org/repos/6/elgis/x86_64/mapserver-6.0.1-3.el6.x86_64.rpm. mapserve alone works for sure with MapServer 5.6, maybe also for MapServer 6. Regards, Peter It seems there is no mapsrev file in it. Could you guide me where can i find the whole package? Also, just mapserv is sufficient to run a simple web mapping application? no other dll? Thanks in advance From: Peter Hopfgartner peter.hopfgart...@r3-gis.com To: mapserver-users@lists.osgeo.org Sent: Wednesday, September 5, 2012 6:05 PM Subject: Re: [mapserver-users] Fw: mapserver binary for CentOS? Extracting the executable file mapserv from one of the above mentioned rpms and placing it in cgi-bin should give you a working MapServer CGI installation. Peter On 09/04/2012 04:20 PM, Saka Royban wrote: - Forwarded Message - From: Saka Royban sakaroy...@yahoo.com To: Prabu Raja prab.r...@gmail.com Sent: Tuesday, September 4, 2012 6:49 PM Subject: Re: [mapserver-users] mapserver binary for CentOS? Thanks for your help I contacted host admin and he told me they don't allow ssh access because their host is of shared (!) one. I was thinking maybe there is a way to just copy the files into cgi-bin folder, as it is for mapserv.exe and its dependencies (dlls) in MS4W package. However, it seems if i want to use MapServer in CGI mode i have to use a Windows server. Otherwise, i must switch to MapScript which is not recommended for all applications. If there is a way to use CGI Mapserver in this case, please inform me. Regards From: Prabu Raja prab.r...@gmail.com To: Peter Hopfgartner peter.hopfgart...@r3-gis.com Cc: mapserver-users@lists.osgeo.org Sent: Tuesday, September 4, 2012 12:12 PM Subject: Re: [mapserver-users] mapserver binary for CentOS? Find below the steps, which I followed to install mapserver on CentOS 6 64 bit sudo rpm -Uvh http://elgis.argeo.org/repos/6/elgis-release-6-6_0.noarch.rpm yum install mapserver sudo rpm -Uvh http://dl.fedoraproject.org/pub/epel/6/x86_64/cfitsio-3.240-3.el6.x86_64.rpm sudo rpm -Uvh http://dl.fedoraproject.org/pub/epel/6/x86_64/fribidi-0.19.2-2.el6.x86_64.rpm sudo rpm -Uvh http://dl.fedoraproject.org/pub/epel/6/x86_64/libdap-3.11.0-1.el6.x86_64.rpm sudo rpm -Uvh http://dl.fedoraproject.org/pub/epel/6/x86_64/fcgi-2.4.0-10.el6.x86_64.rpm sudo rpm -Uvh http://dl.fedoraproject.org/pub/epel/6/x86_64/librx-1.5-14.el6.x86_64.rpm sudo rpm -Uvh http://dl.fedoraproject.org/pub/epel/6/x86_64/libspatialite-2.4.0-0.6.RC4.el6.x86_64.rpm sudo rpm -Uvh http://mirror.centos.org/centos/6/os/x86_64/Packages/libgfortran-4.4.6-4.el6.x86_64.rpm sudo rpm -Uvh http://dl.fedoraproject.org/pub/epel/6/x86_64/hdf5-1.8.5.patch1-7.el6.x86_64.rpm sudo rpm -Uvh http://dl.fedoraproject.org/pub/epel/6/x86_64/netcdf-4.1.1-3.el6.2.x86_64.rpm sudo rpm -Uvh http://mirror.centos.org/centos/6/os/x86_64/Packages/expat-2.0.1-11.el6_2.x86_64.rpm sudo rpm -Uvh http://dl.fedoraproject.org/pub/epel/6/x86_64/ogdi-3.2.0-0.14.beta2.el6.x86_64.rpm yum install mapserver cp /usr/libexec/mapserv /var/www/cgi-bin/ On Tue, Sep 4, 2012 at 12:47 PM, Peter Hopfgartner peter.hopfgart...@r3-gis.com wrote: On 09/04/2012 08:33 AM, Saka Royban wrote: Hi guys I'm a newbie to mapserver and i've been using MS4W for a while. Now, i'm gonna use MapServer CGI in my website. So, I asked my host admin of the version of Linux and he replied me that CentOS is running on the server. Searching internet, unfortunately, i didn't find mapserver binary for CentOS. I just found some
Re: [mapserver-users] [TINYOWS] 'Looser' XSD?
Indeed, it appears it should be straightforward to resolve this from the OL end. I have just summoned the help of the OpenLayers-User mailing list gurus about this. Refer to the thread over there for further information. Thanks, Eric On 09/07/2012 11:57 AM, Stephen Woodbridge wrote: Eric, Thanks for reporting this because I have to dive into doing the same shortly. I would suggest that OpenLayers is where the problem is because it is generating the XML that is going to TinyOWS. I have not looked into this specific issue but in general OL is pretty flexible and you might only need to set the appropriate namespace or GML level in OL to fix this problem. I would check with that list first. Thanks, -Steve On 9/7/2012 1:08 AM, Eric wrote: Hello list, I am trying to save features to a PostGIS DB using tinyows. Saving geometries alone works fine, updating records works well, but as soon as I combine attributes and geometries, I get an error from tinyows indicating that the XML is not in the right format. I have noticed a difference between the 3 scenarios. For instance, when I save a geometry without attributes, I get the following: (this works fine) wfs:Insert feature:parcels xmlns:feature=http://www.tinyows.org/; feature:geom gml:MultiSurface xmlns:gml=http://www.opengis.net/gml; srsName=EPSG:3857 gml:surfaceMember gml:Polygon gml:exterior gml:LinearRing gml:posList-10752./gml:posList /gml:LinearRing /gml:exterior /gml:Polygon /gml:surfaceMember /gml:MultiSurface /feature:geom /feature:washco_parcels /wfs:Insert And, when I add attributes, I get the following: (generates an error to teh effect that feature:address1test is unexpected) wfs:Insert feature:parcels xmlns:feature=http://www.tinyows.org/; feature:geom gml:MultiSurface xmlns:gml=http://www.opengis.net/gml; srsName=EPSG:3857 gml:surfaceMember gml:Polygon gml:exterior gml:LinearRing gml:posList-10752./gml:posList /gml:LinearRing /gml:exterior /gml:Polygon /gml:surfaceMember /gml:MultiSurface /feature:geom *feature:address1test/feature:address1* /feature:washco_parcels /wfs:Insert Finally, if I do a simple UPDATE, I get the following: (works fine) wfs:Update xmlns:demo=http://www.tinyows.org/; typeName=demo:parcels wfs:Property wfs:Namegeom/wfs:Name wfs:Value gml:MultiSurface xmlns:gml=http://www.opengis.net/gml; srsName=EPSG:3857 gml:surfaceMember gml:Polygon gml:exterior gml:LinearRing gml:posList-10737./gml:posList /gml:LinearRing /gml:exterior /gml:Polygon /gml:surfaceMember /gml:MultiSurface /wfs:Value /wfs:Property *wfs:Property wfs:Nameobjectid/wfs:Name wfs:Value18785/wfs:Value /wfs:Property* ... The first difference is in the namespace used (feature vs wfs). Any reason why it is doing so? Another difference is in the way attributes are included: wfs:Property wfs:Nameobjectid/wfs:Name wfs:Value18785/wfs:Value /wfs:Property vs feature:address1test/feature:address1 The third example (using wfs:Property) seems to be the correct way to specify information in a WFS file. The first example works fine despite not using that format, because I suspect the GML schema is more flexible and since it does not have attributes that are not geometries, it is considered valid. So I tried turning off schema checking in the tinyows.xml file and the problem payload go through without issues. So this seem to indicate that some of the XSD used are strict and don't allow attributes to be defined like feature:address1test/feature:address1. So my question is how do I fix this best? 1. remove schema enforcing at the tinyows level. Couldn't this lead to potential security issues with the server? 2. Change the XSD files to allow both ways to define attributes. Wouldn't this go against the WFS standard? 3. Change the way OL generates the payload. Not sure where it does it or how to force it to use a different one. BTW, I am using OL 2.12 and Tinyows 1.0.0 thanks! Eric ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users