[GRASS-user] v.to.rast to get nice smooth vector-based pngs ?
Felix Schalck
felix.schalck at gmail.com
Sat Nov 14 08:40:40 EST 2009
NOTE: I'm really sorry for the double-post, but the previous mail was
uncomplete. Could somebody delete it ?
Hi,
Thanks to the support of this mailing list, I managed to paste and
import a huge amount of NASA swbd tiles into a single GRASS
vector-layer, aimed at completing the hydrography (rivers and
coastlines) of my relief-map. My initial plan was to export the GRASS
vector layer to svg and rework it with inkscape, before final
rasterization, and merging with the topographic layer. Unfortunately,
the exported svg file is far to big to be edited with inkscape, at
least on my hardware (AMD64, 3Gb ram and about 350Gb hdd).
My first attempt was to simplify the vector layer first, using
v.simplify, but it produces weired results by mixing water and land
areas. A possible explanation for this would be the "-c" flag I used
during the import operation, which skipped the usual cleaning process,
mainly because that cleaning already produced weired results.
Second choice would be a GRASS-lead direct rasterization; I mean,
given the tools offered by this GIS, why using inkscape ? After all,
all I want is a nice raster, based on the vector layer, with blue
lines (rivers, coastlines), and light-blue areas (water bodies):
nothing more than an anti-aliased d.vect display. I learned about
v.to.rast, again thanks to this mailing list, but unfortunately, I
don't really know how to use it. All my testings result in a white
raster, showing only green waterbodies. I tried to investigate this,
and found that v.to.rast seems to rely heavily on the attribute table
of my vector map - and it looks like it (the attribute table) contains
ONLY areas with centroids, eg waterbodies: there are only two colums,
first one with cat numbers (1-52492), and second one entitled
"FACC_CODE", with either value 'BA040', 'BH140' or 'BH080'. I have no
clue about what these numbers mean, as all categories, once highlined,
seem to refer to centroids (I may be wrong, because I did'nt test each
one of the 53k). Thus my question is quite simple: is it possible to
rasterize my vector in GRASS, using the same colors as in d.vect
-color and -fcolor options, and than to export it to png ? How would
you do this ? Would the results require more editing, or
ready-for-merging with the topographic layer ? Any help here would be
great; perhaps just a link to a good tutorial about this issue.
Obvioulsy, third choice would be to cut the GRASS vector layer in
small piece, export each one to svg an rasterize them with inkscape,
but I guess this would take me a huge amount of time... Also I'm not
sure about the modus operandi here.
Thank you very much for your patience and your help,
Felix
More information about the grass-user
mailing list