Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Access to RasterDataSources could give error that indicates that ArchGDAL needs to be loaded in 0.8 #468

Closed
felixcremer opened this issue Jun 14, 2023 · 3 comments

Comments

@felixcremer
Copy link
Contributor

In Rasters 0.8 I get the following error, when I try to load a file from RasterDataSources:

julia> A = Raster(WorldClim{BioClim}, 5)
ERROR: MethodError: no method matching Raster(::Type{WorldClim{BioClim}}, ::Int64)

Closest candidates are:
  Raster(::Any, ::Tuple; name, kw...)
   @ Rasters ~/.julia/packages/Rasters/IELXJ/src/array.jl:282
  Raster(::Any, ::AbstractString)
   @ Rasters ~/.julia/packages/Rasters/IELXJ/src/array.jl:308
  Raster(::Any, ::AbstractString, ::Any; crs, mappedcrs, dims, refdims, name, metadata, missingval, source, write, lazy, dropband)
   @ Rasters ~/.julia/packages/Rasters/IELXJ/src/array.jl:308

Stacktrace:
 [1] top-level scope
   @ REPL[151]:1

This is working in 0.7.

@felixcremer
Copy link
Contributor Author

Ok, this is only broken when I haven't loaded ArchGDAL, but it would be nice to get a error message indicating that I need to load ArchGDAL.

@felixcremer felixcremer changed the title Access to RasterDataSources broken in 0.8 Access to RasterDataSources could give error that indicates that ArchGDAL needs to be loaded in 0.8 Jun 14, 2023
@rafaqz
Copy link
Owner

rafaqz commented Jun 14, 2023

It should need both RasterDataSources and ArchGDAL.

But to make a better error, its not easy to get at that method using dispatch without having the supertypes avalable. Its also not clear from the signature if you need ArchGDAL or NCDatasets.

If you can work out how to do it a PR would be nice.

@rafaqz
Copy link
Owner

rafaqz commented Jul 29, 2023

This is implemented now

@rafaqz rafaqz closed this as completed Jul 29, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants