[GRASS-user] v.overlay missing polygon

On 13/03/12 6:36 AM, grass-user-request@lists.osgeo.org wrote:

Dear Vincent,

thanks for your idea. I wasn't aware of the possibility to snap a vector
map to another one. Good thing to know!
However, it didn't solve my problem.
Actually, I checked the data with respect to my theory 2 again, and I
must say: Visually it seems, that in this case the two data sets I would
like to overlay match perfectly concerning the boundaries. The theory
might be wrong.

I did some further testing:

Even if I isolate the polygon that disappears in the overlay process

v.extract input=veg output=veg_137 list=137

and use it for the overlay

v.overlay ainput=plot atype=area binput=veg_137 btype=area operator=and
output=res_137_and

the result is erroneous. Nothing new, but still very strange.

Tricky. I am puzzled and need to get home;-)

Falko

Falko,

I agree - the same error reproduces for me, using your vectors.

Neither veg nor plot show any apparent errors in v.digit.

Anyone offer suggestions to try and debug this?

Richard

Falko,
if you try to make things match, looks like v.overlay returns a correct
result. Try the following command -- threshold 5 m is arbitrary, of
course :

v.edit map=plot type=boundary tool=move move=0,0 thresh=-1,5,0 bgmap=veg
snap=vertex bbox=3607160,5733860,3609000,57350

then
v.overlay --o ainput=veg atype=area binput=plot btype=area
output=res_overlay operator=and

(right now, I can't tell you what was wrong for the long western
polygon)

Vincent.

Le mardi 13 mars 2012 à 11:41 +1100, Richard Chirgwin a écrit :

On 13/03/12 6:36 AM, grass-user-request@lists.osgeo.org wrote:
> Dear Vincent,
>
> thanks for your idea. I wasn't aware of the possibility to snap a vector
> map to another one. Good thing to know!
> However, it didn't solve my problem.
> Actually, I checked the data with respect to my theory 2 again, and I
> must say: Visually it seems, that in this case the two data sets I would
> like to overlay match perfectly concerning the boundaries. The theory
> might be wrong.
>
>
> I did some further testing:
>
> Even if I isolate the polygon that disappears in the overlay process
>
> v.extract input=veg output=veg_137 list=137
>
> and use it for the overlay
>
> v.overlay ainput=plot atype=area binput=veg_137 btype=area operator=and
> output=res_137_and
>
> the result is erroneous. Nothing new, but still very strange.
>
>
> Tricky. I am puzzled and need to get home;-)
>
> Falko
Falko,

I agree - the same error reproduces for me, using your vectors.

Neither veg nor plot show any apparent errors in v.digit.

Anyone offer suggestions to try and debug this?

Richard

_______________________________________________
grass-user mailing list
grass-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-user

Am 13.03.2012 07:53, schrieb Vincent Bain:

Falko,
if you try to make things match, looks like v.overlay returns a correct
result. Try the following command -- threshold 5 m is arbitrary, of
course :

v.edit map=plot type=boundary tool=move move=0,0 thresh=-1,5,0 bgmap=veg
snap=vertex bbox=3607160,5733860,3609000,57350

then
v.overlay --o ainput=veg atype=area binput=plot btype=area
output=res_overlay operator=and

(right now, I can't tell you what was wrong for the long western
polygon)

Vincent.

Le mardi 13 mars 2012 à 11:41 +1100, Richard Chirgwin a écrit :

On 13/03/12 6:36 AM, grass-user-request@lists.osgeo.org wrote:

Dear Vincent,

thanks for your idea. I wasn't aware of the possibility to snap a vector
map to another one. Good thing to know!
However, it didn't solve my problem.
Actually, I checked the data with respect to my theory 2 again, and I
must say: Visually it seems, that in this case the two data sets I would
like to overlay match perfectly concerning the boundaries. The theory
might be wrong.

I did some further testing:

Even if I isolate the polygon that disappears in the overlay process

v.extract input=veg output=veg_137 list=137

and use it for the overlay

v.overlay ainput=plot atype=area binput=veg_137 btype=area operator=and
output=res_137_and

the result is erroneous. Nothing new, but still very strange.

Tricky. I am puzzled and need to get home;-)

Falko

Falko,

I agree - the same error reproduces for me, using your vectors.

Neither veg nor plot show any apparent errors in v.digit.

Anyone offer suggestions to try and debug this?

Richard

_______________________________________________
grass-user mailing list
grass-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-user

_______________________________________________
grass-user mailing list
grass-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-user

Dear Vincent,

I was able to reproduce your code. This is definitely an improvement! For the test data this solution works.
I applied the snapping code to a larger data set. There was only (or still) one case left where a polygon dissapeared. I guess the reason was, that there was a problematic overlap but no vertices within the snapping threshold. In this case it would be desirable that snapping could also be done with boundaries.

I think a snapping option in the manner of your suggestion should be an option in the v.overlay and v.patch tools. Disappearing polygons are really problematic for my work and this could be a solution.

Actually a friend told me that in PostGIS there is an option to snap all vector data to a grid. This would be possible in Grass if you would produce a vector grid (maybe from a raster file with an appropriate resolution) and use it as a bgmap. Did you ever try this?

Falko

Never tried this.
I am generally very cautious with snapping. Not knowing exactly how
grass handles it but one should be aware of possible topological
alterations, duplicate features, etc.

Vincent

Dear Vincent,

I was able to reproduce your code. This is definitely an improvement!
For the test data this solution works.
I applied the snapping code to a larger data set. There was only (or
still) one case left where a polygon dissapeared. I guess the reason
was, that there was a problematic overlap but no vertices within the
snapping threshold. In this case it would be desirable that snapping
could also be done with boundaries.

I think a snapping option in the manner of your suggestion should be an
option in the v.overlay and v.patch tools. Disappearing polygons are
really problematic for my work and this could be a solution.

Actually a friend told me that in PostGIS there is an option to snap all
vector data to a grid. This would be possible in Grass if you would
produce a vector grid (maybe from a raster file with an appropriate
resolution) and use it as a bgmap. Did you ever try this?

Falko
_______________________________________________
grass-user mailing list
grass-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-user