USDAForestService / gdalraster

R Bindings to GDAL (Geospatial Data Abstraction Library)
https://usdaforestservice.github.io/gdalraster/
Other
41 stars 7 forks source link

Add `g_make_valid()`: attempt to make invalid geometries valid (wrapper of `OGR_G_MakeValid()`/`OGR_G_MakeValidEx()`) #521

Closed ctoney closed 3 weeks ago

ctoney commented 3 weeks ago

Adds g_make_valid(). This is implemented in a new style geometry API to be used for OGR GEOS functions , operating on input of WKB raw vector, list of WKB, or character vector of WKT strings. WKB is used internally, so the functions will operate on a reference to the raw vector for WKB input. A separate PR will re-implement the existing geom ( g_*) functions to follow this interface.

' Attempt to make invalid geometries valid

'

' g_make_valid() attempts to make an invalid geometry valid without losing

' vertices. Already-valid geometries are cloned without further intervention.

' Wrapper of OGR_G_MakeValid()/OGR_G_MakeValidEx() in the GDAL Vector C

' API.