sin_to_ll {MODISTools} | R Documentation |
Convert sinusoidal coordinates to lat / lon
Description
A full description of the sinusoidal projection is provided on the lpdaac page: https://lpdaac.usgs.gov/dataset_discovery/modis and wikipedia: https://en.wikipedia.org/wiki/Sinusoidal_projection
Usage
sin_to_ll(x, y)
Arguments
x |
sinusoidal x coordinate (vector) |
y |
sinusoidal y coordinate (vector) |
See Also
Examples
# Download some test data
subset <- mt_subset(product = "MOD11A2",
lat = 40,
lon = -110,
band = "LST_Day_1km",
start = "2004-01-01",
end = "2004-03-31",
progress = FALSE)
# convert sinusoidal to lat / lon
lat_lon <- sin_to_ll(subset$xllcorner, subset$yllcorner)
# bind with the original dataframe
subset <- cbind(subset, lat_lon)
head(subset)
[Package MODISTools version 1.1.5 Index]