Hi,
I have a problem with th v.overlay command.
I have two vectors (imported by OGR from shapes) that have several boundary
completely overlapped because one derive from the other.
If I use v.overlay with "and" option I have a vector that is not the correct
intersection of them.
How you can see from the png file linked, same polygons of the first vector
(with one boundary overlapped with the boundary of the other vector) are not
included in the intersection vector (bottom of the picture).
In the oter case you can see that, in the same situation, I have the polygons
included in the intersection vector (top of the picture).
The first vector has black line and no filled area, the second has red line
and not filled area and the intersection vector has green line and yellow
filled area.
Someone had the some problem or does someone know the cause?
Thank you
Leonardo Lami
Hi,
I have a problem with th v.overlay command.
I have two vectors (imported by OGR from shapes) that have several
boundary completely overlapped because one derive from the other.
If I use v.overlay with "and" option I have a vector that is not the
correct intersection of them.
How you can see from the png file linked, same polygons of the first
vector (with one boundary overlapped with the boundary of the other vector)
are not included in the intersection vector (bottom of the picture).
In the oter case you can see that, in the same situation, I have the
polygons included in the intersection vector (top of the picture).
The first vector has black line and no filled area, the second has red
line and not filled area and the intersection vector has green line and
yellow filled area.
Someone had the some problem or does someone know the cause?
Thank you
Leonardo Lami
(attachments)


It is not so bad as I thought first (I hope).
It is known (for me) missing cleaning tool in v.overlay/library.
The problem:
Topology rules require that 2 boundaries at the node don't have
the same angle. It may happen, that the angle (float) for
2 boundaries is identical beacause of representation error
(limited number of decimal digits) even if lines are not identical.
The risk is obviously higher if the maps are similar.
The solution for today:
v.patch input=a,b output=o1
v.clean input=o1 output=o2 tool=snap,break,rmdupl,rmdac thresh=0.1
v.category input=o2 output=o3 option=del
v.category input=o3 output=o4 type=area,centroid
echo "create table o4 (cat int, a int, b int)" | db.execute
v.db.connect map=o4 driver=dbf database='$GISDBASE/$LOCATION_NAME/$MAPSET/dbf/' table=o4
v.to.db map=o4 option=cat
v.distance from=o4 to=a from_type=centroid to_type=area max=0 upload=cat column=a
v.distance from=o4 to=b from_type=centroid to_type=area max=0 upload=cat column=b
and extract from o4, but the last v.distance unfortunately crashes.
Radim
On Tuesday 06 July 2004 15:50, leo.lami@katamail.com wrote:
Hi,
I have a problem with th v.overlay command.
I have two vectors (imported by OGR from shapes) that have several
boundary completely overlapped because one derive from the other.
If I use v.overlay with "and" option I have a vector that is not the
correct intersection of them.
How you can see from the png file linked, same polygons of the first
vector (with one boundary overlapped with the boundary of the other
vector) are not included in the intersection vector (bottom of the
picture). In the oter case you can see that, in the same situation, I have
the polygons included in the intersection vector (top of the picture). The
first vector has black line and no filled area, the second has red line and
not filled area and the intersection vector has green line and yellow
filled area.
Someone had the some problem or does someone know the cause?
Thank you
Leonardo Lami
On Tuesday 06 July 2004 18:27, Radim Blazek wrote:
column=a v.distance from=o4 to=b from_type=centroid to_type=area max=0
upload=cat column=b
and extract from o4, but the last v.distance unfortunately crashes.
v.distance fixed in CVS.
Radim
It is known (for me) missing cleaning tool in v.overlay/library.
The problem:
Topology rules require that 2 boundaries at the node don't have
the same angle. It may happen, that the angle (float) for
2 boundaries is identical beacause of representation error
(limited number of decimal digits) even if lines are not identical.
I have added the function to the library and to
v.overlay
v.clean tool=rmsa
v.in.ogr (default snap changed to -1 = no snapping)
it should be used also in v.buffer, but v.buffer needs more changes
which should be probably done at the same time.
Radim