Reputation: 41
I am trying to calculate sunrise/sunset times based on lat/long coordinates and have done it previously with an sp object and maptools::sunriset. This function doesn't take sf objects and sp is being deprecated so we need to switch over our code. Is anyone aware of a similar function that takes sf objects?
pts <- sf::st_as_sf(latLon, coords=c("lon", "lat"), crs=4326)
Where latLon is a data frame with latitude and longitude, we want to use pts object to get sunrise and sunset times.
Thank you in advance for your help!
Upvotes: 1
Views: 621