Skip to content

Hosting option for COGs #5

Description

@FlukeAndFeather

Hey team! I did some investigating about hosting options and it seems like PANGAEA supports HTTP range requests, which would solve a big problem.

I found a COG dataset on PANGAEA by searching for "cloud optimized geotiff". It's a permafrost dataset. The following code grabs a relatively small chunk (3deg lon, 2deg lat) and plots it. Looks like it's working!

library(terra)

project_bbox <- function(b, from, to) {
  bbox_vect <- as.polygons(b, crs = from)
  bbox_proj <- project(bbox_vect, to)
  ext(bbox_proj)
}

r <- rast("/vsicurl/https://download.pangaea.de/dataset/964814/files/TCVIS-2003-2022_mosaic-east_cog.tif")
# Now extract just a subset - only downloads the needed tiles
bbox <- ext(15, 18, 67, 69)  # small area

subset <- crop(r, project_bbox(bbox, "EPSG:4326", "EPSG:3857"))
plot(subset)

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions