[R-sig-Geo] "invalid" geometries in shape data

Michael Sumner mdsumner at gmail.com
Wed Feb 8 13:18:49 CET 2017


Ha,

thanks Edzer that's very useful, beyond this endeavour as well.

Their examples are immediately useful with sf and the prospects for
automatic fixing tools looks good.

For others in the list, the only triangulation package (that I know of)
able to provide the fixes outlined by the Delft group is RTriangle, which
has a "non-commercial" license (CC BY-NC-SA 4.0). The CGAL library used by
the group is not yet in any R package but is being looked into as an
alternative..

Do please share your example problem data sets and code!  A straightforward
efficiency is to only triangulate and re-union problem features rather than
every feature, which is easy to do, and will be great to have ideas about
whether that will be enough for real cases.

More soon.

Cheers, Mike.

On Wed, 8 Feb 2017 at 21:28 Edzer Pebesma <edzer.pebesma at uni-muenster.de>
wrote:

The Delft group has done a lot of work on this; I could find these two
references:

http://www.springer.com/%3FSGWID%3D5-102-45-124048-p32597622
http://www.sciencedirect.com/science/article/pii/S009830041400020X
https://3d.bk.tudelft.nl/hledoux/pdfs/12_agile.pdf

I guess you will like the last two in particular; they point to
https://github.com/tudelft3d/prepair which also contains data.

There should also be some simple feature for sql compliance suite,
http://www.opengeospatial.org/compliance/downloads

When working with GEOS, it might be worth looking into the precision -
both rgeos and sf allow you to do so.

On 07/02/17 22:46, Michael Sumner wrote:
> Hi,
>
> I'm interested in exploring the details of kinds of errors and warnings
> that are seen from the underlying geometry lib (GEOS) for spatial data in
> R.
>
> I would like to also have a collection of  examples with actual data and
> reproducible code.
>
> (The underlying theory and definitions and source code are all open and
> available, I'm looking for examples).
>
> The kinds of errors I'm talking about come from the GEOS library under the
> hood, and this is more or less the same in the sp/rgdal as well as the new
> sf family.
>
> Here's one example, this data set is not valid because of at least one
> "polygon self intersection", basically the ring winds back on itself:
>
> library(maptools)
> data(wrld_simpl)
> rgeos::gIsValid(wrld_simpl)
> [1] FALSE
> Warning message:
> In RGEOSUnaryPredFunc(spgeom, byid, "rgeos_isvalid") :
>   Ring Self-intersection at or near point -95.902496339999999
> 66.946641920000005
>
> I'd appreciate if you could send me similar examples, preferably
> reproducible with code but links to existing emails and online posts are
> welcome too. Feel free to construct examples from scratch that reproduce a
> particular warning/error.
>
> If you like, you can use the Github Issues mechanism here, or just email
> them in reply.
>
> https://github.com/r-gris/toposhop/issues
>
> Cheers, Mike.
>
>

--
Edzer Pebesma
Institute for Geoinformatics  (ifgi),  University of Münster
Heisenbergstraße 2, 48149 Münster, Germany; +49 251 83 33081
<+49%20251%208333081>
Journal of Statistical Software:   http://www.jstatsoft.org/
Computers & Geosciences:   http://elsevier.com/locate/cageo/

_______________________________________________
R-sig-Geo mailing list
R-sig-Geo at r-project.org
https://stat.ethz.ch/mailman/listinfo/r-sig-geo

-- 
Dr. Michael Sumner
Software and Database Engineer
Australian Antarctic Division
203 Channel Highway
Kingston Tasmania 7050 Australia

	[[alternative HTML version deleted]]



More information about the R-sig-Geo mailing list