Skip to content

Commit

Permalink
Merge pull request #174 from r-spatial/drop_shp
Browse files Browse the repository at this point in the history
drop remaining residual ESRI Shapefiles
  • Loading branch information
rsbivand authored Dec 2, 2024
2 parents 892d141 + d10dae4 commit e9fffd0
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 7 deletions.
1 change: 1 addition & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# Version 1.3-8 (development)

* Remove remaining `spData` ESRI shapefile use

# Version 1.3-7 (2024-11-25)

Expand Down
2 changes: 1 addition & 1 deletion man/moran.plot.Rd
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ if (require(ggplot2, quietly=TRUE)) {
geom_text(data=mp[mp$is_inf,], aes(x=x, y=wx, label=labels, vjust=1.5)) +
xlab(xname) + ylab(paste0("Spatially lagged ", xname))
}
columbus <- st_read(system.file("shapes/columbus.shp", package="spData"))
columbus <- st_read(system.file("shapes/columbus.gpkg", package="spData"))
nb <- poly2nb(columbus)
listw <- nb2listw(nb)
moran.plot(x=columbus$CRIME, y=columbus$INC, listw=listw)
Expand Down
8 changes: 2 additions & 6 deletions vignettes/sids.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -84,16 +84,12 @@ library(sf)
nc_sf <- st_read(system.file("shape/nc.shp", package="sf"),
quiet=TRUE)
st_crs(nc_sf)
nc <- st_read(system.file("shapes/sids.shp",
nc <- st_read(system.file("shapes/sids.gpkg",
package="spData"), quiet=TRUE)
st_crs(nc)
```

As the actual CRS is unknown, **spData** reports missing, although it may very well be `+proj=longlat +datum=NAD27`

```{r echo=TRUE,eval=TRUE}
st_crs(nc) <- "+proj=longlat +datum=NAD27"
```
As the actual CRS was unknown, the GeoPackage **spData** version has been updated to `"EPSG:4267"`.

Next, are the geometries the same? `sf::st_equals` returns a logical matrix, so we'll check that the diagonal values are all `TRUE`, and that only those values are `TRUE` by summing and recalling that `n` is `100`:

Expand Down

0 comments on commit e9fffd0

Please sign in to comment.