I have been attempting to convert a
vector area layer to a raster layer using
v.to.rast. The problem I am having is
that the vector layer contains a polygon
that is wholly encloses by another
polygon. When executing a d.what.vect,
the proper attribute value is returned
for this lake. However, after the
conversion, the raster layer has "no
data" for the lake. Is this a known
problem with v.to.rast? I have checked
for overlapping areas and there are none.
I was able to circumvent the problem by
importing the lake separately and doing
an r.patch. This seems like a roundabout
way of doing it. Any comments would be
appreciated.
John Sparco
In info.grass.user you write:
I have been attempting to convert a
vector area layer to a raster layer using
v.to.rast. The problem I am having is
that the vector layer contains a polygon
that is wholly encloses by another
polygon. When executing a d.what.vect,
the proper attribute value is returned
for this lake. However, after the
conversion, the raster layer has "no
data" for the lake. Is this a known
problem with v.to.rast? I have checked
for overlapping areas and there are none.
I was able to circumvent the problem by
importing the lake separately and doing
an r.patch. This seems like a roundabout
way of doing it. Any comments would be
appreciated.
John Sparco
Please ftp the data to me
you can put it on moon (grass/incoming)
The best thing is to make a tar file of your location
Olga
In info.grass.user you write:
I have been attempting to convert a
vector area layer to a raster layer using
v.to.rast. The problem I am having is
that the vector layer contains a polygon
that is wholly encloses by another
polygon. When executing a d.what.vect,
the proper attribute value is returned
for this lake. However, after the
conversion, the raster layer has "no
data" for the lake. Is this a known
problem with v.to.rast? I have checked
for overlapping areas and there are none.
I was able to circumvent the problem by
importing the lake separately and doing
an r.patch. This seems like a roundabout
way of doing it. Any comments would be
appreciated.
John Sparco
OK I solved your problem
It was actually very interesting
make v.out.ascii on your map (soiltype)
and you will notice that the area you mentioned
(the one with 24 points) appears twice, it consists of
one area edge, and it's digitized in different order
but the same coordinates second time.
Now, v.support when it sees and attribute, it finds the smallest
area inside which this attribute is located, and attaches this attribute
to found area. So it attaches the attribute to only one of identical areas.
And the other area is unlabeled.
d.what.vect also finds the same area (which happens to have smaller index than
unlabeled area, so it reports it correctly.
But when v.to.rast goes through list of areas, it first draws labeled
area and then draws unlabled copy right on top if it with category 0.
The solution is to check for identical areas in v.to.rast and warn user
about them and ignore the unlabeled copy.
I will see if I can modify diglib to do the same thing.
As someone on this list informed me few months ago, GRASS doesn't
distinguish arc_info islands during arcinfo->GRASS import.
The islands in arcinfo are stored with diff headers, but GRASS
imports them just like normal areas, thus creating duplicate
areas in GRASS vector files (exactly the situation described above)
I could fix v.in.arc but I don't have any documentation on arcinfo format
I really need someone to send me some description of how exactly islands are handled in arcinfo.
Olga
This is to summarize the resolution of a problem I recently encountered. Thanks
to everyone who offered help.
>I have been attempting to convert a
>vector area layer to a raster layer using
>v.to.rast. The problem I am having is
>that the vector layer contains a polygon
>that is wholly encloses by another
>polygon. When executing a d.what.vect,
>the proper attribute value is returned
>for this lake. However, after the
>conversion, the raster layer has "no
>data" for the lake. Is this a known
>problem with v.to.rast? I have checked
>for overlapping areas and there are none.
>I was able to circumvent the problem by
>importing the lake separately and doing
>an r.patch. This seems like a roundabout
>way of doing it. Any comments would be
>appreciated.
>John Sparco
OK I solved your problem
It was actually very interesting
make v.out.ascii on your map (soiltype)
and you will notice that the area you mentioned
(the one with 24 points) appears twice, it consists of
one area edge, and it's digitized in different order
but the same coordinates second time.
Now, v.support when it sees and attribute, it finds the smallest
area inside which this attribute is located, and attaches this attribute
to found area. So it attaches the attribute to only one of identical areas.
And the other area is unlabeled.
d.what.vect also finds the same area (which happens to have smaller index than
unlabeled area, so it reports it correctly.
But when v.to.rast goes through list of areas, it first draws labeled
area and then draws unlabled copy right on top if it with category 0.
The solution is to check for identical areas in v.to.rast and warn user
about them and ignore the unlabeled copy.
I will see if I can modify diglib to do the same thing.
As someone on this list informed me few months ago, GRASS doesn't
distinguish arc_info islands during arcinfo->GRASS import.
The islands in arcinfo are stored with diff headers, but GRASS
imports them just like normal areas, thus creating duplicate
areas in GRASS vector files (exactly the situation described above)
I could fix v.in.arc but I don't have any documentation on arcinfo format
I really need someone to send me some description of how exactly islands are handled in arcinfo.
Olga