I have a simple shape file with multipolygons .shp file data
read data into R
shp <- st_read("/home/rdfleay/Desktop/R/WestAustralia/GeographeBay/data/gb_gensub50a.shp") # sf()
attempt projection, wanting lat lon, but data remains in meters..
shp_t <- st_transform(shp, crs = st_crs(shp))
project using 'standard' to get lat-lon
shp_4326 = st_transform(shp, "EPSG:4326") #
i am trying to get the geometry as columns of 'lat' & 'lon'
reef_GBay <- shp_4326 %>%
filter(Substrate == "Reef")
nrow(reef_GBay)
t(reef_GBay)
print(reef_GBay$geometry)
head(reef_GBay$geometry)
as.data.frame(reef_GBay)
head(reef_GBay$geometry)
so far the output remains a single row?? thanks for the help