[GRASS-user] new symbol, support for RGB color labels and text rotation

John C. Tull john.tull at wildnevada.org
Wed Sep 26 12:09:17 EDT 2007


Great examples, and thanks for the link to the screenshot. It would  
be nice to have the ps.map instructions on the web page for the Norse  
islands so people can have a better idea of how the output is  
produced, rather than just knowing that it is possible.

I'm also looking forward to seeing the new proposals implemented in  
grass 7.

Cheers,
John

On Sep 26, 2007, at 2:03 AM, Hamish wrote:

> Hi,
>
> I just added a few bits and pieces to ps.map and the labeling system.
>
> - added a new symbol: extra/n_arrow1, based on the 'd.barscale -n'
>   north arrow head by Huidae Cho. (see attached ps.map screenshot)
>   more symbol info at  http://grass.gdf-hannover.de/wiki/IconSymbols
>
> - ps.map's text instruction can now rotate the text
>
> - ps.map's text instruction now supports full RGB color triplets
>
> - v.label, d.labels, and ps.map labels now support full RGB color
>   triplets for labels, and allow wider borders
>
> - v.label will now use the vector map's name if not specified
>
> - d.labels now supports border widths.
>   !! the default width is 1.0, which can lead to ugly rotated boxes.
>   Use a width of 0 if you want nice clean boxes with d.labels on  
> xmons.
>   Sorry, it's due to the way R_line_width() goes, not much I can
>   do about it without removing the functionality in d.labels.
>
> - [dev] I added some helper functions in d.paint.labels/color.c for
>   working with RGBA_Color structs. Maybe these should be made into
>   lib/ fns? If so, some peer review & better fn names would be nice.
>   http://freegis.org/cgi-bin/viewcvs.cgi/grass6/display/ 
> d.paint.labels/color.c
>
>
> FWIW, here are the ps.map instructions used in the screenshot. The  
> ring
> is just the circle symbol placed concentrically with the north arrow.
> The map info box is constructed using the rectangle, scalebar, and  
> text
> instructions.
>
> ps.map -r out=test.ps << EOF
> scale 1:100000
> geogrid 2 m
>   color grey
>   numbers 2
>   end
> #...
> scalebar s
>   where 2.4 5.8
>   length 4000
>   segment 4
>   end
> text 13.5% 16.5% meters
>   background white
>   end
> text 13.5% 27% SCALE: 1:100,000
>   background white
>   end
> rectangle 3.4% 14% 24% 31%
>   fcolor white
>   width 0.5
>   end
> #...
> point 11.9% 48%
>   symbol extra/n_arrow1
>   rotate 4.4
>   fcolor black
>   size 15
>   end
> text 11.5% 53.5% N
>   rotate 4.4
>   end
> point 11.9% 48%
>   symbol basic/circle
>   fcolor none
>   size 35
>   end
> end
> EOF
>
>
> If we add x% y% placement to the scalebar instruction those can be
> scripted into little helper tools for auto-generation.
>
>
> FWIW2, I still support the writing of a wxPython GUI frontend to  
> write &
> run ps.map scripts. I think the task isn't hard, just tedious. (PDF  
> as a
> save option would be nice too, could convert behind the scenes if the
> right tools are present)  The PS driver is nice and all, but the d.*
> modules just aren't as pretty as ps.map, and the PS driver still  
> has some
> rendering issues. With GRASS 7 maybe the PS driver gets much nicer,  
> I'd
> put off discussing the dropping of ps.map until then. The two only
> conflict for mindshare so little reason to drop it early IMO.
>
> e.g. when d.* can recreate something as nice as this new cartography
> screenshot by Willem van Mierlo, we'll talk :)
>   http://grass.itc.it/screenshots/cartography.php
>   (the page will show up on the server in the next hour or two)
>
> (disclosure: ps.map couldn't make that either; two ps.map outputs were
> merged with transparency in the GIMP. This was because PostScript  
> doesn't
> support vector area transparency. Apparently PDF 1.4+ does ....)
>
>
> Hamish<psmap_n_arrow1.png>____________________________________________ 
> ___
> grassuser mailing list
> grassuser at grass.itc.it
> http://grass.itc.it/mailman/listinfo/grassuser




More information about the grass-user mailing list