You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
GDAL seems to return empty geoms as GEOMETRYCOLLECTION with zero elements:
> st_difference(st_sfc(st_point(0:1),st_point(c(0,0))), st_sfc(st_point(0:1)))
Geometry set for 2 features
geometry type: GEOMETRYCOLLECTION
dimension: XY
bbox: xmin: 0 ymin: 0 xmax: 0 ymax: 0
epsg (SRID): NA
proj4string: NA
precision: double (default; no precision model)
GEOMETRYCOLLECTION()
GEOMETRYCOLLECTION(POINT(0 0))
The current logic of sfr is then to convert everything back to GEOMETRYCOLLECTION, only because the empty one is. Having empty points doesn't seem a good solution, as they don't have a WKB representation. Maybe tweak sfc such that they have a constant type (in this case POINT), but may contain empty geometries of type GEOMETRYCOLLECTION?
The text was updated successfully, but these errors were encountered:
see tests/empty.R, all geometries now allow empty, also from/to WKB (except for POINT, but this seems an omission in the standard; GPKG uses silent NA values for empty POINT geoms); also added sfc_GEOMETRY type to mix anything.
GDAL seems to return empty geoms as GEOMETRYCOLLECTION with zero elements:
The current logic of
sfr
is then to convert everything back toGEOMETRYCOLLECTION
, only because the empty one is. Having empty points doesn't seem a good solution, as they don't have a WKB representation. Maybe tweaksfc
such that they have a constant type (in this case POINT), but may contain empty geometries of typeGEOMETRYCOLLECTION
?The text was updated successfully, but these errors were encountered: