hypertidy/whatarelief

have GDAL answer "is this longlat"

Closed this issue · 3 comments

this is just a longlat extent for a large area, it should't be going for SRTM. Using internal vapour stuff in new branch 'gdalwarpergeneral'

image

library(raadtools)
library(vapour)
files <- sstfiles()
dd <- lapply(files$vrt_dsn[1:100], vapour:::gdal_raster_data, target_ext = c(100, 180, -60, 10))
vapour:::imfun(dd[[1]])

ah, part was the srtm30 test but ultimate the the real problem is lonlat should be true here

wkt <- "GEOGCS[\"WGS 84\",DATUM[\"WGS_1984\",SPHEROID[\"WGS 84\",6378137,298.257223563,AUTHORITY[\"EPSG\",\"7030\"]],AUTHORITY[\"EPSG\",\"6326\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Longitude\",EAST],AXIS[\"Latitude\",NORTH]]"
 whatarelief:::format_out(list(extent = c(0, 180, -90, 0), projection =wkt ))
$extent
[1]   0 180 -90   0

$dimension
[1] 256 512

$projection
[1] "GEOGCS[\"WGS 84\",DATUM[\"WGS_1984\",SPHEROID[\"WGS 84\",6378137,298.257223563,AUTHORITY[\"EPSG\",\"7030\"]],AUTHORITY[\"EPSG\",\"6326\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Longitude\",EAST],AXIS[\"Latitude\",NORTH]]"

$lonlat
[1] FALSE

$type
[1] "matrix"

a bit dodgy, but working now (should really have GDAL answer the q)

done