Re: [GRASS-dev] vector layer contains error not detected by v.build nor cleaned in v.clean

2017-01-26 Thread Markus Neteler
On Thu, Jan 26, 2017 at 10:28 AM, Paulo van Breugel
 wrote:
> That did help me to get rid of many of the reported errors, thanks!

Could you please write a small text for the manual page and send to me?
thanks!

markusN
___
grass-dev mailing list
grass-dev@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/grass-dev

Re: [GRASS-dev] vector layer contains error not detected by v.build nor cleaned in v.clean

2017-01-26 Thread Paulo van Breugel



On 26-01-17 08:40, Markus Metz wrote:



On Wed, Jan 25, 2017 at 5:19 PM, Paulo van Breugel 
> wrote:

>
>
>
> On 25-01-17 16:57, Markus Metz wrote:
>
>
>
> On Wed, Jan 25, 2017 at 12:31 PM, Paulo van Breugel 
> wrote:

> >
> > Dear all,
> >
> > I have a vector layer which I cleaned up using v.clean. It all 
appears to be fine, but when trying to export using the libkml in 
v.out.ogr and the type=area option, I am getting the warning and error 
messages like below:

> >
> > Warning 1: Ring Self-intersection at or near point
> > 88.100626640406631 27.668444701473838
> > ERROR 6: Invalid polygon
> > Warning 1: Ring Self-intersection at or near point
> >
> > In the resulting kml file, some of the polygons are missing. If I 
use the kml output in v.out.ogr, I am not getting any warnings, but 
similarly, some of the polygons are missing.

> >
> > When I import the layer in Spatialite and check the geometries I 
am getting similar warnings / error messages, e.g.,:

> >
> > 27 Ring Self-intersection at or near point 82.397900772562522 
29.707213605319616

> >
> >
> > How can I identify and clean these issues in GRASS? Checking for 
topological errors with v.build does not result in any error, and I 
tried the various tools in v.clean to no avail.

>
> Did you try
> v.clean -c type=boundary tool=rmsa,break,rmdangle threshold=0,0,-1
> ?
>
> Yes, I tried
>
> Also try v.build -e
>
>
> Tried that too, it does not report any error.
>
> Generally where the boundaries of two polygons with the same 
category touch each other by one point (illustrated below), Spatialite 
and QGIS (both using geos) seem to report an error for that point.

>
> +-+   +
> | | /   \
> |  A  |+  A  +
> | | \   /
> +-+   +
>
OK. In some cases, the vertex is not exactly on the line but just 
slightly off. It depends on how floating point precision is handled if 
this is regarded as an intersection or not. If GRASS assumes a smaller 
floating point precision error than GEOS, GRASS treats it as no 
intersection while GEOS might recognize an intersection. A solution 
could be to snap boundaries with a very small threshold.

That did help me to get rid of many of the reported errors, thanks!



Just a guess.

Markus M

>
> I am not sure yet if that is what is causing the problem (missing 
polygons) when exporting to kml. I am cleaning a layer now for export. 
Will report how that worked out.

>
> Markus M
>
> >
> > Paulo
> > ___
> > grass-dev mailing list
> > grass-dev@lists.osgeo.org 
> > https://lists.osgeo.org/mailman/listinfo/grass-dev
>
>


___
grass-dev mailing list
grass-dev@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/grass-dev

Re: [GRASS-dev] vector layer contains error not detected by v.build nor cleaned in v.clean

2017-01-25 Thread Markus Metz
On Wed, Jan 25, 2017 at 5:19 PM, Paulo van Breugel 
wrote:
>
>
>
> On 25-01-17 16:57, Markus Metz wrote:
>
>
>
> On Wed, Jan 25, 2017 at 12:31 PM, Paulo van Breugel <
p.vanbreu...@gmail.com> wrote:
> >
> > Dear all,
> >
> > I have a vector layer which I cleaned up using v.clean. It all appears
to be fine, but when trying to export using the libkml in v.out.ogr and the
type=area option, I am getting the warning and error messages like below:
> >
> > Warning 1: Ring Self-intersection at or near point
> > 88.100626640406631 27.668444701473838
> > ERROR 6: Invalid polygon
> > Warning 1: Ring Self-intersection at or near point
> >
> > In the resulting kml file, some of the polygons are missing. If I use
the kml output in v.out.ogr, I am not getting any warnings, but similarly,
some of the polygons are missing.
> >
> > When I import the layer in Spatialite and check the geometries I am
getting similar warnings / error messages, e.g.,:
> >
> > 27 Ring Self-intersection at or near point 82.397900772562522
29.707213605319616
> >
> >
> > How can I identify and clean these issues in GRASS? Checking for
topological errors with v.build does not result in any error, and I tried
the various tools in v.clean to no avail.
>
> Did you try
> v.clean -c type=boundary tool=rmsa,break,rmdangle threshold=0,0,-1
> ?
>
> Yes, I tried
>
> Also try v.build -e
>
>
> Tried that too, it does not report any error.
>
> Generally where the boundaries of two polygons with the same category
touch each other by one point (illustrated below), Spatialite and QGIS
(both using geos) seem to report an error for that point.
>
> +-+   +
> | | /   \
> |  A  |+  A  +
> | | \   /
> +-+   +
>
OK. In some cases, the vertex is not exactly on the line but just slightly
off. It depends on how floating point precision is handled if this is
regarded as an intersection or not. If GRASS assumes a smaller floating
point precision error than GEOS, GRASS treats it as no intersection while
GEOS might recognize an intersection. A solution could be to snap
boundaries with a very small threshold.

