[GRASS-dev] ps.map consolidation

tlaronde at polynum.com tlaronde at polynum.com
Mon Mar 5 09:37:42 EST 2007


Hello,

On Mon, Mar 05, 2007 at 02:36:48PM +0100, Jachym Cepicky wrote:
> hi,
> 
> >
> >some ideas here:
> >http://grass.gdf-hannover.de/wiki/GRASS_GUI#Cartography:_GUI_front_end_for_ps.map
> >
> >
> >My idea was to combine both ways, sort of like how QGIS is organized.
> >blank preview page on the right side of the GUI (portrait or landscape)
> >with solid black border for map box and colored dashed lines for the
> >different text/legend boxes. To begin with have those drawn from map
> >control placement settings, but in future you could drag those around
> >to update the instructions settings (adjust box of currently selected
> >instruction for overlap-proofing). In the far-future you would see low
> >res preview instead of just rectangles.
> 
> I see the problem in "guessing" the box sizes. e.g. you can place the
> legend box somewhere on the paper, but you can not tell, how wide and
> height the box will be. That is, why I was proposing to find a
> sollution, that each object of the map would be stored in separate
> layer, so it could be regenerated ones the user changes some
> properity.

Please see the message I sent named: Fonts (to be continued).

Indeed, the problem is that the rendering (the kerning) done in
PostScript exceeds the limited implementation of the rendering text
engine in DRAWLIB (RASTERLIB in GPL GRASS).

Actually, for example in TeX, when TeX composes a page, it does not deal
with the glyphes (the actual drawing of the glyphes) but only with the
metric file to know how to compose the bounding boxes. Only the driver
put the drawing in the boxes to simplify.

One "easy" solution would be to use MetaPOST to compose the label (but
in a dedicated mode; it would be too heavy---and useless---for
digitizing use) (using Adobe's T1 fonts in TeX), and to retrieve the
bounding box information from the EPS file generated:

1) Generated a MetaPOST script from the label specification ;

2) Generate the EPS files with MetaPOST;

3) Retrieve the information about the bounding boxes and put this
information in the label description (extending the format of the label
files)

then use this extra information to draw the bounding boxes.

Another trick: create a glyph in the legacy font format with an unit box
(1 x 1). Extend the command for the scale to allow separate X and Y
scaling. Then use the text commands to draw (display) the glyph of the
bounding box with correct X and Y scale, and angle.

You're done.

For the curious and the courageaous, plugging to some extent TeX in
GRASS/KerGIS would lead to something that has simply no equivalent in
the GIS world.

Caveats: first step would probably be to translate WEB TeX and METAFONT
to CWEB (Pascal to C) to allow more easy development of drivers. Pascal
is definitively not my cup of tea.
DRAWLIB to allow 
-- 
Thierry Laronde (Alceste) <tlaronde +AT+ polynum +dot+ com>
                 http://www.kergis.com/
Key fingerprint = 0FF7 E906 FBAF FE95 FD89  250D 52B1 AE95 6006 F40C




More information about the grass-dev mailing list