[GRASSLIST:5144] Re: importing text with v.label
Moritz Lennert
mlennert at club.worldonline.be
Mon Dec 13 17:15:21 EST 2004
On Mon, December 13, 2004 21:58, Kirk R. Wythers said:
> I am looking for some advice as to how I should handle text that occurs
> in a vector layers of a "home grown" GIS that I am moving into GRASS.
> The vector lines, points and polygons were no trouble. I was able to
> write a short awk script that parsed an ascii file from the old GIS
> into the format that GRASS could read with v.in.ascii. However, I am a
> bit puzzled as how to handle text that the old GIS used for things like
> naming roads, naming experiments, etc. In a way of background this
> original GIS was based on a CAD system, so it is a quasi drawing
> program with its roots in dxf layers. The ascii files from the old GIS
> contain labeling information about each geographic object, including
> the text font, size, orientation and color!
>
> My question therefor is this: In a GRASS world, at what point does text
> info belong in a database and at what point does it belong as a label?
> It looks as if v.label is designed for this kind of thing, but having
> never used it I thought I'd throw this out before for list reflection
> before I dumped several hours into it.
I would put the actual text into the database with the respective objects.
Then use shell+awk+v.label to create label files which include the formatting
info. This way, you can always recreate differently formatted labels whenever
necessary.
However, if you know that you will always need the same format for a given
object, and that you might want to transfer one map from one GRASS
installation to another, without wanting to also have to transfer label files,
then it might be appropriate to put the formatting information into the
database. GRASS can't handle this information directly, but you could use
shell+sql+v.label to recreate label files...
Moritz
More information about the grass-user
mailing list