[mapserver-users] Legend and labels
Hello I have another question about the labels of the legend. I haven't the same legend if I use TRANSPARENT TRUE or not in the OUTPUTFORMAT block. It seems that the antialising option doesn't work for the legend with Transparent Option. And I want to use transparency for the general map to stack some maps from Mapserver in a document. Here is my Outputformat: OUTPUTFORMAT NAME png MIMETYPE image/png DRIVER GD/PNG EXTENSION png IMAGEMODE RGBA TRANSPARENT FALSE FORMATOPTION INTERLACE=OFF END and my legend block : LEGEND IMAGECOLOR 255 255 255 KEYSIZE 20 10 KEYSPACING 5 2 LABEL ANGLE 0.00 ANTIALIAS TRUE FONT Vera-sans MAXSIZE 10 MINSIZE 10 SIZE 10 TYPE TRUETYPE BUFFER 0 COLOR 0 0 0 FORCE FALSE MINDISTANCE -1 MINFEATURESIZE -1 OFFSET 0 0 PARTIALS TRUE POSITION AUTO END OUTLINECOLOR 0 0 0 POSITION AUTO STATUS ON END You can see an example enclosed in the mail. Thanks again -- Sylvain Perrinel Ministère de l'Agriculture SG/SM/SDSI/CERIT Département d'Information Géographique B.P. 12668 - 31326 Castanet-Tolosan Cedex Tel : 05 61 28 92 76 Web: http://sigsiti.national.agri http://bdnt.national.agri http://georepertoire.national.agri http://sig.geoweb.auzeville.agri inline: 47e139e9_6041_8.pnginline: 47e12269_706c_a.png___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
Re: [mapserver-users] GRID labeling, OK, where are the MapServer GRID guru's??
Brent, Thanks for these notes, exactly the type of stuff we're looking for. I do remember your thread on the graticules BTW. :c)This is also something of interest to me. The big picture plan is to allow a user to ultimately plot/print a USNG encoded map per their specification. There are certainly a lot of other uses for the same sort of labeling (that I can also use). I'm trying to organize the adds to MapServer so they are reuseable, or at least set up things so the different types of labeling are possible with as little additional coding effort as possible. Your method of doing the margins from within the MapFile is an interesting approach. Some general questions to you (and anyone else interested in commenting): * Do you see a need at all to display the grid labels along only two edges, or even in just two axis but just once, along the center of the page for example, both vertically and horizontally. * Do you see a need to have a variable available for setting the outside buffer zone area, in other words, for setting how far in (or possibly out) from the edge of the map, the labels are printed? * Do you see a need to have the GRID displayed as a TICed grid instead of continuous lines, I'm not sure how to actually do this at the moment. Might be a symbol placement sort of thing, with rotation instead of line drawing. This is further down the list for me at this point though. * Lastly, do you see a need for an entirely different approach to some of these labeling/printing aspects, I've been toying with the idea (for a couple of years now) of building a completely separate service that can still be complimentary to MapServer and be programmed against in the same manner from the client side, for templating a print function. The basic idea would be to build a system where there is a layout canvas on the client end, that can use URL resources as print objects, and allows the user to layout where everything goes on a page, which most likely is some sort of template for printing in pre-defined ways. Mapserver would handle all the inclusive map grid line markup, but the real detailed labeling could happen with this separate facility, specifically for printing. In the end, I think this labeling and grid stuff may push me over the edge as far as trying out some stuff of our own. I would imagine that we would start with some of the MapServ code to experiment with. I think our end result might be too heavy to include in mapserv in general. This GRID stuff though, has elements in both the direct mapping as well as Print only aspects. I've thought a lot about what should be considered a dynamic, online navigation tool, vs what should be considered a print setup tool. Many pieces cross the line, and that's where it gets murky on how to start. bobb Brent Fraser wrote: Bob, Good on you for pursuing this! While I think the current grid object satisfies most of mapserver implementors' needs, there is room for improvement. The ultimate would be a system that can produce reference system labels like those found on topos (some are very similar to your NG labels). First, I see there is still a typo in mapgraticule.c, line 347 (current SVN) should be dStartY = (pInfo-pboundinglines[0].point[1].y - pInfo-pboundinglines[0].point[0].y) * dDeltaX + pInfo-pboundinglines[0].point[0].y; (note the last array index value of 0 not 1) Second, (from my old notes on experimenting with labeling in v4.3) I changed 661 thru 682 to: switch( ePosition ) { case posBottom: pShape-line-point[1].y = pLayer-map-height; pShape-line-point[0].y = pLayer-map-height - ( fabs(rectLabel.maxx - rectLabel.minx) + 15 ); /* rectLabel is based on non-rotated text (x is along the width of text) */ break; case posTop: pShape-line-point[1].y = 0; pShape-line-point[0].y = fabs(rectLabel.maxx - rectLabel.minx) + 15; break; case posLeft: pShape-line-point[1].x = 0; pShape-line-point[0].x = fabs(rectLabel.maxx - rectLabel.minx) + 15; break; case posRight: pShape-line-point[1].x = pLayer-map-width; pShape-line-point[0].x = pLayer-map-width - ( fabs(rectLabel.maxx - rectLabel.minx) + 15 ); break; } And regarding labeling outside the map, I arranged my map file to draw: 1. all the usual raster and vector layers 2. a grid layer 3. a margin layer of blanking polygons (see below) 4. a grid layer of type annotation so no lines are drawn Here's part of my map file (for version 4.3 so no telling what will happen with v5.x): SIZE 800 600 : : LAYER NAME Margin TRANSFORM FALSE STATUS DEFAULT TYPE POLYGON CLASS COLOR 255 255 255 END FEATURE POINTS 0 0 0 600 70 600 70 0 0 0 END POINTS 70 0 70 70 800 70 800 0 70 0 END POINTS 70 600 800 600 800 530 70 530 70 600 END POINTS 730 70 730 530 800 530 800 70 730 70 END END END
Re: [mapserver-users] GRID labeling, OK, where are the MapServerGRID guru's??
Bob, See my comments below... Brent Fraser GeoAnalytic Inc. Calgary, Alberta - Original Message - From: Bob Basques [EMAIL PROTECTED] Cc: mapserver-users@lists.osgeo.org Sent: Wednesday, March 19, 2008 8:56 AM Subject: Re: [mapserver-users] GRID labeling, OK, where are the MapServerGRID guru's?? Brent, Thanks for these notes, exactly the type of stuff we're looking for. I do remember your thread on the graticules BTW. :c) This is also something of interest to me. The big picture plan is to allow a user to ultimately plot/print a USNG encoded map per their specification. There will be a few speed bumps with using Mapserver: - memory limitation due to mapserver creating at least two copies of the output graphic in memory ( 34in wide x 44in long at 600 dpi is a huge raster!). That may have changed with the adoption of AGG, but I haven't looked into it. - PDF output in mapserver was (still is?) limited to 256 colors - getting properly scaled output required careful calculation of extents/graphics size. - and of course the grid/graticule issues There are certainly a lot of other uses for the same sort of labeling (that I can also use). I'm trying to organize the adds to MapServer so they are reuseable, or at least set up things so the different types of labeling are possible with as little additional coding effort as possible. That may be tough. It depends on how picky you are on your label placement. If your map will not be rotated (via the ANGLE setting in the map file), and you will only label projected coordinates (not the lat/lon graticule), it might not be too bad. Your method of doing the margins from within the MapFile is an interesting approach. It's a hack, really only useful to encourage enhancement ideas for cartographic grid/grat features. Some general questions to you (and anyone else interested in commenting): * Do you see a need at all to display the grid labels along only two edges, or even in just two axis but just once, along the center of the page for example, both vertically and horizontally. Personally I don't have the need, but it could be useful for others... * Do you see a need to have a variable available for setting the outside buffer zone area, in other words, for setting how far in (or possibly out) from the edge of the map, the labels are printed? Absolutely! Besides the need to make it visually pleasing, I may want to label the map once with lat/lon labels close to the neat line, then label again with UTM coordinates sightly farther away from the neat line to avoid collision with the lat/lon labels ( or label in the adjacent zone coordinates, etc). And don't get me started on Township/Range labels! * Do you see a need to have the GRID displayed as a TICed grid instead of continuous lines, I'm not sure how to actually do this at the moment. Might be a symbol placement sort of thing, with rotation instead of line drawing. This is further down the list for me at this point though. Yes, I'd like to be able to specify tics instead of lines. You could do it by using symbols with a pre-constructed point shapefile. The problem is you have to contruct it prior to having Mapserver generate the output graphic. This is the problem I have with the just use a shapefile to display a grid/grat approach. It's ok if your map site has a limited geographic scope, scale range, coord system choice, etc. And it's ok if you are doing off-line automated mapping (i.e. not interactive web mapping). * Lastly, do you see a need for an entirely different approach to some of these labeling/printing aspects, I've been toying with the idea (for a couple of years now) of building a completely separate service that can still be complimentary to MapServer and be programmed against in the same manner from the client side, for templating a print function. The basic idea would be to build a system where there is a layout canvas on the client end, that can use URL resources as print objects, and allows the user to layout where everything goes on a page, which most likely is some sort of template for printing in pre-defined ways. Mapserver would handle all the inclusive map grid line markup, but the real detailed labeling could happen with this separate facility, specifically for printing. This is the conclusion that Landon Blake and I came to in the thread previously mentioned. If your intent is to do off-line automated mapping then a graphic layout tool (with some mapping smarts) would give you the flexibility and precision needed. A GUI front end with a batch capability would be the ultimate! That being said, I think there is a need (or a least a desire on my part) to improve the grid/grat capabilities in Mapserver, as least a little: 1. Add a MARGIN object to provide a white space around the perimeter (and prevent spurious labels). I'm not clear on how that would affect query results, etc. 2. Improve the
[mapserver-users] Setting expression through URL with MS 5
Hello, I'm trying to migrate a MapServer 4 app to MapServer 5, which means dealing with the changes in URL syntax for the on-the-fly mapfile changes. One thing I did was set an expression from the URL. Now I can't seem to get it to work :( A URL fragment like this: map.layer[layername].class[0]=EXPRESSION%20something Gives me: loadClass(): Unknown identifier. Parsing error near (EXPRESSION):(line 1) The layername definitely exists, and the class is already declared (with a fake expression as a place holder). I've tried removing the placeholder expression and also tried using: map.layer[0]=DATA shapefile CLASS EXPRESSION something END (properly url encoded, as you can see I also set the DATA on the fly) And then I get a parsing error on CLASS! Help, what am I missing? Thanks, Jean-François Doyon Applications Development Solutions | Solutions de développement d'applications IT Support Services | Services de support TI Information Technology Services | Services de la technologie d'information Shared Services Office | Bureau des services partagés Corporate Management and Services Sector | Secteur de la gestion et des services intégrés Natural Resources Canada | Ressources naturelles Canada Ottawa, Canada K1A 0E9 [EMAIL PROTECTED] Telephone | Téléphone 613-992-4902 Facsimile | Télécopieur 613-995-3252 Teletypewriter | Téléimprimeur 613-996-4397 Government of Canada | Gouvernement du Canada ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
Re: [mapserver-users] Setting expression through URL with MS 5
Doyon, Jean-Francois wrote: Hello, I'm trying to migrate a MapServer 4 app to MapServer 5, which means dealing with the changes in URL syntax for the on-the-fly mapfile changes. One thing I did was set an expression from the URL. Now I can't seem to get it to work :( You'll have to use %variable% replacements in your expressions with MapServer 5. For the whole story, see http://www.nabble.com/mapserver-5-expression-td12386097.html#a12414895 Daniel -- Daniel Morissette http://www.mapgears.com/ ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
[mapserver-users] [UMN_MAPSERVER-USERS] how many floating-points must a server hardware support for mapserver installation?
guys, how many floating-points must a server hardware support for mapserver installation? does mapserver, postgresql or postgis do much floating-point math to make a difference? thks, jzs ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
[mapserver-users] Running with MrSID (not scissors)
Hi All, Searched my archives and found a few references to MrSID ... mostly that people are getting it to work. However, is there an explicit how-to for getting MrSID going? Namely, how to compile GDAL with the support. Also, are there any licensing requirements? Thanks for the help! -Abe ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
Re: [mapserver-users] Running with MrSID (not scissors)
On Mar 19, 2008, at 10:32 PM, Abram Gillespie wrote: Searched my archives and found a few references to MrSID ... mostly that people are getting it to work. However, is there an explicit how-to for getting MrSID going? Namely, how to compile GDAL with the support. Also, are there any licensing requirements? Hello, It might be good to share for what platform... I suspect that the GDAL list would be a more appropriate place to inquire about GDAL support. Best, Jeshua Lacock, Owner http://OpenOSX.com phone: 877.240.1364 ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users