yeesian / ArchGDAL.jl

A high level API for GDAL - Geospatial Data Abstraction Library
https://yeesian.github.io/ArchGDAL.jl/stable/
Other
142 stars 26 forks source link

Bidirectional conversion between `GDALDataType` and `ImageCore.Normed` via `UnionAll` case in `@convert` macro #237

Closed mathieu17g closed 3 years ago

mathieu17g commented 3 years ago

Fixes #235

I have handled the bidirectional conversion between ArchGDAL.GDALDataType and ImageCore.Normed via UnionAll case in @convert macro

It gives:

julia> using ArchGDAL

julia> using ImageCore

julia> convert(ArchGDAL.GDALDataType, N0f8)
GDT_Byte::GDALDataType = 1

julia> convert(Normed, ArchGDAL.GDT_Byte)
N0f8 (alias for Normed{UInt8, 8})
yeesian commented 3 years ago

Thanks!