Re: [mapserver-users] LABEL_NO_CLIP seems not working in mapserver 5.4.1
On 1/7/09 1:02 AM, Rodriguez, Heraldo wrote: Hi everyone, We have just upgraded from mapserver 5.2.0 to 5.4.1 Our application use OpenLayers, Tilecache with metatiles on, and postgis. The label positioning in polygons has improved a lot but now we are experiencing label duplication on metatile boundaries. Rodriguez, I can report having a similar problem, but have noticed that seeems to be related to use of some of the other settings in the LABEL section. I don't recall the details exactly unfortunately, but if you are trying to reproduce a test case then try different values of MINDISTANCE and POSITION in particular (including AUTO and not present). I know something I did at some point was causing LABEL_NO_CLIP to not function, but I don't recall what. Regards, David ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
Re: [mapserver-users] getfeatureinfo problems
On 26/6/09 11:10 PM, Bart van den Eijnden (OSGIS) wrote: Mapserver needs an integer type column for the USING UNIQUE clause, not a string column. That won't work. Actually, no it doesn't require an integer type column for the UNIQUE clause. I have used text fields in the past with mapserver 5.x and can confirm that it does indeed work. Mind you, some other cartographic software such as QGIS does insist on int4 fields for PostGIS layers, but not mapserver. Regards, David ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
Re: [mapserver-users] Contour maps
On Fri, 19 Jun 2009 16:57:48 +1000, padma priya wrote: Can anyone tell me if it is possible to draw contour maps using mapserver. Yep. In general, contours are pretty simple features to draw compared with most other uses. Regards, David ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
Re: [mapserver-users] LABEL problem using CGI...
On Wed, 17 Jun 2009 22:31:50 +1000, Paul james wrote: You are right... It is Tiled (using OL)... In that case, How can I "fix" that effect? This should be in an FAQ :-) It has been answered at least 4 times here in the last couple months... Add PROCESSING "LABEL_NO_CLIP=ON" to your LAYER. YYMV, but I've noticed a side-effect of using this that I've been unable to quantify. However it does stop the repetition of labels at the boundaries so it solves your problem. For me it seems to create another problem - clipping of labels at (meta) tile boundaries regardless what I'm setting LABELCACHE_MAP_EDGE_BUFFER to in the mapscript that renders the tiles. I made my metatiles larger to reduce this effect but have been meaning to try again with PARTIALS TRUE and not setting LABELCACHE_MAP_EDGE_BUFFER, which "in theory" should work. Regards, David ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
Re: [mapserver-users] AGG vs GD rendering shows no difference
On Tue, 16 Jun 2009 20:58:22 +1000, Adrian Popa wrote: Thank you for your suggestion. I have corrected the mapfile ( added IMAGETYPE 'AGG'), however, when I try to load the map, I get a 500 web server error: [Tue Jun 16 13:43:25 2009] [error] [client 80.97.196.77] Premature end of script headers: mapserv, referer: http://terra/msmap/testmap.pl It seems to me that mapserv dies and doesn't output any headers back. How could I find out the error message? The first place to check is the web server log. HTTP errors (and 500 is one) are usually visible there. I'm guessing that mapserver has a problem parsing the map file and you can usually discover the line it is having a problem with in the web server's log. The second level of logging is: CONFIG "MS_ERRORFILE" "path_to_mapserver.log" which provides more detail, but you usually have to configure DEBUG ON (or DEBUG 1-5) as well for this to be useful. Regards, David ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
Re: [mapserver-users] R
On Fri, 12 Jun 2009 16:03:41 +1000, Thomas Bonfort wrote: you can have a look at how bridges are done on the wiki page that accompanies the map on the mapserver.org frontpage (there's a bridge right south of the sydney exhibition center when you zoom in to the closest level, not sure why some don't show up on motorways). That, coupled with start/end geotransform should get quite close to what you want. Thanks Thomas, The geomtransform is ok on straight stretches but otherwise I'll consider it a work in progress - it generally looks poor on curved stretches of road. :-) I may well have to do with the thicker outlines similar to the demo map or make them smaller or something. Since the wiki is pretty much broken now (moved, unchanged base href and so on), I'm assuming the outline was done with a filled "bar" symbol with negative gap under the road line since it looks similar to the solution I eventually wound up with to get the borders without closing the ends of the segments. Regards, David ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
Re: [mapserver-users] R
Greetings all, On Thu, 11 Jun 2009 16:37:11 +1000, I wrote: One last problem I'm scratching my head on. I want to highlight bridges by using a thick border on each side of the road (and if possible an angular section at each end of the border as often seen in traditional road maps). Using an outline won't work for this as outlines close the end points of the line segment with a border and I would prefer them to blend directly with the road to which they belong. I'm thinking a symbol would be needed but not sure how to approach it. Like (view this with a fixed width font): \/__ __ / \ (imagine lines joining \/ being thick) How to achieve such a border? Following up on my own post again... SYMBOL does not appear to be well suited (unless I'm missing something) but I've come close with GEOMTRANSFORM, however only at the start and end of a line segment using what are essentially reversed arrowheads. I read the RFC in the mapserver 5.4 documentation and it talks about plans to extend functionality of GEOMTRANSFORM (which it incorrectly refers to as GEOTRANSFORM and GEOMETRYTRANSFORM, incidentally), and I *think* either the "distance" or "buffer" might achieve most of what I need with ANGLE AUTO - to draw a parallel line segment. However neither appears to be implemented yet. Regards, David ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
Re: [mapserver-users] R
On Thu, 11 Jun 2009 15:23:27 +1000, I wrote: If you're already pulling from a view, you might want to consider three views: interstates highways local roads (or how ever you layer it) Yep, that is what I was originally doing, but I broke it by purposely combining all road layers to make joins between roads with outlines looking much better (which Thomas' reply referred to). As part of that change, and in order to improve visual effect, I decided instead to use ground relationship to split roads into three layers, resulting in tunnels under surface roads under bridges. I figured I could tidy up the side effects if I could just get objects within the layer rendering in order of road importance. :-) I will try playing with ordering in the DATA property as Thomas suggests. This works perfectly, so now I'm 95% there. :-) One last problem I'm scratching my head on. I want to highlight bridges by using a thick border on each side of the road (and if possible an angular section at each end of the border as often seen in traditional road maps). Using an outline won't work for this as outlines close the end points of the line segment with a border and I would prefer them to blend directly with the road to which they belong. I'm thinking a symbol would be needed but not sure how to approach it. Like (view this with a fixed width font): \/__ __ / \ (imagine lines joining \/ being thick) How to achieve such a border? Regards, David ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
Re: [mapserver-users] cartographic lines
On Thu, 11 Jun 2009 15:42:03 +1000, I wrote: On Thu, 11 Jun 2009 14:58:47 +1000, Thomas Bonfort wrote: a variation of this a couple of weeks back I kept getting the mapserver message: "Cartoline drawing is deprecated with AGG", so I figured that wasn't the correct way to do it. :-) Just to follow this up... yes, I do get the error message in the $MS_ERRORFILE but it renders correctly regardless. Is this message something I should be worried about? yes, this means that some of your features aren't being drawn. you must be having a layer that still references a cartoline symbol. Hmm, I'm still using symbols for rendering several features including train lines and tracks/trails. What does mapserver consider a "cartoline symbol"? A single point elipse or something similar? To answer my own question, ones of "TYPE CARTOLINE" of course. :-) Now found and fixed it, thanks. Regards, David ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
Re: [mapserver-users] Rendering order of objects in a layer
On Thu, 11 Jun 2009 15:42:10 +1000, Thomas Bonfort wrote: I will try playing with ordering in the DATA property as Thomas suggests. I wasn't aware it would handle "order by" (but only too aware that while being "sql like" it isn't exactly sql :-)). it is *exactly sql* : that query string is being sent to your database, so you can do joins, groupby's, etc... Ah, its a subquery... I turned up debugging for other reasons and see now how it is transformed. Thanks again, David ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
Re: [mapserver-users] cartographic lines
On Thu, 11 Jun 2009 14:58:47 +1000, Thomas Bonfort wrote: a variation of this a couple of weeks back I kept getting the mapserver message: "Cartoline drawing is deprecated with AGG", so I figured that wasn't the correct way to do it. :-) Just to follow this up... yes, I do get the error message in the $MS_ERRORFILE but it renders correctly regardless. Is this message something I should be worried about? yes, this means that some of your features aren't being drawn. you must be having a layer that still references a cartoline symbol. Hmm, I'm still using symbols for rendering several features including train lines and tracks/trails. What does mapserver consider a "cartoline symbol"? A single point elipse or something similar? Assuming it is a specific type of symbol in the symbolset, I could try removing any that qualify and see what breaks... Thanks, David ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
Re: [mapserver-users] Rendering order of objects in a layer
On Thu, 11 Jun 2009 02:08:54 +1000, Dan Little wrote: If you're already pulling from a view, you might want to consider three views: interstates highways local roads (or how ever you layer it) Yep, that is what I was originally doing, but I broke it by purposely combining all road layers to make joins between roads with outlines looking much better (which Thomas' reply referred to). As part of that change, and in order to improve visual effect, I decided instead to use ground relationship to split roads into three layers, resulting in tunnels under surface roads under bridges. I figured I could tidy up the side effects if I could just get objects within the layer rendering in order of road importance. :-) I will try playing with ordering in the DATA property as Thomas suggests. I wasn't aware it would handle "order by" (but only too aware that while being "sql like" it isn't exactly sql :-)). Thanks to both of you for the response, Regards, David ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
Re: [mapserver-users] cartographic lines
On Tue, 09 Jun 2009 16:21:32 +1000, David Nugent wrote: On Tue, 09 Jun 2009 14:06:09 +1000, Rahkonen Jukka wrote: Thomas Bonfort seems to do it this way: CLASS EXPRESSION "primary" STYLE WIDTH 14 OUTLINECOLOR "#B7AC9A" OUTLINEWIDTH 1 MINWIDTH 1.5 MAXWIDTH 12 END STYLE WIDTH 14 COLOR "#7A" MINWIDTH 1.5 MAXWIDTH 12 END END Thanks, I'll give it a shot and post the results. IIRC though when I tried a variation of this a couple of weeks back I kept getting the mapserver message: "Cartoline drawing is deprecated with AGG", so I figured that wasn't the correct way to do it. :-) Just to follow this up... yes, I do get the error message in the $MS_ERRORFILE but it renders correctly regardless. Is this message something I should be worried about? I have also mostly resolved the background problem I mentioned in my previous post. I'm not sure why but it simply stopped happening when I changed all colour specifications to quoted hexadecimal instead of individual R G B values. Just to be sure it wasn't a quirk I played with RGBA rendering and different values of IMAGECOLOR and sure enough the background changed accordingly. It is still rendering black outside of the EXTENT defined in the mapfile however (which it doesn't when rendering RGB), but I don't consider that a problem. Regards, David ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
[mapserver-users] Rendering order of objects in a layer
Hello all, Is there any way in which the rendering order of objects in a layer can be determined by mapserver? For example, I want to ensure that major roads (highways, arterials) are rendered after local/minor/unimproved roads when all are rendered as a single layer; which tends to make joins between them look much nicer if the major roads are rendered first. This is for vector data coming from postgis, which ultimately results in executing the query on a view. I hesitate to fiddle with forcing index use here as I would think the gist queries on the geometry field would come into play. However, the results in the query seem to drop by chance regardless if the order of CLASS sections in the mapfile (which is what I would expect). Regards, David ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
Re: [mapserver-users] cartographic lines
On Tue, 09 Jun 2009 14:06:09 +1000, Rahkonen Jukka wrote: Hi, Thomas Bonfort seems to do it this way: CLASS EXPRESSION "primary" STYLE WIDTH 14 OUTLINECOLOR "#B7AC9A" OUTLINEWIDTH 1 MINWIDTH 1.5 MAXWIDTH 12 END STYLE WIDTH 14 COLOR "#7A" MINWIDTH 1.5 MAXWIDTH 12 END END Thanks, I'll give it a shot and post the results. IIRC though when I tried a variation of this a couple of weeks back I kept getting the mapserver message: "Cartoline drawing is deprecated with AGG", so I figured that wasn't the correct way to do it. :-) And I had not realised that *COLOR directives accepted a hexadecimal value as an alternative to R G B values! That will make things easier. As to the other implied question in my OP - since I've discovered that rendering with transparency on fixes a number of artifacts - so does anyone know of a solution for setting background when rendering RGBA tiles since IMAGECOLOR no longer seems to work? Note that since I am rendering a flat tile which includes a background I'm using RGB rather than RGBA and I suspect this may affect rendering of OPACITY in layers. However I can't seem to find the magic that will render a background colour other than black (and yes, I'm using IMAGECOLOR in the MAP section, but it seems to have no effect when rendering with transparency). Regards, David ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
[mapserver-users] cartographic lines
Hello all, i've come across a cosmetic issue I'm trying to solve and looking for advice. Specifically this relates to drawing street/road lines, although I guess it relates to any type of cartographic line. I'm using mapserver 5.4.1 using AGG renderer with quantize enabled: OUTPUTFORMAT NAME'AGG_Q' DRIVER AGG/PNG IMAGEMODE RGB # FORMATOPTION"QUANTIZE_FORCE=ON" FORMATOPTION"QUANTIZE_NEW=ON" FORMATOPTION"QUANTIZE_DITHER=OFF" FORMATOPTION"QUANTIZE_COLORS=256" END Mapserver was built with --with-experimental-png (which does indeed resolve the colour variations between tiles that I reported earlier). I'm drawing street layers with elipses, but I'm now wondering if that is the best way to achieve the result, being an inner colour with a border, viz: STYLE COLOR [border_color] SYMBOL "road_line" SIZE $x END STYLE COLOR [surface_colour] SYMBOL "road_line" SIZE $x-2 END where road_line is a simple SYMBOL elipse. The problem I'm seeing is two-fold. Firstly, the ends are rounded, which is not desirable where roads of different classes (defined in different layers) join. I think this can be solved by drawing all streets in the same layer and using different classes with EXPRESSION statements, but my brief experiment with this resulted in a large detriment effect on rendering speed. If it matters, the layers are in PostGIS (and appropriately indexed). So my question is, is there a better or at least an alternative way of drawing roads with borders which does not result in this problem? The second problem is that I'm trying to add OPACITY to some layers, such as tunnels, so that they either appear underneath other objects or at least allow other objects to show through. However - and it may be related to the use of symbols to draw the roads - this results rendering as shown in the attached file, with elipses of a different shade appearing where objects "intersect". Can this be avoided (perhaps by using a different method for drawing road lines)? Note that since I am rendering a flat tile which includes a background I'm using RGB rather than RGBA and I suspect this may affect rendering of OPACITY in layers. However I can't seem to find the magic that will render a background colour other than black (and yes, I'm using IMAGECOLOR in the MAP section, but it seems to have no effect when rendering with transparency). Best regards, David <>___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
[mapserver-users] php mapscript feature request
A quick feature request. :-) I've just noticed $imageObj.getBytes() in the perl mapscript implementation and was wondering if equivalent functionality could be implemented for mapscript/php. This is very useful for tiling engines that split up a mapserver produced graphic into tiles (rather than producing smaller tiles individually) without having to write it to disk and reread just to get an in-memory copy of the image. Regards, David ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
[mapserver-users] Label opacity
Hello all, While OPACITY [1-100] works fine for drawing features and symbols (ie. anything described in a STYLE section within the layer), it does not seem to affect labels. OPACITY does not appear to be a valid keyword in a LABEL section, so is there a way of achieving less than 100% opaque labels? Thanks, David ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
Re: [mapserver-users] Mapserver rendering with 24 bit colour
On 06/05/2009, at 1:52 PM, David Nugent wrote: Once I completed upgrading to mapserver 5.4, I decided I'd give the new AGG renderer a try. ~ However, as a by-product of changing renderer, the metatiles produced by mapserver differ slightly in colour. Some agree exactly to the RBG colours I am providing, others are rendered with slight variations, and when viewed on the web it becomes fairly obvious where the meta tile borders are. This is to follow up on my own question to which I received no response either on the list or otherwise in case anyone else runs into the same or a similar problem. I finally found the problem in that the php mapscript had a bug, and that "AGG_Q" (AGG with quantize enabled) was being selected regardless that I was trying to tell it to do it differently. Once I correctly set it to AGG without quantize, the colour variation between tiles disappeared and all is well. One interesting aspect of this is that the average file size did not increase significantly when dropping quantize although in general the tiles rendered using AGG are around 40-50% larger than PNG8. Regards, -- David Nugent (dav...@datalinktech.com.au) Software Engineer datalink technologies pty ltd Mobile GPS/GPRS business process solutions http://www.datalinktech.com.au/ PGP.sig Description: This is a digitally signed message part ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
[mapserver-users] Mapserver rendering with 24 bit colour
Greetings all, Once I completed upgrading to mapserver 5.4, I decided I'd give the new AGG renderer a try. To date I have been using the GD renderer in 8 bit color mode. One problem I had with it the renderer, and my main motivation to use the AGG renderer (apart from what appears to be an overall improvement in appearance) was that any layer containing "ANGLE FOLLOW" within a class label definition caused php/mapscript to crash rendering meta tiles (for ka-map, if that matters). The AGG renderer solved that problem immediately and it works flawlessly in that respect. However, as a by-product of changing renderer, the metatiles produced by mapserver differ slightly in colour. Some agree exactly to the RBG colours I am providing, others are rendered with slight variations, and when viewed on the web it becomes fairly obvious where the meta tile borders are. I have tried both OUTPUTFORMAT NAME'AGG_Q' DRIVER AGG/PNG IMAGEMODE RGB FORMATOPTION "QUANTIZE_FORCE=ON" FORMATOPTION "QUANTIZE_DITHER=OFF" FORMATOPTION "QUANTIZE_COLORS=256" END and OUTPUTFORMAT NAME'AGG' DRIVER AGG/PNG IMAGEMODE RGB END but both produce the same results. I have even tried fiddling with the FORMATOPTIONs in the AGG_Q block to no effect. I've double-checked the mapscript used to render the tiles to make sure that the correct output format is being selected. Is there a known solution to this? How can I force all tiles produced to use the exact same colour settings? I would have thought the quantize option would resove it, although obviously this would have a slight detrimental side-effect for anti-aliasing. My map file does include various "ANTIALIAS" options (which the document states are ignored in AGG mode) so I can fall back to GD rendering should I ever get "ANGLE FOLLOW" working again. Regards, -- David Nugent (dav...@datalinktech.com.au) Software Engineer datalink technologies pty ltd Mobile GPS/GPRS business process solutions http://www.datalinktech.com.au/ PGP.sig Description: This is a digitally signed message part ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
Re: [mapserver-users] Mapserver 5.4 & SYMBOLSET
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 It starts (and ends) like this: SYMBOLSET SYMBOL NAME"point" TYPEELLIPSE POINTS 1 1 END FILLED TRUE END SYMBOL NAME"dashed" TYPEELLIPSE POINTS 1 1 END FILLED TRUE STYLE 8 6 8 6 END END ... END Regards, David On 30/04/2009, at 1:13 PM, Steve Lime wrote: Can you share your symbolset file? I've not had an issue with that change. Steve David Nugent 04/29/09 9:54 PM >>> Hello all, I've recently upgraded to mapserver 5.4 and hit a problem with SYMBOLSET. It seems that a file containing symbols referenced from the .map file must now contain a SYMBOLSET keyword at the start (and presumably end with END?). I made this change, but the parser still complains with the message "First token must be SYMBOLSET". Not really wanting to waste time on debugging the lex code, I simply removed the check that emits this error from mapsymbol.c and all works as expected. Obviously there is a deeper problem, whether it be the logic in that statement (which appears to be correct as far as I can tell) or the lex parser itself. I'm just wondering if anyone else had hit the same problem. -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.8 (Darwin) iEYEARECAAYFAkn5IX4ACgkQgyBtWyGDJqVRXACfZnjgfrOnb7nQmKTF99gjA4WX bMEAn28/+mRNOk60rbeTX4BbQUBF1q4L =vbTf -END PGP SIGNATURE- ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
[mapserver-users] Mapserver 5.4 & SYMBOLSET
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hello all, I've recently upgraded to mapserver 5.4 and hit a problem with SYMBOLSET. It seems that a file containing symbols referenced from the .map file must now contain a SYMBOLSET keyword at the start (and presumably end with END?). I made this change, but the parser still complains with the message "First token must be SYMBOLSET". Not really wanting to waste time on debugging the lex code, I simply removed the check that emits this error from mapsymbol.c and all works as expected. Obviously there is a deeper problem, whether it be the logic in that statement (which appears to be correct as far as I can tell) or the lex parser itself. I'm just wondering if anyone else had hit the same problem. Regards, David -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.8 (Darwin) iEYEARECAAYFAkn5EkgACgkQgyBtWyGDJqUwLwCcDdlZ1p/DUyTJ8/A9aOU8U6p1 c24AnjMwiSaNwPPQhDay/V3pTu1OnDtQ =pUQC -END PGP SIGNATURE- ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users