Skip to content

Commit

Permalink
Remove rgdal
Browse files Browse the repository at this point in the history
  • Loading branch information
gfmg committed Feb 22, 2024
1 parent e59d29e commit 6c73c02
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 15 deletions.
13 changes: 7 additions & 6 deletions global.R
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ packs = c("shiny",
"plotly",
"sp",
"sf",
"rgdal",
#"rgdal",
"shinycssloaders",
"ggsci",
"colorRamps",
Expand Down Expand Up @@ -108,11 +108,12 @@ source("./lib/override.R",
local = TRUE)

#Load data at ICES_rectangle
ICES_LPUE<-readOGR(dsn = "data/Data_prep_Output",
layer = "ICES_LPUE",
encoding = "utf8")
ICES_LPUE <- spTransform(ICES_LPUE, CRSobj=projWGS84)
ICES_LPUE<-st_as_sf(ICES_LPUE)
ICES_LPUE<-st_read(dsn = "data/Data_prep_Output",
layer = "ICES_LPUE")
#encoding = "utf8")
#ICES_LPUE <- spTransform(ICES_LPUE, CRSobj=projWGS84)
ICES_LPUE <- st_transform(ICES_LPUE, CRSobj=projWGS84)
#ICES_LPUE<-st_as_sf(ICES_LPUE)


#Read rds file related to the polygons
Expand Down
20 changes: 11 additions & 9 deletions lib/01_Loading_Spatial_Data.R
Original file line number Diff line number Diff line change
Expand Up @@ -18,15 +18,17 @@ projWGS84 <- CRS("+proj=longlat +datum=WGS84 +no_defs +ellps=WGS84 +towgs84=0,0,
# Load spatial data -------------------------------------------------------
spatialdir<-file.path("./data/geoData")

ICES_rectangles<- readOGR(dsn = spatialdir,
layer = "ICES_Statistical_Rectangles_Eco",
encoding = "utf8")
ICES_rectangles <- spTransform(ICES_rectangles, CRSobj=projWGS84)

Inshore_Grid<- readOGR(dsn = spatialdir,
layer = "Inshore_grid_NEW",
encoding = "utf8")
Inshore_Grid <- spTransform(Inshore_Grid, CRSobj=projWGS84)
ICES_rectangles<- st_read(dsn = spatialdir,
layer = "ICES_Statistical_Rectangles_Eco")
#encoding = "utf8")
#ICES_rectangles <- spTransform(ICES_rectangles, CRSobj=projWGS84)
ICES_rectangles <- st_transform(ICES_rectangles, CRSobj=projWGS84)

Inshore_Grid<- st_read(dsn = spatialdir,
layer = "Inshore_grid_NEW")
#encoding = "utf8")
#Inshore_Grid <- spTransform(Inshore_Grid, CRSobj=projWGS84)
Inshore_Grid <- st_transform(Inshore_Grid, CRSobj=projWGS84)
#coastline<-readOGR(dsn = spatialdir,
# layer = "Ireland",
# encoding = "utf8")
Expand Down

0 comments on commit 6c73c02

Please sign in to comment.