[GRASS-user] problems converting vector to raster: polygons with adjoining boundaries merged in raster

Vishal Mehta vishalm1975 at gmail.com
Wed Sep 20 05:21:50 EDT 2006

Hi all,

I have a watershed map in Arcview shapefile format,  which consists of 9
watersheds(polygons). I imported it into grass using
v.in.ogr -o dsn=/home/vishal/CRU/shpfiles layer=watershed9 type=boundary

Two of the polygons have a common boundary. When i run the above command, i
get at the end the following message, which basically says that i have
overlapping polygons. (But the attribute table lists all 9, and
d.what.vectalso seems to differentiate between the polygons with
common boundary).
WARNING: 1 areas represent more (overlapping) features, because polygons
         overlap in input layer(s). Such areas are linked to more than 1
         row in attribute table. The number of features for those areas is
         stored as category in layer 2.
9 input polygons
total area: 2.518677e+09 (61 areas)
overlapping area: 5.874115e+08 (1 areas)
area without category: 0.000000e+00 (0 areas)

I need to convert this into a raster map:
v.to.rast input=watershed9 output=watershed9 use=cat

and then use r.average with v.what.rast on a bunch of rasters to add columns
of data from the rasters to my watershed vector map.

BUT, when i convert the above vector into raster, the 2 polygons are getting
merged into one category in the raster output.
I've tried using v.clean on the imported vector, but there's no difference.
If i  go ahead anyway and use v.what.rast  (after duly converting the
centroid type to point type), Null data fills the columns pertaining to the
overlapping polygons.

How can i solve this?

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/grass-user/attachments/20060920/7a588405/attachment.html

More information about the grass-user mailing list