[GRASSLIST:1180] Re: ps.map pixel size and line attributes

Eric G . Miller egm2 at jps.net
Fri Nov 24 21:12:26 EST 2000

On Fri, Nov 24, 2000 at 02:00:00PM -0700, Roger S. Miller wrote:
> Folks,
> I'm trying to construct an illustration that contains a large number of
> lines (hydrologic features, roads and a rectangular grid for a ground
> water model) overlain on a raster map showing results from the ground
> water model.
> Using ps.map from version 5, beta 7 I set the resolution of my postscript
> device to 360 (supposedly, 360 dpi) and I specify that the vector files
> should be plotted with a line width of 1 pixel.  The line I get is several
> times wider than the 0.003 inch (approximate) thickness that it should be.
> I need very fine lines on this map or the lines obscure each other and the
> model results.

I'm not sure, but I think that width maybe should be "points" rather
than pixels.  If that's the case, 1 point = 1/72 inch (according to
Adobe).  But I don't know for sure.  I don't know what "pixels" would be
in reference to.

> Is there some other way to reduce this pixel size?  I tried using
> fractional pixel widths with no improvement.  I also tried using the
> "cwidth" specification in ps.map.new and found that the lines in the model
> grid vector file were not categorized, which brings up an entirely
> different question.
> I constructed the file with the model grid from an imported ascii file and
> no attributes file was created when the file was imported.  I tried using
> the bulk labeling option in v.digit to label the lines (there are over
> 13,000 lines, so manually labelling them would be inefficient at best),
> but it doesn't work -- no errors are produced, but I get no labelled
> lines.  Is there some other way to label the lines?  I program; if someone
> can tell me how the lines are identified in the attribute files, then I
> can construct the attribute file myself.

Well, did you try running v.support on the file before doing the bulk
labelling.  I think it needs that to work (though it should produce an
error when it can't perform the operation).

Anyway, the line labels are identified by two files.  The first:
dig_att/<map> holds a series of entries identified as 'P' for points,
'L' for lines and 'A' for areas.  Each entry is then followed by an
easting, northing and a category value.  The coordinates of the entry
should fall on the degenerate line for a point, the line for lines, or
within the area (but outside of islands) for areas.

The second file is the dig_cats/<map> file, and after a small header has
entries like:

n1: Some Label
n2: Another Label

The numbers in the first column connect with the dig_att/<map> file
category numbers.  The part following the ':' is the category value.

If you're really interested, there's a programming manual available from
the website.

Eric G. Miller <egm2 at jps.net>

More information about the grass-user mailing list