Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: JuliaDataCubes/YAXArrayBase.jl
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v0.6.1
Choose a base ref
...
head repository: JuliaDataCubes/YAXArrayBase.jl
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: master
Choose a head ref

Commits on Feb 21, 2023

  1. Enable readblock of a GDALBand into subarrays

    This uses dispatch to use the previous version on proper Matrix aout
    and to use similar to construct a Matrix and to then use the Matrix based method.
    felixcremer committed Feb 21, 2023
    Copy the full SHA
    0922779 View commit details

Commits on Apr 21, 2023

  1. Merge pull request #20 from JuliaDataCubes/fc/gdalbandreadblock

    Enable readblock of a GDALBand into subarrays
    felixcremer authored Apr 21, 2023
    Copy the full SHA
    c9d7d6d View commit details

Commits on Jul 31, 2024

  1. Switch to extensions instead of requires for datasets (#24)

    * Switch to extensions instead of requires for datasets
    
    * Move all array interface implementations to extensions
    
    This moves everything from using Requires to the new extensions setup.
    
    * Switch the array tests to testitems
    
    This ensures, that the tests for different backends are independent.
    
    * Remove the Requires setup for lower julia versions
    
    We decided to only support julia versions larger than 1.9
    
    * Switch CI to test on julia 1.9 instead of 1.6
    
    When we restrict the Julia version to 1.9 we should also stop testing on 1.6
    
    * Remove Zarr and NetCDF as dependencies
    
    * Remove AxisIndices
    
    This seems to be not maintained anymore with the last commit three years ago
    
    * Stop tracking Manifest.toml
    
    * Remove AxisIndices also from test environment
    
    * Add testing on nightly
    
    * Bump version to 0.7.0
    felixcremer authored Jul 31, 2024
    4
    Copy the full SHA
    d779f74 View commit details

Commits on Aug 1, 2024

  1. Upgrade Zarr DD and NetCDF compats

    Adds Zarr 0.9
    NetCDF 0.12
    DimensionalData 0.27
    felixcremer committed Aug 1, 2024
    Copy the full SHA
    6ce0e57 View commit details
  2. Merge pull request #25 from JuliaDataCubes/fc/updeps

    Upgrade Zarr DD and NetCDF compats
    felixcremer authored Aug 1, 2024
    2
    Copy the full SHA
    77dd2e0 View commit details
  3. Bump version to 0.7.1

    felixcremer authored Aug 1, 2024
    2
    Copy the full SHA
    97d7fab View commit details

Commits on Sep 12, 2024

  1. fix gdal extension

    lazarusA committed Sep 12, 2024
    Copy the full SHA
    0526f0e View commit details
  2. tests

    lazarusA committed Sep 12, 2024
    Copy the full SHA
    09e1e6d View commit details

Commits on Sep 13, 2024

  1. do run_package_tests last

    lazarusA committed Sep 13, 2024
    Copy the full SHA
    127650b View commit details
  2. Merge pull request #26 from lazarusA/la/fix_gdal_extension

    fix gdal extension
    felixcremer authored Sep 13, 2024
    Copy the full SHA
    2d6f7d7 View commit details
  3. where to look

    lazarusA committed Sep 13, 2024
    Copy the full SHA
    5374348 View commit details
  4. new writeblock method

    lazarusA committed Sep 13, 2024
    Copy the full SHA
    f2d4e3e View commit details
  5. readblock chunk aware

    lazarusA committed Sep 13, 2024
    Copy the full SHA
    8b8205a View commit details
  6. cs chunks

    lazarusA committed Sep 13, 2024
    Copy the full SHA
    aa09c06 View commit details
  7. revisit eachchunk

    lazarusA committed Sep 13, 2024
    Copy the full SHA
    8b6f623 View commit details
  8. use eachchunk

    lazarusA committed Sep 13, 2024
    Copy the full SHA
    2853303 View commit details
  9. do less

    lazarusA committed Sep 13, 2024
    Copy the full SHA
    de4b919 View commit details
  10. filename

    lazarusA committed Sep 13, 2024
    Copy the full SHA
    370ea14 View commit details
  11. do open read

    lazarusA committed Sep 13, 2024
    Copy the full SHA
    1d350b1 View commit details
  12. do clipping

    lazarusA committed Sep 13, 2024
    Copy the full SHA
    d4fac9c View commit details
  13. clip range

    lazarusA committed Sep 13, 2024
    Copy the full SHA
    aaf2d23 View commit details

Commits on Sep 14, 2024

  1. adds method

    lazarusA committed Sep 14, 2024
    Copy the full SHA
    20d594b View commit details

Commits on Sep 16, 2024

  1. minimal working gdal writing

    lazarusA committed Sep 16, 2024
    Copy the full SHA
    827e37c View commit details
  2. comment

    lazarusA committed Sep 16, 2024
    Copy the full SHA
    674236c View commit details
  3. Merge pull request #27 from JuliaDataCubes/la/write_tif

    La/write tif
    lazarusA authored Sep 16, 2024
    Copy the full SHA
    65c0b13 View commit details
  4. update badges

    lazarusA committed Sep 16, 2024
    Copy the full SHA
    4637a9a View commit details
  5. bump compats

    lazarusA committed Sep 16, 2024
    Copy the full SHA
    64a6acd View commit details
  6. Merge pull request #28 from JuliaDataCubes/la/clean_badges

    La/clean badges
    lazarusA authored Sep 16, 2024
    2
    Copy the full SHA
    88475da View commit details
  7. patch DD

    lazarusA committed Sep 16, 2024
    Copy the full SHA
    f145b62 View commit details
  8. Merge pull request #29 from JuliaDataCubes/la/patch

    patch DD
    lazarusA authored Sep 16, 2024
    2
    Copy the full SHA
    3e6eb31 View commit details

Commits on Nov 8, 2024

  1. Update Project.toml

    DD breaking bump
    lazarusA authored Nov 8, 2024
    Copy the full SHA
    3146712 View commit details
  2. Update Project.toml

    bump version
    lazarusA authored Nov 8, 2024
    Copy the full SHA
    06afb13 View commit details
  3. Merge pull request #30 from JuliaDataCubes/lazarusA-patch-1

    Update Project.toml
    lazarusA authored Nov 8, 2024
    2
    Copy the full SHA
    7773192 View commit details

Commits on Nov 22, 2024

  1. Add option to persist handle to NetCDF files (#31)

    * add interface for keeping handles open for faster dataset opening
    
    * update tests
    
    * test on lts instead of 1.9
    
    * Add dependabot
    
    * test 1.10 since workflows are too old
    meggart authored Nov 22, 2024
    2
    Copy the full SHA
    2ebac48 View commit details

Commits on Nov 25, 2024

  1. Bump actions/checkout from 2 to 4 (#35)

    Bumps [actions/checkout](https://github.com/actions/checkout) from 2 to 4.
    - [Release notes](https://github.com/actions/checkout/releases)
    - [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
    - [Commits](actions/checkout@v2...v4)
    
    ---
    updated-dependencies:
    - dependency-name: actions/checkout
      dependency-type: direct:production
      update-type: version-update:semver-major
    ...
    
    Signed-off-by: dependabot[bot] <support@github.com>
    Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
    dependabot[bot] authored Nov 25, 2024
    Copy the full SHA
    65dbfcf View commit details
  2. Bump codecov/codecov-action from 1 to 5 (#34)

    Bumps [codecov/codecov-action](https://github.com/codecov/codecov-action) from 1 to 5.
    - [Release notes](https://github.com/codecov/codecov-action/releases)
    - [Changelog](https://github.com/codecov/codecov-action/blob/main/CHANGELOG.md)
    - [Commits](codecov/codecov-action@v1...v5)
    
    ---
    updated-dependencies:
    - dependency-name: codecov/codecov-action
      dependency-type: direct:production
      update-type: version-update:semver-major
    ...
    
    Signed-off-by: dependabot[bot] <support@github.com>
    Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
    dependabot[bot] authored Nov 25, 2024
    Copy the full SHA
    6fea0bc View commit details

Commits on Dec 17, 2024

  1. Bump julia-actions/setup-julia from 1 to 2 (#33)

    Bumps [julia-actions/setup-julia](https://github.com/julia-actions/setup-julia) from 1 to 2.
    - [Release notes](https://github.com/julia-actions/setup-julia/releases)
    - [Commits](julia-actions/setup-julia@v1...v2)
    
    ---
    updated-dependencies:
    - dependency-name: julia-actions/setup-julia
      dependency-type: direct:production
      update-type: version-update:semver-major
    ...
    
    Signed-off-by: dependabot[bot] <support@github.com>
    Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
    Co-authored-by: Fabian Gans <fgans@bgc-jena.mpg.de>
    dependabot[bot] and meggart authored Dec 17, 2024
    Copy the full SHA
    6a7701f View commit details
  2. Bump actions/cache from 1 to 4 (#32)

    Bumps [actions/cache](https://github.com/actions/cache) from 1 to 4.
    - [Release notes](https://github.com/actions/cache/releases)
    - [Changelog](https://github.com/actions/cache/blob/main/RELEASES.md)
    - [Commits](actions/cache@v1...v4)
    
    ---
    updated-dependencies:
    - dependency-name: actions/cache
      dependency-type: direct:production
      update-type: version-update:semver-major
    ...
    
    Signed-off-by: dependabot[bot] <support@github.com>
    Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
    dependabot[bot] authored Dec 17, 2024
    Copy the full SHA
    9ddb084 View commit details

Commits on May 3, 2025

  1. replace @info by @debug

    dr-ko committed May 3, 2025
    Copy the full SHA
    b192037 View commit details
  2. Copy the full SHA
    08f046c View commit details

Commits on May 9, 2025

  1. Add MutliDatasets

    meggart committed May 9, 2025
    Copy the full SHA
    222292b View commit details
  2. Copy the full SHA
    52297a0 View commit details
  3. Update Project.toml

    meggart authored May 9, 2025
    2
    Copy the full SHA
    7341c3b View commit details
7 changes: 7 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates
version: 2
updates:
- package-ecosystem: "github-actions"
directory: "/" # Location of package manifests
schedule:
interval: "weekly"
11 changes: 6 additions & 5 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
@@ -13,21 +13,22 @@ jobs:
fail-fast: false
matrix:
version:
- '1.6'
- '1.10'
- '1'
- 'nightly'
os:
- ubuntu-latest
- macOS-latest
- windows-latest
arch:
- x64
steps:
- uses: actions/checkout@v2
- uses: julia-actions/setup-julia@v1
- uses: actions/checkout@v4
- uses: julia-actions/setup-julia@v2
with:
version: ${{ matrix.version }}
arch: ${{ matrix.arch }}
- uses: actions/cache@v1
- uses: actions/cache@v4
env:
cache-name: cache-artifacts
with:
@@ -40,6 +41,6 @@ jobs:
- uses: julia-actions/julia-buildpkg@v1
- uses: julia-actions/julia-runtest@v1
- uses: julia-actions/julia-processcoverage@v1
- uses: codecov/codecov-action@v1
- uses: codecov/codecov-action@v5
with:
file: lcov.info
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
.vscode
*.jl.cov
*.jl.*.cov
*.jl.mem
/deps/deps.jl
/docs/build
Manifest.toml
105 changes: 0 additions & 105 deletions Manifest.toml

This file was deleted.

32 changes: 27 additions & 5 deletions Project.toml
Original file line number Diff line number Diff line change
@@ -1,16 +1,38 @@
name = "YAXArrayBase"
uuid = "90b8fcef-0c2d-428d-9c56-5f86629e9d14"
authors = ["Fabian Gans <fgans@bgc-jena.mpg.de>"]
version = "0.6.1"
version = "0.7.6"

[deps]
DataStructures = "864edb3b-99cc-5e75-8d2d-829cb0a9cfe8"
Dates = "ade2ca70-3891-5945-98fb-dc099432e06a"
Downloads = "f43a241f-c20a-4ad4-852c-f6b1247861c6"
Requires = "ae029012-a4dd-5104-9daa-d747884805df"


[compat]
DataStructures = "0.17, 0.18"
Requires = "1"
julia = "1.6"
DataStructures = "0.17,0.18"
julia = "1.9"
ArchGDAL = "0.10"
AxisArrays = "0.4"
AxisKeys = "0.2"
DimensionalData = "0.27, 0.28, 0.29"
NetCDF = "0.11, 0.12"
Zarr = "0.8, 0.9"

[extensions]
ArchGDALExt = "ArchGDAL"
AxisArraysExt = "AxisArrays"
AxisKeysExt = "AxisKeys"
DimensionalDataExt = "DimensionalData"
NamedDimsExt = "NamedDims"
NetCDFExt = "NetCDF"
ZarrExt = "Zarr"

[weakdeps]
ArchGDAL = "c9ce4bd3-c3d5-55b8-8973-c0e20141b8c3"
AxisArrays = "39de3d68-74b9-583c-8d2d-e117c070f3a9"
AxisKeys = "94b1ba4f-4ee9-5380-92f1-94cde586c3c5"
DimensionalData = "0703355e-b756-11e9-17c0-8b28908087d0"
NamedDims = "356022a1-0364-5f58-8944-0da4b18d706f"
NetCDF = "30363a11-5582-574a-97bb-aa9a979735b9"
Zarr = "0a941bbe-ad1d-11e8-39d9-ab76183a1d99"
12 changes: 5 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,10 @@
# YAXArrayBase.jl

![Lifecycle](https://img.shields.io/badge/lifecycle-maturing-blue.svg)<!--
![Lifecycle](https://img.shields.io/badge/lifecycle-stable-green.svg)
![Lifecycle](https://img.shields.io/badge/lifecycle-retired-orange.svg)
![Lifecycle](https://img.shields.io/badge/lifecycle-archived-red.svg)
![Lifecycle](https://img.shields.io/badge/lifecycle-dormant-blue.svg) -->
[![Build Status](https://travis-ci.com/JuliaDataCubes/YAXArrayBase.jl.svg?branch=master)](https://travis-ci.com/JuliaDataCubes/YAXArrayBase.jl)
[![codecov.io](http://codecov.io/github/JuliaDataCubes/YAXArrayBase.jl/coverage.svg?branch=master)](http://codecov.io/github/JuliaDataCubes/YAXArrayBase.jl?branch=master)
![Lifecycle](https://img.shields.io/badge/lifecycle-maturing-blue.svg)
[![][codecov-img]][codecov-url]

[codecov-img]: https://codecov.io/gh/JuliaDataCubes/YAXArrayBase.jl/branch/master/graph/badge.svg
[codecov-url]: https://codecov.io/gh/JuliaDataCubes/YAXArrayBase.jl

# YAXArrayBase

99 changes: 99 additions & 0 deletions ext/ArchGDALExt/ArchGDALExt.jl
Original file line number Diff line number Diff line change
@@ -0,0 +1,99 @@
module ArchGDALExt
import ArchGDAL: RasterDataset, AbstractRasterBand, getgeotransform, width, height
import ArchGDAL: getname, getcolorinterp, getband, nraster, getdataset
using ArchGDAL: ArchGDAL as AG

import ArchGDAL.DiskArrays: GridChunks, eachchunk
import ArchGDAL.DiskArrays

import YAXArrayBase: dimname, dimnames, dimvals, iscontdim, getattributes, getdata, yaxcreate
import YAXArrayBase: YAXArrayBase as YAB
using DataStructures: OrderedDict

include("archgdaldataset.jl")

function dimname(a::RasterDataset, i)
if i == 1
return :Y
elseif i == 2
return :X
elseif i == 3
return :Band
else
error("RasterDataset only has 3 dimensions")
end
end
function dimvals(a::RasterDataset, i)
if i == 1
geo=getgeotransform(a)
latr = range(geo[1],length=width(a), step=geo[2])
elseif i == 2
geo=getgeotransform(a)
range(geo[4],length=height(a), step=geo[6])
elseif i == 3
colnames = map(ib -> getname(getcolorinterp(getband(a,ib))),1:nraster(a))
if !allunique(colnames)
colnames = string.("Band_",1:nraster(a))
end
colnames
else
error("RasterDataset only has 3 dimensions")
end
end

iscontdim(a::RasterDataset, i) = i < 3 ? true : nraster(a)<8
function getattributes(a::RasterDataset)
globatts = Dict{String,Any}(
"projection_PROJ4"=>AG.toPROJ4(AG.newspatialref(AG.getproj(a))),
"projection_WKT"=>AG.toWKT(AG.newspatialref(AG.getproj(a))),
)
bands = (getbandattributes(AG.getband(a, i)) for i in 1:size(a, 3))
allbands = mergewith(bands...) do a1,a2
isequal(a1,a2) ? a1 : missing
end
return merge(globatts, allbands)
end


function dimname(::AbstractRasterBand, i)
if i == 1
return :Y
elseif i == 2
return :X
else
error("RasterDataset only has 3 dimensions")
end
end
function dimvals(b::AbstractRasterBand, i)
geo = getgeotransform(getdataset(b))
if i == 1
range(geo[1],length=width(b), step=geo[2])
elseif i == 2
range(geo[4],length=height(b), step=geo[6])
else
error("RasterDataset only has 3 dimensions")
end
end
iscontdim(a::AbstractRasterBand, i) = true
function getattributes(a::AbstractRasterBand)
atts = getattributes(AG.RasterDataset(AG.getdataset(a)))
bandatts = getbandattributes(a)
return merge(atts, bandatts)
end

function insertattifnot!(attrs, val, name, condition)
if !condition(val)
attrs[name] = val
end
end
function getbandattributes(a::AbstractRasterBand)
atts = Dict{String,Any}()
catdict = Dict((i-1)=>v for (i,v) in enumerate(AG.getcategorynames(a)))
insertattifnot!(atts, AG.getnodatavalue(a), "missing_value", isnothing)
insertattifnot!(atts, catdict, "labels", isempty)
insertattifnot!(atts, AG.getunittype(a), "units", isempty)
insertattifnot!(atts, AG.getoffset(a), "add_offset", iszero)
insertattifnot!(atts, AG.getscale(a), "scale_factor", x->isequal(x, one(x)))
return atts
end
end
Loading