Skip to content

Commit

Permalink
doh bug in extent
Browse files Browse the repository at this point in the history
  • Loading branch information
mdsumner committed Sep 19, 2023
1 parent 989f0bc commit c35e292
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion R/raster-info.R
Original file line number Diff line number Diff line change
Expand Up @@ -157,11 +157,12 @@ vapour_raster_info <- function(x, ..., sds = NULL, min_max = FALSE) {

corners <- NULL
extent <- NULL
if (!is.null(json$cornerCoodinates)) {
if (!is.null(json$cornerCoordinates)) {
corners <- do.call(rbind, json$cornerCoordinates)
extent <- c(range(corners[,1]), range(corners[,2]))
}


if (is.null(json$geoTransform) && !is.null(extent)) {
geoTransform <- c(extent[1], diff(extent[c(1,2)])/json$size[1], 0,
extent[4], 0, diff(extent[c(4:3)])/json$size[2])
Expand Down

0 comments on commit c35e292

Please sign in to comment.