sin_to_ll: Convert sinusoidal coordinates to lat / lon

View source: R/coordinate_conversion.R

sin_to_llR 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

mt_bbox

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)


MODISTools documentation built on Sept. 17, 2023, 1:07 a.m.