{"id":18722616,"url":"https://github.com/mdsumner/ibcso-cog","last_synced_at":"2026-03-19T06:03:31.595Z","repository":{"id":213435520,"uuid":"699523547","full_name":"mdsumner/ibcso-cog","owner":"mdsumner","description":null,"archived":false,"fork":false,"pushed_at":"2024-01-24T11:40:50.000Z","size":70670,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-06-04T19:54:21.567Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":null,"has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mdsumner.png","metadata":{"files":{"readme":"README.Rmd","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-10-02T19:57:23.000Z","updated_at":"2023-10-02T21:07:47.000Z","dependencies_parsed_at":"2025-11-13T10:01:50.190Z","dependency_job_id":null,"html_url":"https://github.com/mdsumner/ibcso-cog","commit_stats":null,"previous_names":["mdsumner/ibcso-cog"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/mdsumner/ibcso-cog","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mdsumner%2Fibcso-cog","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mdsumner%2Fibcso-cog/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mdsumner%2Fibcso-cog/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mdsumner%2Fibcso-cog/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mdsumner","download_url":"https://codeload.github.com/mdsumner/ibcso-cog/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mdsumner%2Fibcso-cog/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28848379,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-28T15:15:36.453Z","status":"ssl_error","status_checked_at":"2026-01-28T15:15:13.020Z","response_time":57,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-07T13:42:12.944Z","updated_at":"2026-01-28T18:05:42.496Z","avatar_url":"https://github.com/mdsumner.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"---\noutput: github_document\neditor_options: \n  chunk_output_type: console\n---\n\n\u003c!-- README.md is generated from README.Rmd. Please edit that file --\u003e\n\n\n\n## IBCSO\n\nInternational Bathymetric Chart of the Southern Ocean (IBCSO) is the authoritative map of the Southern Ocean, providing a raster bathymetric chart of \ndepths, currently at v2 in 2023. \n\nThe .tif format is slow, it is not a Cloud-Optimized GeoTIFF so we would like to demonstrate the benefits of that format. \n\nWe download bedrock, ice surface, and chart and convert to Cloud Optimized GeoTIFF and then host it\nat these urls: \n\n\n```\nhttps://github.com/mdsumner/ibcso-cog/raw/main/IBCSO_v2_ice-surface_cog.tif\n```\n\n```\nhttps://github.com/mdsumner/ibcso-cog/raw/main/IBCSO_v2_bed_cog.tif\n```\n\n```\nhttps://github.com/mdsumner/ibcso-cog/raw/main/IBCSO_v2_digital_chart_cog.tif\n```\n\nPrefix with `/vsicurl/` for general GDAL usage, and especially via the warper or RasterIO apis for fast access at any scale or region and in any crs. \n\n## Citation\n\n\u003e Dorschel, Boris; Hehemann, Laura; Viquerat, Sacha; Warnke, Fynn; Dreutter, Simon; Schulze Tenberge, Yvonne; Accettella, Daniela; An, Lu; Barrios, Felipe; Bazhenova, Evgenia A; Black, Jenny; Bohoyo, Fernando; Davey, Craig; de Santis, Laura; Escutia Dotti, Carlota; Fremand, Alice C; Fretwell, Peter T; Gales, Jenny A; Gao, Jinyao; Gasperini, Luca; Greenbaum, Jamin S; Henderson Jencks, Jennifer; Hogan, Kelly A; Hong, Jong Kuk; Jakobsson, Martin; Jensen, Laura; Kool, Johnathan; Larin, Sergei; Larter, Robert D; Leitchenkov, German L; Loubrieu, Benoît; Mackay, Kevin; Mayer, Larry; Millan, Romain; Morlighem, Mathieu; Navidad, Francisco; Nitsche, Frank-Oliver; Nogi, Yoshifumi; Pertuisot, Cécile; Post, Alexandra L; Pritchard, Hamish D; Purser, Autun; Rebesco, Michele; Rignot, Eric; Roberts, Jason L; Rovere, Marzia; Ryzhov, Ivan; Sauli, Chiara; Schmitt, Thierry; Silvano, Alessandro; Smith, Jodie E; Snaith, Helen; Tate, Alex J; Tinto, Kirsty; Vandenbossche, Philippe; Weatherall, Pauline; Wintersteller, Paul; Yang, Chunguo; Zhang, Tao; Arndt, Jan Erik (2022): The International Bathymetric Chart of the Southern Ocean Version 2 (IBCSO v2). PANGAEA, https://doi.org/10.1594/PANGAEA.937574\n\n\n\n\n## Creation (of the files above)\n\n```\nwget https://download.pangaea.de/dataset/937574/files/IBCSO_v2_ice-surface.tif\n\ngdal_translate IBCSO_v2_ice-surface.tif IBCSO_v2_ice-surface_cog.tif -of COG -co COMPRESS=ZSTD -co PREDICTOR=2 -co SPARSE_OK=YES -co OVERVIEW_RESAMPLING=AVERAGE -co BLOCKSIZE=480 -co NUM_THREADS=ALL_CPUS\n```\n\n```\nwget  https://download.pangaea.de/dataset/937574/files/IBCSO_v2_bed.tif\ngdal_translate IBCSO_v2_bed.tif IBCSO_v2_bed_cog.tif -of COG -co COMPRESS=ZSTD -co PREDICTOR=2 -co SPARSE_OK=YES -co OVERVIEW_RESAMPLING=AVERAGE -co BLOCKSIZE=480 -co NUM_THREADS=ALL_CPUS\n```\n\nSee below for notes on these options. \n\nSome comparisons on performance are shown below, please note that five quite different extractions from the COG url are timed for ~ 10-20 seconds, giving five quite different data configurations at different scales and in different projections. To do one of the five from the local copy of the current v2 .tif takes nearly 10 seconds on its own. \n\n\n```{r cog}\ndsn \u003c- \"/vsicurl/https://github.com/mdsumner/ibcso-cog/raw/main/IBCSO_v2_ice-surface_cog.tif\"\nlibrary(terra)\nr \u003c- rast(dsn)\n\n\nsystem.time({\nr1 \u003c- project(r, rast(), by_util = T)\ntemplate \u003c- rast(r)\nres(template) \u003c- res(r) * 20\n\n\n## this extent is one small part at the original resolution\n(r2 \u003c- project(r, rast(ext(c(0, 3e+05, 3400000, 3950000)), crs = crs(r), res = 500), by_util = TRUE))\n\n## these work very quickly\nr3 \u003c- project(r, rast(ext(-180, 180, -90, -50)), by_util = T)\nr4 \u003c- project(r, rast(ext(-180, 180, -90, -50), res = 1), by_util = T)\nr5 \u003c- project(r, rast(ext(-180, 180, -90, -50), res = .25), by_util = T)\n\n})\n\n## even if we use the local .tif, with the older format it's much slower\nrlocal \u003c- rast(\"IBCSO_v2_ice-surface.tif\")\n\nsystem.time(project(rlocal, template, by_util = T))\n\n```\n\nPlot the different extractions to show that they worked. \n\n```{r plots}\nplot(r1)\nplot(r2)\nplot(r3)\nplot(r4)\nplot(r5)\n\nplot(project(r, template, by_util = TRUE))\nplot(ext(r2), add = TRUE)\n```\n\n\nIn Python it's similar, we can do \n\n```python\nfrom osgeo import gdal\nds = gdal.Open(\"/vsicurl/https://github.com/mdsumner/ibcso-cog/raw/main/IBCSO_v2_ice-surface_cog.tif\")\n\nw = gdal.Warp(\"/vsimem/myfile.vrt\", ds, xRes = 10000, yRes = 10000)\nw.GetGeoTransform()\n# (-4800000.0, 10000.0, 0.0, 4800000.0, 0.0, -10000.0)\n\nw.ReadAsArray()\n#array([[-32768, -32768, -32768, ..., -32768, -32768, -32768],\n#       [-32768, -32768, -32768, ..., -32768, -32768, -32768],\n#       [-32768, -32768, -32768, ..., -32768, -32768, -32768],\n#       ...,\n#       [-32768, -32768, -32768, ..., -32768, -32768, -32768],\n#       [-32768, -32768, -32768, ..., -32768, -32768, -32768],\n#       [-32768, -32768, -32768, ..., -32768, -32768, -32768]], dtype=int16)\n\n\n```\n\n\n\n## Chart\n\nDigital chart version created from tif version of the PDF with\n\n```\ngdal_translate IBCSO_chart.tif IBCSO_v2_digital_chart.tif -of COG -a_ullr -4833000  4797000  4837000 -6629000 -a_srs EPSG:9354 \n```\n\n\n## gdal translate options\n\nWe chose options blocksize 480 so that the smallest overview would be that size (at 4800 we only end up with 2 overview levels). \n\nSPARSE_OK: ensures unused blocks are not stored (they are all 0, or nodata). \n\nCOMPRESS: could choose DEFLATE instead\n\nOVERVIEW_RESAMPLING: AVERAGE so that the average value is stored from higher resolution levels, not just a sample\n\nNUM_THREADS: this just makes it go faster (for the compression). \n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmdsumner%2Fibcso-cog","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmdsumner%2Fibcso-cog","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmdsumner%2Fibcso-cog/lists"}