Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit e9f5363

Browse files
committed
m
1 parent 6ecbb9c commit e9f5363

File tree

5 files changed

+16
-14
lines changed

5 files changed

+16
-14
lines changed

NEWS.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,11 @@
1616

1717
- better support for creating a SpatVector with an EMPTY wkt geometry [#1903](https://github.com/rspatial/terra/issues/1903) by Anatolii Tsyplenkov
1818

19+
## new
20+
21+
- it is now possible to create a SpatVector from Well Known Binary (WKB) data [#1895](https://github.com/rspatial/terra/pull/1895) by Jan Hartman
22+
23+
1924
# version 1.8-60
2025

2126
Released 2025-07-18

R/values.R

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -564,12 +564,7 @@ setMethod("identical", signature(x="SpatRaster", y="SpatRaster"),
564564

565565
setMethod("identical", signature(x="SpatExtent", y="SpatExtent"),
566566
function(x, y) {
567-
if (any(dim(target) != dim(current))) return(FALSE)
568-
if (crs(target) != crs(current)) return(FALSE)
569-
if (geomtype(target) != geomtype(current)) return(FALSE)
570-
if (!identical(values(target), values(current))) return(FALSE)
571-
if (!identical(geom(target), geom(current))) return(FALSE)
572-
TRUE
567+
identical(as.vector(x), as.vector(y))
573568
}
574569
)
575570

man/plot.Rd

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ There is a separate help file for plotting a \code{\link[=plot,SpatGraticule,mis
4646

4747
\S4method{plot}{SpatVector,missing}(x, y, values=NULL, ...)
4848

49-
\S4method{plot}{SpatVectorCollection,missing}(x, y, main, mar=NULL, nc, nr, maxnl=16, ...)
49+
\S4method{plot}{SpatVectorCollection,missing}(x, y, main, mar=NULL, nc, nr, maxnl=16, col=NULL, ...)
5050

5151
\S4method{plot}{SpatVectorCollection,numeric}(x, y, main, mar=NULL, ext=NULL, ...)
5252
}

man/voronoi.Rd

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,9 +43,9 @@ v
4343
d <- delaunay(x)
4444
d
4545

46-
plot(v, lwd=2, col=rainbow(15))
47-
lines(x, col="gray", lwd=2)
48-
points(x)
46+
#plot(v, lwd=2, col=rainbow(15))
47+
#lines(x, col="gray", lwd=2)
48+
#points(x)
4949
}
5050

5151
\keyword{spatial}

src/read_ogr.cpp

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -419,13 +419,15 @@ void addOGRgeometry(SpatVector &x, OGRGeometry *poGeometry) {
419419
x.setError("cannot read geometry type: " + strgeomtype);
420420
return;
421421
}
422-
if ((x.size() > 1) && (x.geoms[0].gtype != g.gtype)) {
423-
x.setError("a SpatVector can only have a single geometry type");
424-
return;
422+
if ((x.size() > 1) && (x.geoms[0].gtype != g.gtype)) {
423+
if (x.geoms[0].gtype != null) {
424+
x.setError("a SpatVector can only have a single geometry type");
425+
return;
426+
}
425427
}
426428
x.addGeom(g);
427429
OGRGeometryFactory::destroyGeometry(poGeometry);
428-
}
430+
}
429431

430432

431433
bool SpatVector::addRawGeoms(std::vector<unsigned char*> wkbs, std::vector<size_t> sizes) {

0 commit comments

Comments
 (0)