Just a guess.

Markus M

>
> I am not sure yet if that is what is causing the problem (missing
polygons) when exporting to kml. I am cleaning a layer now for export. Will
report how that worked out.
>
> Markus M
>
> >
> > Paulo
> > ___
> > grass-dev mailing list
> > grass-dev@lists.osgeo.org
> > https://lists.osgeo.org/mailman/listinfo/grass-dev
>
>
___
grass-dev mailing list
grass-dev@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/grass-dev

Re: [GRASS-dev] vector layer contains error not detected by v.build nor cleaned in v.clean

2017-01-25 Thread Paulo van Breugel



On 25-01-17 16:57, Markus Metz wrote:



On Wed, Jan 25, 2017 at 12:31 PM, Paulo van Breugel 
> wrote:

>
> Dear all,
>
> I have a vector layer which I cleaned up using v.clean. It all 
appears to be fine, but when trying to export using the libkml in 
v.out.ogr and the type=area option, I am getting the warning and error 
messages like below:

>
> Warning 1: Ring Self-intersection at or near point
> 88.100626640406631 27.668444701473838
> ERROR 6: Invalid polygon
> Warning 1: Ring Self-intersection at or near point
>
> In the resulting kml file, some of the polygons are missing. If I 
use the kml output in v.out.ogr, I am not getting any warnings, but 
similarly, some of the polygons are missing.

>
> When I import the layer in Spatialite and check the geometries I am 
getting similar warnings / error messages, e.g.,:

>
> 27 Ring Self-intersection at or near point 82.397900772562522 
29.707213605319616

>
>
> How can I identify and clean these issues in GRASS? Checking for 
topological errors with v.build does not result in any error, and I 
tried the various tools in v.clean to no avail.


Did you try
v.clean -c type=boundary tool=rmsa,break,rmdangle threshold=0,0,-1
?


Yes, I tried


Also try v.build -e


Tried that too, it does not report any error.

Generally where the boundaries of two polygons with the same category 
touch each other by one point (illustrated below), Spatialite and QGIS 
(both using geos) seem to report an error for that point.


+-+   +
| | /   \
|  A  |+  A  +
| | \   /
+-+   +


I am not sure yet if that is what is causing the problem (missing 
polygons) when exporting to kml. I am cleaning a layer now for export. 
Will report how that worked out.



Markus M

>
> Paulo
> ___
> grass-dev mailing list
> grass-dev@lists.osgeo.org 
> https://lists.osgeo.org/mailman/listinfo/grass-dev



___
grass-dev mailing list
grass-dev@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/grass-dev

Re: [GRASS-dev] vector layer contains error not detected by v.build nor cleaned in v.clean

2017-01-25 Thread Markus Metz
On Wed, Jan 25, 2017 at 12:31 PM, Paulo van Breugel 
wrote:
>
> Dear all,
>
> I have a vector layer which I cleaned up using v.clean. It all appears to
be fine, but when trying to export using the libkml in v.out.ogr and the
type=area option, I am getting the warning and error messages like below:
>
> Warning 1: Ring Self-intersection at or near point
> 88.100626640406631 27.668444701473838
> ERROR 6: Invalid polygon
> Warning 1: Ring Self-intersection at or near point
>
> In the resulting kml file, some of the polygons are missing. If I use the
kml output in v.out.ogr, I am not getting any warnings, but similarly, some
of the polygons are missing.
>
> When I import the layer in Spatialite and check the geometries I am
getting similar warnings / error messages, e.g.,:
>
> 27 Ring Self-intersection at or near point 82.397900772562522
29.707213605319616
>
>
> How can I identify and clean these issues in GRASS? Checking for
topological errors with v.build does not result in any error, and I tried
the various tools in v.clean to no avail.

Did you try
v.clean -c type=boundary tool=rmsa,break,rmdangle threshold=0,0,-1
?

Also try v.build -e

Markus M

>
> Paulo
> ___
> grass-dev mailing list
> grass-dev@lists.osgeo.org
> https://lists.osgeo.org/mailman/listinfo/grass-dev
___
grass-dev mailing list
grass-dev@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/grass-dev

[GRASS-dev] vector layer contains error not detected by v.build nor cleaned in v.clean

2017-01-25 Thread Paulo van Breugel

Dear all,

I have a vector layer which I cleaned up using v.clean. It all appears 
to be fine, but when trying to export using the libkml in v.out.ogr and 
the type=area option, I am getting the warning and error messages like 
below:


Warning 1: Ring Self-intersection at or near point
88.100626640406631 27.668444701473838
ERROR 6: Invalid polygon
Warning 1: Ring Self-intersection at or near point

In the resulting kml file, some of the polygons are missing. If I use 
the kml output in v.out.ogr, I am not getting any warnings, but 
similarly, some of the polygons are missing.


When I import the layer in Spatialite and check the geometries I am 
getting similar warnings / error messages, e.g.,:


27 Ring Self-intersection at or near point 82.397900772562522 29.707213605319616


How can I identify and clean these issues in GRASS? Checking for 
topological errors with v.build does not result in any error, and I 
tried the various tools in v.clean to no avail.


Paulo
___
grass-dev mailing list
grass-dev@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/grass-dev