library(sf)
library(sp)
library(rgdal)
library(profvis)
Using ‘sp’
profvis({
aoi = readOGR(".", "aoi")
grid = readOGR(".", "grid_full")
grid_sub = grid[aoi, ]
})
## OGR data source with driver: ESRI Shapefile
## Source: ".", layer: "aoi"
## with 1 features
## It has 1 fields
## OGR data source with driver: ESRI Shapefile
## Source: ".", layer: "grid_full"
## with 1440000 features
## It has 2 fields
Using ‘sf’
profvis({
aoi = st_read(".", "aoi")
grid = st_read(".", "grid_full")
grid_sub = grid[aoi, ]
})
## Reading layer `aoi' from data source `/home/michael/Dropbox/BGU/Itai/p_21_Allan_Grid_Preparation' using driver `ESRI Shapefile'
## Simple feature collection with 1 feature and 1 field
## geometry type: POLYGON
## dimension: XY
## bbox: xmin: -4.889354 ymin: 42.23365 xmax: 8.325818 ymax: 51.19109
## epsg (SRID): 4326
## proj4string: +proj=longlat +datum=WGS84 +no_defs
## Reading layer `grid_full' from data source `/home/michael/Dropbox/BGU/Itai/p_21_Allan_Grid_Preparation' using driver `ESRI Shapefile'
## Simple feature collection with 1440000 features and 2 fields
## geometry type: POINT
## dimension: XY
## bbox: xmin: -15.73142 ymin: 38.82817 xmax: 4.121077 ymax: 49.61102
## epsg (SRID): 4326
## proj4string: +proj=longlat +datum=WGS84 +no_defs