Git Product home page Git Product logo

gdal.jl's Introduction

GDAL.jl

CI

Julia wrapper for GDAL - Geospatial Data Abstraction Library. This package is a binding to the C API of GDAL/OGR. It provides only a C style usage, where resources must be closed manually, and datasets are pointers.

Other packages can build on top of this to provide a more Julian user experience. See for example ArchGDAL.jl.

Most users will want to use ArchGDAL.jl instead of using GDAL.jl directly.

Installation

This package is registered, so add it using Pkg. This will also download GDAL binaries created in Yggdrasil.

pkg> add GDAL

To check if it is installed correctly, you could run the test suite with:

pkg> test GDAL

Documentation

Docstrings are automatically inserted from the GDAL documentation. Note that these are written for the C API, so function names and argument type names will differ.

julia> using GDAL

help?> GDAL.ogr_g_creategeometry
  OGR_G_CreateGeometry(OGRwkbGeometryType eGeometryType) -> OGRGeometryH

  Create an empty geometry of desired type.

  Parameters
  ––––––––––––

    •    eGeometryType: the type code of the geometry to be created.

  Returns
  –––––––––

  handle to the newly create geometry or NULL on failure. Should be freed with OGRGDestroyGeometry() after use.

Further usage documentation is not yet available, but the files test/tutorial_raster.jl and test/tutorial_vector.jl should provide a good hint based on the API tutorials from GDAL.org.

The bulk of this package is generated automatically by the scripts under gen/.

Using the GDAL and OGR utilities

The provided GDAL installation also contains the commonly used utilities such as gdal_translate and ogr2ogr. They can be called from Julia like so:

using GDAL_jll

# list information about a raster dataset
run(`$(gdalinfo_path()) path/to/raster-file`)

# convert raster data between different formats
run(`$(gdal_translate_path()) -of COG input.asc output.tif`)

# list information about an OGR-supported data source
run(`$(ogrinfo_path()) path/to/vector-file`)

# convert simple features data between file formats
run(`$(ogr2ogr_path()) -f FlatGeobuf output.fgb input.shp`)

The <util>_path functions are exported from the GDAL_jll package. If you only wish to run the utilities, that package will have all you need. If you are using the GDAL package, they are also available as GDAL.<util>_path. A list of the available utilities can be found here. Documentation for them is available on gdal.org/programs. Note that programs implemented in Python (ending in .py) are not available, since those would require a Python installation.

Since GDAL 2.1's RFC59.1 most utilities are also available as functions in the library, they are implemented here and tested here. If these are used you can avoid the need for calling the binaries.

If you want to use these utilities from outside julia, note that this will not work unless you set two things:

  1. The environment variable GDAL_DATA must be set to the value returned in julia by GDAL.GDAL_DATA[].
  2. Julia's Sys.BINDIR must be in your path.

Inside of julia (2) is always the case, and (1) happens on loading the GDAL module, in its __init__ function.

Missing driver to support a format

If you get an error such as the one below:

GDALError (CE_Failure, code 6):
    The <...> driver needs to be compiled to support <...>

This means that the GDAL binaries you are using, which normally come from the Yggdrasil community build tree, are not compiled with support for the format or feature you need. GDAL is a large library with many optional dependencies which allow support for more formats. Currently the amount of formats supported is still limited, but will grow over time. Lists of available formats can be found here for rasters and here for vectors. If you need support for another format, consider making an issue in this repository. Many formats need external libraries as added dependencies. This means an Yggdrasil build also needs to be available for that library, and added as a dependency. See issue #65 for a discussion on which new drivers should be prioritized.

In general GDAL format support will be the same across platforms. HDF5 and netCDF are the exception to this rule, since they are only available on the major platforms for now.

gdal.jl's People

Contributors

dependabot[bot] avatar evetion avatar felixcremer avatar femtocleaner[bot] avatar github-actions[bot] avatar joa-quim avatar juliatagbot avatar mathieu17g avatar maxfreu avatar meggart avatar melonedo avatar rafaqz avatar simondanisch avatar visr avatar yeesian avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

gdal.jl's Issues

Failure to find libc++.1.dylib on macOS Catalina

I put the following code into a file named demo.jl (it's in the code format markers but doesn't seem to show up quite right, sorry):

using GDAL

my_state = "Colorado"
shapefile1 = "./data/cb_2019_us_county_5m.shp"
jsonfile1 = "./data/cb_2019_us_county_5m.json"

US_cty_shapefile_url = "https://www2.census.gov/geo/tiger/GENZ2019/shp/cb_2019_us_county_5m.zip"
US_cty_shapefile_path = "./US_cty_shapefile.zip"

cmd = `curl $(US_cty_shapefile_url)`
run(pipeline(cmd,stdout=US_cty_shapefile_path))
run(`unzip $(split(US_cty_shapefile_path,"/")[end])`)

GDAL.ogr2ogr_path() do cli
    run(`$cli -f "GeoJSON" $jsonfile1 $shapefile1`)
end

I then executed it by: julia demo.jl (with Julia 1.5.1; I also have the current version of GDAL.jl).

This produces the following error output:

dyld: Library not loaded: @rpath/libc++.1.dylib
  Referenced from: /Users/rick/.julia/artifacts/4c9559a6a697463e61ee7ecada09af2737703660/lib/libgeos_c.1.dylib
  Reason: image not found
ERROR: LoadError: failed process: Process(`/Users/rick/.julia/artifacts/811ee94aeaf8b8919ffc00aa7258a9db3cc5ba95/bin/ogr2ogr -f GeoJSON ./data/cb_2019_us_county_5m.json ./data/cb_2019_us_county_5m.shp`, ProcessSignaled(6)) [0]

Stacktrace:
 [1] pipeline_error at ./process.jl:525 [inlined]
 [2] run(::Cmd; wait::Bool) at ./process.jl:440
 [3] run at ./process.jl:438 [inlined]
 [4] (::var"#1#2")(::String) at /Users/rick/src/covid19_model/plotting/demo.jl:16
 [5] #2 at /Users/rick/.julia/packages/JLLWrappers/KuIwt/src/runtime.jl:49 [inlined]
 [6] withenv(::JLLWrappers.var"#2#3"{var"#1#2",String}, ::Pair{String,String}, ::Vararg{Pair{String,String},N} where N) at ./env.jl:161
 [7] withenv_executable_wrapper(::var"#1#2", ::String, ::String, ::String, ::Bool, ::Bool) at /Users/rick/.julia/packages/JLLWrappers/KuIwt/src/runtime.jl:48
 [8] #invokelatest#1 at ./essentials.jl:710 [inlined]
 [9] invokelatest at ./essentials.jl:709 [inlined]
 [10] #ogr2ogr_path#22 at /Users/rick/.julia/packages/JLLWrappers/KuIwt/src/products/executable_generators.jl:7 [inlined]
 [11] ogr2ogr_path(::Function) at /Users/rick/.julia/packages/JLLWrappers/KuIwt/src/products/executable_generators.jl:7
 [12] top-level scope at /Users/rick/src/covid19_model/plotting/demo.jl:15
 [13] include(::Function, ::Module, ::String) at ./Base.jl:380
 [14] include(::Module, ::String) at ./Base.jl:368
 [15] exec_options(::Base.JLOptions) at ./client.jl:296
 [16] _start() at ./client.jl:506

Disambiguate create() functions

Relevant lines: https://github.com/visr/GDAL.jl/blob/master/src/ogr_api.jl#L2348-L236 and https://github.com/visr/GDAL.jl/blob/master/src/ogr_api.jl#L2764-L2766

To be consistent with fld_create, and gfld_create (create is too general a name, and might have conflicts with creating other GDAL objects). I think we should add ogr_fd_create and ogr_f_create to the list at https://github.com/visr/GDAL.jl/blob/master/gen/rewriter.jl#L24-L26, and rerun the rewriter code.

Binarybuild installation fails on macOS

GDAL doesn't install on macOS, failing on the building part.

julia> Pkg.build("GDAL")
INFO: Building CodecZlib
INFO: Building Proj4
INFO: Building LibGEOS
INFO: Building GDAL
==================================================================================================[ ERROR: GDAL ]===================================================================================================

LoadError: BinaryProvider.LibraryProduct(nothing, String["libgdal"], :libgdal, "Prefix(/Users/epta/.julia/v0.6/GDAL/deps/usr)") is not satisfied, cannot generate deps.jl!
while loading /Users/epta/.julia/v0.6/GDAL/deps/build.jl, in expression starting on line 56

====================================================================================================================================================================================================================

The problem lies in the binary build, the libgdal.dylib cannot be loaded because its depencies cannot be found. The following lines prevent it for Linux, but not for macOS: https://github.com/JuliaGeo/GDAL.jl/blob/master/deps/build.jl#L46

julia> Libdl.dlopen("libgdal")
ERROR: could not load library "libgdal"
dlopen(libgdal.dylib, 1): Library not loaded: @rpath/libproj.12.dylib
  Referenced from: /Users/epta/.julia/v0.6/GDAL/deps/usr/lib/libgdal.20.dylib
  Reason: image not found
Stacktrace:
 [1] dlopen(::String, ::UInt32) at ./libdl.jl:97 (repeats 2 times)

libgdal not defined on linux machine Julia 1.1.0

Hi all. I'm using Julia 1.1.0 on a Linux machine. I am installing a package which has GDAL as a dependency. I've been trying to get GDAL to work, but when I run ] test GDAL I get; ERROR: LoadError: InitError: UndefVarError: libgdal not defined . I also get the warning that platform_key() has been deprecated when I try to ]build GDAL in the REPL. Is there reason for this error. I installed Julia 1.1.0 from tarball with and without deps and still seem to get this error. Any help would be appreciated.

free Ptr{Cstring} when we need to.

Came up in #75 (comment).
We currently never free the memory, resulting in a (probably small) memory leak.

In aftercare(::Ptr{Cstring}) we should free this at least in the case of CPLGetConfigOptions, but we should probably review all functions that return Ptr{Cstring}

See also 259a27c

Relax ccall to take in Ptr{Ptr{UInt8}} instead of Ptr{Cstring}

Regarding https://github.com/visr/GDAL.jl/blob/master/test/tutorial_raster.jl#L74-L87

C functions that take an argument of the type char** can be called by using a Ptr{Ptr{UInt8}} type within Julia. For example, C functions of the form:

int main(int argc, char **argv);

can be called via the following Julia code:

argv = [ "a.out", "arg1", "arg2" ]
ccall(:main, Int32, (Int32, Ptr{Ptr{UInt8}}), length(argv), argv)

in http://docs.julialang.org/en/release-0.4/manual/calling-c-and-fortran-code/

I have verified it to work, and find it convenient to have a typealias StringList Ptr{Ptr{UInt8}}. Find all occurrences here: https://github.com/yeesian/ArchGDAL.jl/search?utf8=%E2%9C%93&q=StringList

Relax null checking for certain methods

I'm not sure if null checking should be performed (forcing downstream packages/users to wrap everything in a try-catch block) for cases in which you are expecting a null pointer to be returned. Case in point: https://github.com/visr/GDAL.jl/blob/master/src/ogr_api.jl#L3997-L4010

This came up when I was writing iterators for OGR feature layers, e.g. https://github.com/yeesian/GDALUtils.jl/blob/master/test/data1a.jl#L7-L13. I ended up using the C API instead: https://github.com/yeesian/GDALUtils.jl/blob/master/src/iteration.jl#L7-L8.

cc @visr @meggart

vector tutorial

When I run the vector tutorial, the point does not actually get written to the shapefile.
Adding this line made it work for me:
GDAL.createfeature(layer,feature)

redo `src/common.jl`

Currently src/common.jl is almost identical to src/C/common.jl, containing a lot of typealiases to UInt and many constants declared.

This can probably be reworked into a cleaner interface, as brought up by @yeesian here:
#12 (comment)

Use a GDAL+PROJ (from GMT) build with VisualStudio

Hi,
I'm not really sure how to proceed with this one. Ideally it should be a PR but it probably involves more knowledge on julia building pacakges that I have. So I provide it as an example on how we can make GDAL.jl use the full GDAL (3) build that comes with the GMT installer for Windows. Currently in a RC4 stage but soon an official release.

After installing it Windows user have a rather complete GDAL3+PROJ6.2 package ready available for use. So Windows julia users would benefit if they could use it instead of installing an extra 500 Mb package that has less drivers.

As example I modified GDAL.jl (attached) to use that GDAL version, but only if it's found via path. Besides this it's also necessary to edit test\gdal_utils.jl and wrap the line 168 with a try block because the GMT+GDAL build does not create .aux.xml files by default

try
    rm("data/utmtiny.asc.aux.xml")
catch
end

with that the tests pass

(v1.1) pkg> test GDAL
   Testing GDAL
    Status `C:\tmp\jl_83F.tmp\Manifest.toml`
  [b99e7846] BinaryProvider v0.5.6
  [add2ef01] GDAL v0.2.0
  [2a0f44e3] Base64  [`@stdlib/Base64`]
  [8ba89e20] Distributed  [`@stdlib/Distributed`]
  [b77e0a4c] InteractiveUtils  [`@stdlib/InteractiveUtils`]
  [8f399da3] Libdl  [`@stdlib/Libdl`]
  [56ddb016] Logging  [`@stdlib/Logging`]
  [d6f4376e] Markdown  [`@stdlib/Markdown`]
  [9a3f8284] Random  [`@stdlib/Random`]
  [ea8e919c] SHA  [`@stdlib/SHA`]
  [9e88b42a] Serialization  [`@stdlib/Serialization`]
  [6462fe0b] Sockets  [`@stdlib/Sockets`]
  [8dfed614] Test  [`@stdlib/Test`]
┌ Info: GDAL 3.1.0dev, released 2019/99/99
│ 220 GDAL drivers found
└ 84 OGR drivers found
   Testing GDAL tests passed

It would be nice if this solution could be integrated in the GDAL.jl official package, but in case you agree I will need you help to finish it.

Joaquim

GDAL.zip

jp2 driver missing?

Hi,
I get this error message when I try to open a jp2 file:

ERROR: GDALError (CE_Failure, code 4):
	`L2A_T29UMV_20160926T115352_B02_10m.jp2' not recognized as a supported file format.

How can I fix this? I use Linux Ubuntu 16.04.
Thank you
Bjoern

Windows 32 bit tests pass but error

Not sure what is going on on Windows 32 bit. Tests all pass but then it crashes after the finish line, example below from https://ci.appveyor.com/project/JuliaGeo/gdal-jl/builds/24973500/job/tf11acgfts0oig0i

I set 32 bit on AppVeyor to allowed failure.

   Testing GDAL
 Resolving package versions...
┌ Info: GDAL 3.0.0, released 2019/05/05
│ 174 GDAL drivers found
└ 56 OGR drivers found
[ Info: 1
[ Info: 2
[ Info: 3
[ Info: 4
[ Info: 5
[ Info: 6
[ Info: 7
Test Summary: | Pass  Total
GDAL          |   86     86
ERROR: Package GDAL errored during testing
Stacktrace:
 [1] pkgerror(::String, ::Vararg{String,N} where N) at C:\cygwin\home\Administrator\buildbot\worker\package_win32\build\usr\share\julia\stdlib\v1.0\Pkg\src\Types.jl:120
 [2] #test#65(::Bool, ::Function, ::Pkg.Types.Context, ::Array{Pkg.Types.PackageSpec,1}) at C:\cygwin\home\Administrator\buildbot\worker\package_win32\build\usr\share\julia\stdlib\v1.0\Pkg\src\Operations.jl:1357
 [3] #test at C:\cygwin\home\Administrator\buildbot\worker\package_win32\build\usr\share\julia\stdlib\v1.0\Pkg\src\API.jl:0 [inlined]
 [4] #test#44(::Bool, ::Base.Iterators.Pairs{Union{},Union{},Tuple{},NamedTuple{(),Tuple{}}}, ::Function, ::Pkg.Types.Context, ::Array{Pkg.Types.PackageSpec,1}) at C:\cygwin\home\Administrator\buildbot\worker\package_win32\build\usr\share\julia\stdlib\v1.0\Pkg\src\API.jl:278
 [5] #test#43 at .\none:0 [inlined]
 [6] #test at .\none:0 [inlined]
 [7] #test#40 at C:\cygwin\home\Administrator\buildbot\worker\package_win32\build\usr\share\julia\stdlib\v1.0\Pkg\src\API.jl:257 [inlined]
 [8] (::getfield(Pkg.API, Symbol("#kw##test")))(::NamedTuple{(:coverage,),Tuple{Bool}}, ::typeof(Pkg.API.test)) at .\none:0
 [9] top-level scope at none:0
Command exited with code 1

error handler not properly reset

Below example shows that getdriverbyname for non supported drivers returns null and doesn't throw. So far so good, this is apparently GDAL behavior since it is wrapped in failsafe. Calling getdrivershortname on this non existent driver does throw an error, fine. But then when I go back to getdriverbyname it does throw. Seems like while handling the GDAL error in error.jl, we don't properly reset the error state.

julia> using GDAL

julia> GDAL.allregister()

julia> driver = GDAL.getdriverbyname("ECW")
Ptr{GDAL.GDALDriverH} @0x0000000000000000

julia> driver = GDAL.getdriverbyname("ECW")
Ptr{GDAL.GDALDriverH} @0x0000000000000000

julia> driver = GDAL.getdriverbyname("NetCDF")
Ptr{GDAL.GDALDriverH} @0x0000000000000000

julia> GDAL.getdrivershortname(driver)
ERROR: GDALError (CE_Failure, code 10):
        Pointer 'hDriver' is NULL in 'GDALGetDriverShortName'.


Stacktrace:
 [1] gdaljl_errorhandler(::GDAL.CPLErr, ::Int32, ::Cstring) at C:\Users\visser_mn\.julia\dev\GDAL\src\error.jl:26
 [2] getdrivershortname(::Ptr{GDAL.GDALDriverH}) at C:\Users\visser_mn\.julia\dev\GDAL\src\gdal_h.jl:538
 [3] top-level scope at none:0

julia> driver = GDAL.getdriverbyname("NetCDF")
ERROR: GDALError (CE_Failure, code 10):
        Pointer 'hDriver' is NULL in 'GDALGetDriverShortName'.


Stacktrace:
 [1] failsafe(::Ptr{GDAL.GDALDriverH}) at C:\Users\visser_mn\.julia\dev\GDAL\src\error.jl:34
 [2] getdriverbyname(::String) at C:\Users\visser_mn\.julia\dev\GDAL\src\gdal_h.jl:398
 [3] top-level scope at none:0

Can not build on Julia 1.2 - Windows 10

I get the following error:

ERROR: Can not create symbolic link : A required privilege is not held by the client.

This looks like a similar issue to this one in another package.

The problem would appear to be that in Windows, there is no way of creating symlinks without admin privileges. The work-around of switching to Developer Mode also requires elevated privileges.

A "dirty hack" (their words, not mine) is offered towards the end of the linked issue.

Windows 32 bit support

AppVeyor tests are failing on 32 bits:

LoadError: could not load symbol "GDALVersionInfo"

Looking at the 32 bit DLL is see it's called _GDALVersionInfo@4 instead. This should not be a problem if we add the argument stdcall to ccall as explained here. I guess a solution would be doing this everywhere it is needed, but that's not very pretty.

Alternatively, if we make use of this setting in GDAL's nmake.opt:

# If you don't want some entry points to have STDCALL conventions, 
# comment out the following and add -DCPL_DISABLE_STDCALL in OPTFLAGS.
# This option has no effect on 64-bit windows.
STDCALL=YES

I guess we could fix it by only changing the build. But then how do we do approach that?

Anyhow this is just a braindump of what I found trying to add support for 32 bit Windows, I'll stop here for now. But other ideas are welcome.

getattrvalue can be avoid throw expection and more julia way

function getattrvalue(hSRS::Ref{OGRSpatialReferenceH}, pszName, iChild::Integer)

return unsafe_string directly, if the result ccall returned is NULL, unsafe_string throw exception:

ERROR: ArgumentError: cannot convert NULL to string

call getattrvalue function need to handle exception,not easy to use.

I think getattrvalue function can add a judgment when returning, avoid to throw exception:

function getattrvalue(hSRS::Ref{OGRSpatialReferenceH}, pszName, iChild::Integer)
    result = ccall((:OSRGetAttrValue, libgdal), Cstring, (Ptr{Cvoid}, Cstring, Cint), hSRS, pszName, iChild)
    result != Cstring(Ptr{UInt8}(0)) ? unsafe_string(result) : nothing
end

I can call getattrvalue function by this way:

if getattrvalue(...) != nothing
...
else
...
end

or
getattrvalue(...) != nothing && ...

Instead of handling exceptions, do you think so ?

GDAL build/installation error on Windows 10 64-bit

Added GDAL, but trying to use/build it produced error messages:
ERROR: Can not create symbolic link : A required privilege is not held by the client. : .julia\packages\GDAL\vec6Y\deps\usr\bin\libz.dll
ERROR: Can not create symbolic link : A required privilege is not held by the client. : .julia\packages\GDAL\vec6Y\deps\usr\bin\libz-1.dll

Saw threads on github that recommended using CodecZlib.jl instead of Libz.jl, so downloaded that. Saw that sourcebuild function at end of CodecZlib package's build file (.julia\packages\CodecZlib\wwgbh\deps\build.jl) contained "simple source build fallback for platforms not supported by BinaryBuilder." Circumvented GDAL installation errors by substituting that code for "Install unsatisfied or updated dependencies" code at end of GDAL build files. Recommend updating GDAL build files to use "simple source build fallback" code.

#############################################################################

Code that DOES NOT work

Included at end of GDAL build files:

.julia\packages\GDAL\vec6Y\deps\build_GEOS.v3.6.2.jl

.julia\packages\GDAL\vec6Y\deps\build_PROJ.v4.9.3.jl

.julia\packages\GDAL\vec6Y\deps\build_Zlib.v1.2.11.jl

#############################################################################

Install unsatisfied or updated dependencies:

unsatisfied = any(!satisfied(p; verbose=verbose) for p in products)
if haskey(download_info, platform_key())
url, tarball_hash = download_info[platform_key()]
if unsatisfied || !isinstalled(url, tarball_hash; prefix=prefix)
# Download and install binaries
install(url, tarball_hash; prefix=prefix, force=true, verbose=verbose)
end
elseif unsatisfied
# If we don't have a BinaryProvider-compatible .tar.gz to download, complain.
# Alternatively, you could attempt to install from a separate provider,
# build from source or something even more ambitious here.
error("Your platform $(triplet(platform_key())) is not supported by this package!")
end

Write out a deps.jl file that will contain mappings for our products

write_deps_file(joinpath(@DIR, "deps.jl"), products)

#############################################################################

Code that works

Extracted from end of .julia\packages\CodecZlib\wwgbh\deps\build.jl

#############################################################################

A simple source build fallback for platforms not supported by BinaryBuilder

Assumes that tar, GNU make, and a C compiler are available

function sourcebuild()
srcdir = joinpath(@DIR, "src")
libdir = joinpath(@DIR, "lib")
z = "zlib-1.2.11"
for d = [srcdir, libdir]
isdir(d) && rm(d, force=true, recursive=true)
mkpath(d)
end
download("https://zlib.net/$(z).tar.gz", joinpath(srcdir, "$(z).tar.gz"))
cd(srcdir) do
run(tar xzf $(z).tar.gz)
end
cd(joinpath(srcdir, z)) do
run(./configure --prefix=.)
make = Sys.isbsd() ? gmake : make
run($make -j$(Sys.CPU_CORES))
end
found = false
for f in readdir(joinpath(srcdir, z))
if startswith(f, "libz." * Libdl.dlext)
found = true
cp(joinpath(srcdir, z, f), joinpath(libdir, f), force=true)
end
end
found || error("zlib was unable to build properly")
libz = joinpath(libdir, "libz." * Libdl.dlext)
open(joinpath(@DIR, "deps.jl"), "w") do io
println(io, """
function check_deps()
ptr = Libdl.dlopen_e("$libz")
loaded = ptr != C_NULL
Libdl.dlclose(ptr)
if !loaded
error("Unable to load zlib from $libz. Please rerun " *
"Pkg.build(\\"CodecZlib\\") and restart Julia.")
end
end
const libz = "$libz"
""")
end
end

dobuild = try
key = platform_key() # This can error on older BinaryProvider versions (<=0.2.5)
isdefined(BinaryProvider, :UnknownPlatform) && key == UnknownPlatform()
catch
true
end

if dobuild
sourcebuild()
elseif any(!satisfied(p; verbose=verbose) for p in products)
# Check to see if we're all satisfied
if haskey(download_info, platform_key())
# Download and install binaries
url, tarball_hash = download_info[platform_key()]
install(url, tarball_hash; prefix=prefix, force=true, verbose=verbose)
end
end

Write out a deps.jl file that will contain mappings for our products

This is already done if we've built from source

dobuild || write_deps_file(joinpath(@DIR, "deps.jl"), products)

BinDeps.PackageManager failed to satisfy dependency libgdal on 32bit Windows and Linux

Ever since 8087fea AppVeyor 32 bit builds have been failing with:

LoadError: Provider BinDeps.PackageManager failed to satisfy dependency libgdal
while loading C:\Users\appveyor\.julia\v0.6\GDAL\deps\build.jl, in expression starting on line 33

Example of full AppVeyor log here.

Don't know what is causing this, and don't have a 32 bit Windows at hand to test. Don't know if Linux 32 bit builds are working, or if this is only for Windows.

TODO for registration

I would really like for this package to be registered. What do you think that needs to be done for this?

  • Fix builds #42
  • Julia 0.7/1.0?

Provide docstrings

Given that we automatically check null for some of the wrapped functions, and provide some of our own types

Which external drivers to support

We build GDAL (https://github.com/JuliaPackaging/Yggdrasil/tree/master/G/GDAL) only with the most basic drivers/support for now. This includes:

Which drivers should we also include? See the raster and vector format lists on the GDAL website.

Note that it is not the goal to provide everyone with a GDAL build with all drivers. Many drivers see only little use and would increase both the build size and complexity of maintaining the build too much. Therefore it would be good to try to find a rather minimal build that includes enough drivers for most use cases.

If you do need an esoteric format that will not be included in the default build, this does not mean you cannot use this wrapper. If you provide your own build, you can simply point to that instead, see #64 (comment).

Wrap GDAL 3.0

Now that we use the GDAL 3.0 library, we should rerun the wrappers under gen/ and bring the code back in sync with the libraries. IMO it would be best to do that before tagging a new release, as long as it doesn't take too long.

For adding the docstrings some work is needed anyway because of the Clang.jl changes. I'd like to see if we can make this code simpler via https://discourse.julialang.org/t/ann-automaticdocstrings-jl/24675.

Compile with HDF4 driver

I think this has come up on discourse https://discourse.julialang.org/t/reading-hdf4-files/29470/3 and also recently for my own work I wished our GDAL would support HDF4 for reading MODIS data. I already familiarized myself a bit with BinaryBuilder and would tackle this, but it looks like we might want to wait for the new artifact system and until JuliaPackaging/BinaryBuilder.jl#441 is merged.

@visr I saw you commenting on the PR, are you working on updating this build script as well? If yes, let me know so that we don't do any conflicting changes.

GDAL utilities broken on Windows - apparent MbedTLS conflict

My packages that rely on GDAL utilities have stopped working. I suspected an unlinked DLL so I started experimenting with the utilities in Windows cmd. When I added all DLL folders from the artifacts to the path and ran gdalinfo I got this error:

error

Turns out the problem file was libmbedcrypto.dll. This DLL is in both MbedTLS_jll and the main bin folder of Julia 1.5.1 (on Windows at least). GDAL needs the one from MbedTLS_jll to take precedence, so either it needs to be copied to the current working dir or the path to it needs to be placed first in the library path.

julia> using GDAL

julia> GDAL.gdalinfo_path() do gdinfo
               run(`$gdinfo`)
           end
ERROR: failed process: Process(`'C:\Users\niclas\.julia\artifacts\1a3f285b91b22d9081d1ec6a0af713214f300fd6\bin\gdalinfo.exe'`, ProcessExited(3221225785)) [3221225785]
[snip]


julia> f = "libmbedcrypto.dll"; cp(joinpath(GDAL.GDAL_jll.LibCURL_jll.MbedTLS_jll.LIBPATH_list[1], f), joinpath(pwd(), f))
"C:\\Stuff\\Julia\\libmbedcrypto.dll"

julia> GDAL.gdalinfo_path() do gdinfo
               run(`$gdinfo`)
           end
Usage: gdalinfo [--help-general] [-json] [-mm] [-stats] [-hist] [-nogcp] [-nomd]
                [-norat] [-noct] [-nofl] [-checksum] [-proj4]
                [-listmdd] [-mdd domain|`all`] [-wkt_format WKT1|WKT2|...]*
                [-sd subdataset] [-oo NAME=VALUE]* datasetname

FAILURE: No datasource specified.
[snip]


julia> withenv("PATH"=>GDAL.GDAL_jll.LibCURL_jll.MbedTLS_jll.LIBPATH_list[1] * ";" * GDAL.GDAL_jll.LIBPATH) do
                run(`$(GDAL.GDAL_jll.gdalinfo_path_path)`)
           end
Usage: gdalinfo [--help-general] [-json] [-mm] [-stats] [-hist] [-nogcp] [-nomd]
                [-norat] [-noct] [-nofl] [-checksum] [-proj4]
                [-listmdd] [-mdd domain|`all`] [-wkt_format WKT1|WKT2|...]*
                [-sd subdataset] [-oo NAME=VALUE]* datasetname

FAILURE: No datasource specified.
[snip]

On a side note, please update the outdated README with an example on how to run GDAL utilites (#86). It's easy when you know how but figuring it out for the first time is really tricky, especially for users who don't yet understand how JLL packages and artifacts work. And having incorrect instructions up makes it even harder.

Write in an Band

Hello,

I convert a Python code with GDAL and Numpy that use gdal.Band.WriteArray method but it doesn't exist in your package.

How to made this operation with your package ?

My Python code :

outband = dsOut.GetRasterBand(1)
outband.WriteArray(OUTPUT[0].transpose())

Thanks

Lots of warnings on latest version

Haven't been able to figure out the exact lines yet, will dig into it later.

WARNING: Method definition cplemergencyerror(Any) in module GDAL at /builds/JuliaGPU/AbstractPlotting-jl/.julia/packages/GDAL/JO0C1/src/cpl_error.jl:14 overwritten at /builds/JuliaGPU/AbstractPlotting-jl/.julia/packages/GDAL/JO0C1/src/cpl_error.jl:14.
┌ Warning: Replacing docs for `GDAL.cplemergencyerror :: Tuple{Any}` in module `GDAL`
└ @ Base.Docs docs/Docs.jl:223
WARNING: Method definition cplerrorreset() in module GDAL at /builds/JuliaGPU/AbstractPlotting-jl/.julia/packages/GDAL/JO0C1/src/cpl_error.jl:23 overwritten at /builds/JuliaGPU/AbstractPlotting-jl/.julia/packages/GDAL/JO0C1/src/cpl_error.jl:23.
┌ Warning: Replacing docs for `GDAL.cplerrorreset :: Tuple{}` in module `GDAL`
└ @ Base.Docs docs/Docs.jl:223
WARNING: Method definition cplgetlasterrorno() in module GDAL at /builds/JuliaGPU/AbstractPlotting-jl/.julia/packages/GDAL/JO0C1/src/cpl_error.jl:35 overwritten at /builds/JuliaGPU/AbstractPlotting-jl/.julia/packages/GDAL/JO0C1/src/cpl_error.jl:35.
┌ Warning: Replacing docs for `GDAL.cplgetlasterrorno :: Tuple{}` in module `GDAL`
└ @ Base.Docs docs/Docs.jl:223
WARNING: Method definition cplgetlasterrortype() in module GDAL at /builds/JuliaGPU/AbstractPlotting-jl/.julia/packages/GDAL/JO0C1/src/cpl_error.jl:47 overwritten at /builds/JuliaGPU/AbstractPlotting-jl/.julia/packages/GDAL/JO0C1/src/cpl_error.jl:47.
┌ Warning: Replacing docs for `GDAL.cplgetlasterrortype :: Tuple{}` in module `GDAL`
└ @ Base.Docs docs/Docs.jl:223
WARNING: Method definition cplgetlasterrormsg() in module GDAL at /builds/JuliaGPU/AbstractPlotting-jl/.julia/packages/GDAL/JO0C1/src/cpl_error.jl:59 overwritten at /builds/JuliaGPU/AbstractPlotting-jl/.julia/packages/GDAL/JO0C1/src/cpl_error.jl:59.
┌ Warning: Replacing docs for `GDAL.cplgetlasterrormsg :: Tuple{}` in module `GDAL`
└ @ Base.Docs docs/Docs.jl:223
WARNING: Method definition cplgeterrorcounter() in module GDAL at /builds/JuliaGPU/AbstractPlotting-jl/.julia/packages/GDAL/JO0C1/src/cpl_error.jl:71 overwritten at /builds/JuliaGPU/AbstractPlotting-jl/.julia/packages/GDAL/JO0C1/src/cpl_error.jl:71.
┌ Warning: Replacing docs for `GDAL.cplgeterrorcounter :: Tuple{}` in module `GDAL`
└ @ Base.Docs docs/Docs.jl:223
WARNING: Method definition cplgeterrorhandleruserdata() in module GDAL at /builds/JuliaGPU/AbstractPlotting-jl/.julia/packages/GDAL/JO0C1/src/cpl_error.jl:83 overwritten at /builds/JuliaGPU/AbstractPlotting-jl/.julia/packages/GDAL/JO0C1/src/cpl_error.jl:83.
┌ Warning: Replacing docs for `GDAL.cplgeterrorhandleruserdata :: Tuple{}` in module `GDAL`
└ @ Base.Docs docs/Docs.jl:223
WARNING: Method definition cplerrorsetstate(Any, Any, Any) in module GDAL at /builds/JuliaGPU/AbstractPlotting-jl/.julia/packages/GDAL/JO0C1/src/cpl_error.jl:94 overwritten at /builds/JuliaGPU/AbstractPlotting-jl/.julia/packages/GDAL/JO0C1/src/cpl_error.jl:94.
┌ Warning: Replacing docs for `GDAL.cplerrorsetstate :: Tuple{Any,Any,Any}` in module `GDAL`
└ @ Base.Docs docs/Docs.jl:223
WARNING: Method definition cplcleanuperrormutex() in module GDAL at /builds/JuliaGPU/AbstractPlotting-jl/.julia/packages/GDAL/JO0C1/src/cpl_error.jl:101 overwritten at /builds/JuliaGPU/AbstractPlotting-jl/.julia/packages/GDAL/JO0C1/src/cpl_error.jl:101.
┌ Warning: Replacing docs for `GDAL.cplcleanuperrormutex :: Tuple{}` in module `GDAL`
└ @ Base.Docs docs/Docs.jl:223
WARNING: Method definition cplloggingerrorhandler(Any, Any, Any) in module GDAL at /builds/JuliaGPU/AbstractPlotting-jl/.julia/packages/GDAL/JO0C1/src/cpl_error.jl:112 overwritten at /builds/JuliaGPU/AbstractPlotting-jl/.julia/packages/GDAL/JO0C1/src/cpl_error.jl:112.
┌ Warning: Replacing docs for `GDAL.cplloggingerrorhandler :: Tuple{Any,Any,Any}` in module `GDAL`
└ @ Base.Docs docs/Docs.jl:223
WARNING: Method definition cpldefaulterrorhandler(Any, Any, Any) in module GDAL at /builds/JuliaGPU/AbstractPlotting-jl/.julia/packages/GDAL/JO0C1/src/cpl_error.jl:123 overwritten at /builds/JuliaGPU/AbstractPlotting-jl/.julia/packages/GDAL/JO0C1/src/cpl_error.jl:123.
┌ Warning: Replacing docs for `GDAL.cpldefaulterrorhandler :: Tuple{Any,Any,Any}` in module `GDAL`
└ @ Base.Docs docs/Docs.jl:223
WARNING: Method definition cplquieterrorhandler(Any, Any, Any) in module GDAL at /builds/JuliaGPU/AbstractPlotting-jl/.julia/packages/GDAL/JO0C1/src/cpl_error.jl:134 overwritten at /builds/JuliaGPU/AbstractPlotting-jl/.julia/packages/GDAL/JO0C1/src/cpl_error.jl:134.
┌ Warning: Replacing docs for `GDAL.cplquieterrorhandler :: Tuple{Any,Any,Any}` in module `GDAL`
└ @ Base.Docs docs/Docs.jl:223
WARNING: Method definition cplturnfailureintowarning(Any) in module GDAL at /builds/JuliaGPU/AbstractPlotting-jl/.julia/packages/GDAL/JO0C1/src/cpl_error.jl:143 overwritten at /builds/JuliaGPU/AbstractPlotting-jl/.julia/packages/GDAL/JO0C1/src/cpl_error.jl:143.
┌ Warning: Replacing docs for `GDAL.cplturnfailureintowarning :: Tuple{Any}` in module `GDAL`
└ @ Base.Docs docs/Docs.jl:223
WARNING: Method definition cplseterrorhandler(Any) in module GDAL at /builds/JuliaGPU/AbstractPlotting-jl/.julia/packages/GDAL/JO0C1/src/cpl_error.jl:158 overwritten at /builds/JuliaGPU/AbstractPlotting-jl/.julia/packages/GDAL/JO0C1/src/cpl_error.jl:158.
┌ Warning: Replacing docs for `GDAL.cplseterrorhandler :: Tuple{Any}` in module `GDAL`
└ @ Base.Docs docs/Docs.jl:223
WARNING: Method definition cplseterrorhandlerex(Any, Any) in module GDAL at /builds/JuliaGPU/AbstractPlotting-jl/.julia/packages/GDAL/JO0C1/src/cpl_error.jl:175 overwritten at /builds/JuliaGPU/AbstractPlotting-jl/.julia/packages/GDAL/JO0C1/src/cpl_error.jl:175.
┌ Warning: Replacing docs for `GDAL.cplseterrorhandlerex :: Tuple{Any,Any}` in module `GDAL`
└ @ Base.Docs docs/Docs.jl:223
WARNING: Method definition cplpusherrorhandler(Any) in module GDAL at /builds/JuliaGPU/AbstractPlotting-jl/.julia/packages/GDAL/JO0C1/src/cpl_error.jl:187 overwritten at /builds/JuliaGPU/AbstractPlotting-jl/.julia/packages/GDAL/JO0C1/src/cpl_error.jl:187.
┌ Warning: Replacing docs for `GDAL.cplpusherrorhandler :: Tuple{Any}` in module `GDAL`
└ @ Base.Docs docs/Docs.jl:223
WARNING: Method definition cplpusherrorhandlerex(Any, Any) in module GDAL at /builds/JuliaGPU/AbstractPlotting-jl/.julia/packages/GDAL/JO0C1/src/cpl_error.jl:201 overwritten at /builds/JuliaGPU/AbstractPlotting-jl/.julia/packages/GDAL/JO0C1/src/cpl_error.jl:201.
┌ Warning: Replacing docs for `GDAL.cplpusherrorhandlerex :: Tuple{Any,Any}` in module `GDAL`
└ @ Base.Docs docs/Docs.jl:223
WARNING: Method definition cplsetcurrenterrorhandlercatchdebug(Any) in module GDAL at /builds/JuliaGPU/AbstractPlotting-jl/.julia/packages/GDAL/JO0C1/src/cpl_error.jl:213 overwritten at /builds/JuliaGPU/AbstractPlotting-jl/.julia/packages/GDAL/JO0C1/src/cpl_error.jl:213.
┌ Warning: Replacing docs for `GDAL.cplsetcurrenterrorhandlercatchdebug :: Tuple{Any}` in module `GDAL`
└ @ Base.Docs docs/Docs.jl:223
WARNING: Method definition cplpoperrorhandler() in module GDAL at /builds/JuliaGPU/AbstractPlotting-jl/.julia/packages/GDAL/JO0C1/src/cpl_error.jl:222 overwritten at /builds/JuliaGPU/AbstractPlotting-jl/.julia/packages/GDAL/JO0C1/src/cpl_error.jl:222.
┌ Warning: Replacing docs for `GDAL.cplpoperrorhandler :: Tuple{}` in module `GDAL`
└ @ Base.Docs docs/Docs.jl:223
WARNING: Method definition _cplassert(Any, Any, Any) in module GDAL at /builds/JuliaGPU/AbstractPlotting-jl/.julia/packages/GDAL/JO0C1/src/cpl_error.jl:233 overwritten at /builds/JuliaGPU/AbstractPlotting-jl/.julia/packages/GDAL/JO0C1/src/cpl_error.jl:233.
┌ Warning: Replacing docs for `GDAL._cplassert :: Tuple{Any,Any,Any}` in module `GDAL`

Rasterization is excruciatingly slow in GDAL 2.2.4, please update to GDAL 2.3 or 2.4

I need to rasterize global shapefiles at high resolution (0.01 degrees, i.e. a 36000x18000 raster). At this resolution, gdal_rasterize runs in about 100 seconds using GDAL 2.3 or 2.4 but takes over an hour on GDAL 2.2.4.

Apparently @visr has already updated GDALbuilder.jl with support for version 2.3, but I can't tell why his pull request to GDAL.jl (#60) won't pass tests. It been a while now, perhaps the underlying issue has resolved itself?

Here are sample runs using gadm3.6.shp (a shapefile of global administrative borders, 537 MB download).

C:\Users\niclas\Downloads>"C:\Program Files\GDAL\release-1911-x64-gdal-2-4-0-mapserver-7-2-2\bin\gdal\apps\gdal_rasterize" --version
GDAL 2.4.0, released 2018/12/14

C:\Users\niclas\Downloads>timemem-1.0 C:\Program Files\GDAL\release-1911-x64-gdal-2-4-0-mapserver-7-2-2\bin\gdal\apps\gdal_rasterize -a ID_0 -ot Byte -tr 0.01 0.01 -te -180 -90 180 90 -co COMPRESS=LZW C:/Stuff/Datasets/gadm36/gadm36.shp globtest1.tif
0...10...20...30...40...50...60...70...80...90...100 - done.
Exit code      : 0
Elapsed time   : 103.82
Kernel time    : 49.44 (47.6%)
User time      : 54.25 (52.3%)
page fault #   : 47641356
Working set    : 3140816 KB
Paged pool     : 255 KB
Non-paged pool : 35 KB
Page file size : 3176800 KB

C:\Users\niclas\Downloads>C:\Users\niclas\.julia\packages\GDAL\vec6Y\deps\usr\bin\gdal_rasterize --version
GDAL 2.2.4, released 2018/03/19

C:\Users\niclas\Downloads>timemem-1.0 C:\Users\niclas\.julia\packages\GDAL\vec6Y\deps\usr\bin\gdal_rasterize -a ID_0 -ot Byte -tr 0.01 0.01 -te -180 -90 180 90 -co COMPRESS=LZW C:/Stuff/Datasets/gadm36/gadm36.shp globtest2.tif
0...10...20...30...40...50...60...70...80...90...100 - done.
Exit code      : 0
Elapsed time   : 3905.56
Kernel time    : 2206.72 (56.5%)
User time      : 1698.69 (43.5%)
page fault #   : 3045007692
Working set    : 2524976 KB
Paged pool     : 392 KB
Non-paged pool : 31 KB
Page file size : 2554800 KB

Also since GDAL 2.4 is out, maybe that version should be targeted instead of 2.3.x.

Link to libgdal.so instead of libgdal.so.26

It would be more generic, if one links to libgdal.so, instead of libgdal.so.26.

libgdal.so.26, as far as I understand, is for gdal version 3.0.x.

If one installs gdal 3.1.x on the system and override GDAL.jl's asset with the system gdal, one gets a problem. Because gdal 3.1.x's libgdal.so is called libgdal.so.27.

Most of the systems create a soft link of libgdal.so.xx to libgdal.so. All other software on the system would link to libgdal.so. This is to avoid the problem that, for example, a new surfix, such as 27 in libgdal.so.27, would break installed software that were, for example, built against libgdal.so.26.

Does my explanation of the issue understandable? Please let me know if I shall try to explain the issue in a different way.

Specific file listed in errors?

It would be nice if an error like this reported the file name in question:

ERROR: GDALError (CE_Failure, code 3):
        File short, can't read line 204.

Especially when looping over large datasets with hundreds of files. I'm not sure how easy that is to do or where to do it exactly - this could be something for ArchGDAL.jl

Illegal CPU instruction

Does GDAL come with prebuilt x86_64 libraries?

If yes, it seems that the libraries were built with march that is not x86-64.

On my old Pentium 4 CPU, Julia gives an error. I think the error was caused by a CPU instruction that is not supported by an old Pentium 4 CPU.

Here is the full log:

(@v1.4) pkg> test GDAL
    Testing GDAL
Status `/tmp/jl_0RUuwZ/Manifest.toml`
  [fa961155] CEnum v0.4.1
  [add2ef01] GDAL v1.1.2
  [a7073274] GDAL_jll v3.0.4+0
  [d604d12d] GEOS_jll v3.8.1+0
  [deac9b47] LibCURL_jll v7.70.0+0
  [29816b5a] LibSSH2_jll v1.9.0+1
  [c8ffd9c3] MbedTLS_jll v2.16.0+2
  [58948b4f] PROJ_jll v6.3.2+1
  [76ed43ae] SQLite_jll v3.31.1+0
  [83775a58] Zlib_jll v1.2.11+10
  [8e850ede] nghttp2_jll v1.40.0+0
  [2a0f44e3] Base64 
  [ade2ca70] Dates 
  [8ba89e20] Distributed 
  [b77e0a4c] InteractiveUtils 
  [76f85450] LibGit2 
  [8f399da3] Libdl 
  [56ddb016] Logging 
  [d6f4376e] Markdown 
  [44cfe95a] Pkg 
  [de0858da] Printf 
  [3fa0cd96] REPL 
  [9a3f8284] Random 
  [ea8e919c] SHA 
  [9e88b42a] Serialization 
  [6462fe0b] Sockets 
  [8dfed614] Test 
  [cf7118a7] UUIDs 
  [4ec0a83e] Unicode 
┌ Info: GDAL 3.0.4, released 2020/01/28
│ 194 GDAL drivers found
└ 69 OGR drivers found

signal (6): Aborted
in expression starting at /home/c/.julia/packages/GDAL/tKD0i/test/tutorial_raster.jl:24
gsignal at /lib64/libc.so.6 (unknown line)
abort at /lib64/libc.so.6 (unknown line)
unknown function (ip: 0x7f0206c023c8)
_ZNK5osgeo4proj9operation10Conversion19_exportToPROJStringEPNS0_2io19PROJStringFormatterE at /home/c/.julia/artifacts/0896d7ece43eb82db63576fd6588d143c00e586e/lib/libproj.so (unknown line)
_ZNK5osgeo4proj2io21IPROJStringExportable18exportToPROJStringB5cxx11EPNS1_19PROJStringFormatterE at /home/c/.julia/artifacts/0896d7ece43eb82db63576fd6588d143c00e586e/lib/libproj.so (unknown line)
_ZL13pj_obj_createP9projCtx_tRKN7dropbox6oxygen2nnISt10shared_ptrIN5osgeo4proj6common16IdentifiedObjectEEEE at /home/c/.julia/artifacts/0896d7ece43eb82db63576fd6588d143c00e586e/lib/libproj.so (unknown line)
proj_create_conversion at /home/c/.julia/artifacts/0896d7ece43eb82db63576fd6588d143c00e586e/lib/libproj.so (unknown line)
SetProjCS at /workspace/srcdir/gdal-3.0.4/ogr/ogrspatialreference.cpp:4624
GTIFGetOGISDefnAsOSR at /workspace/srcdir/gdal-3.0.4/frmts/gtiff/gt_wkt_srs.cpp:525
LookForProjection at /workspace/srcdir/gdal-3.0.4/frmts/gtiff/geotiff.cpp:12649
GetSpatialRef at /workspace/srcdir/gdal-3.0.4/frmts/gtiff/geotiff.cpp:18054
GetProjectionRef at /workspace/srcdir/gdal-3.0.4/gcore/gdaldataset.cpp:851
gdalgetprojectionref at /home/c/.julia/packages/GDAL/tKD0i/src/gdal_h.jl:1070
unknown function (ip: 0x7f01f69b6392)
unknown function (ip: 0x7f020a2ffdbd)
unknown function (ip: 0x7f020a2ffa83)
unknown function (ip: 0x7f020a2ffee5)
unknown function (ip: 0x7f020a300ec1)
unknown function (ip: 0x7f020a3014a9)
unknown function (ip: 0x7f020a301a07)
unknown function (ip: 0x7f020a318f40)
unknown function (ip: 0x7f020a2f673d)
jl_load at /usr/bin/../lib64/libjulia.so.1 (unknown line)
unknown function (ip: 0x7f01fd5d3b28)
#3 at /home/c/.julia/packages/GDAL/tKD0i/test/runtests.jl:45
cd at ./file.jl:104
unknown function (ip: 0x7f020a2ffdbd)
unknown function (ip: 0x7f020a2ffa83)
unknown function (ip: 0x7f020a2ffee5)
unknown function (ip: 0x7f020a300ec1)
unknown function (ip: 0x7f020a3014a9)
unknown function (ip: 0x7f020a3014a9)
unknown function (ip: 0x7f020a301a07)
unknown function (ip: 0x7f020a318f40)
unknown function (ip: 0x7f020a2f673d)
jl_load at /usr/bin/../lib64/libjulia.so.1 (unknown line)
unknown function (ip: 0x7f01fd5d3b28)
unknown function (ip: 0x7f020a2ffdbd)
unknown function (ip: 0x7f020a2ffa83)
unknown function (ip: 0x7f020a2ffee5)
unknown function (ip: 0x7f020a300ec1)
unknown function (ip: 0x7f020a301a07)
unknown function (ip: 0x7f020a318f40)
unknown function (ip: 0x7f020a319214)
jl_toplevel_eval_in at /usr/bin/../lib64/libjulia.so.1 (unknown line)
unknown function (ip: 0x7f01fd38bb34)
unknown function (ip: 0x7f01fd38a015)
unknown function (ip: 0x7f01fd38b57f)
unknown function (ip: 0x7f01fd38b6c5)
unknown function (ip: 0x555f857f771a)
unknown function (ip: 0x555f857f732e)
__libc_start_main at /lib64/libc.so.6 (unknown line)
unknown function (ip: 0x555f857f73d9)
Allocations: 3358712 (Pool: 3358035; Big: 677); GC: 2
ERROR: Package GDAL errored during testing

Building GDAL latest version fails, master works

┌ Error: Error building `GDAL`:                                                                                                                                                      
│ ┌ Warning: platform_key() is deprecated, use platform_key_abi() from now on                                                                                                        
│ │   caller = ip:0x0                                                                                                                                                                
│ └ @ Core :-1                                                                                                                                                                       
│ ┌ Warning: Could not extract the platform key of https://github.com/JuliaGeo/GDALBuilder/releases/download/v2.2.4-1/GDAL.x86_64-w64-mingw32.tar.gz; continuing...                  
│ └ @ BinaryProvider C:\Users\anshu\.julia\packages\BinaryProvider\TcAwt\src\Prefix.jl:185                                                                                           
│ [ Info: Downloading https://github.com/JuliaGeo/GDALBuilder/releases/download/v2.2.4-1/GDAL.x86_64-w64-mingw32.tar.gz to C:\Users\anshu\.julia\packages\GDAL\vec6Y\deps\usr\downloa
ds\GDAL.x86_64-w64-mingw32.tar.gz...                                                                                                                                                 
│ ERROR: LoadError: Could not download https://github.com/JuliaGeo/GDALBuilder/releases/download/v2.2.4-1/GDAL.x86_64-w64-mingw32.tar.gz to C:\Users\anshu\.julia\packages\GDAL\vec6Y
\deps\usr\downloads\GDAL.x86_64-w64-mingw32.tar.gz:ErrorException("")                                                                                                                                                                 
│ Stacktrace:                                                                                                                                                                        
│  [1] error(::String) at .\error.jl:33                                                                                                                                              
│  [2] #download#93(::Bool, ::typeof(BinaryProvider.download), ::String, ::String) at C:\Users\anshu\.julia\packages\BinaryProvider\TcAwt\src\PlatformEngines.jl:498                 
│  [3] #download at .\none:0 [inlined]                                                                                                                                               
│  [4] #download_verify#94(::Bool, ::Bool, ::Bool, ::typeof(download_verify), ::String, ::String, ::String) at C:\Users\anshu\.julia\packages\BinaryProvider\TcAwt\src\PlatformEngine
s.jl:567                                                                                                                                                                             
│  [5] #download_verify at .\tuple.jl:0 [inlined]                                                                                                                                    
│  [6] #install#133(::Prefix, ::String, ::Bool, ::Bool, ::Bool, ::typeof(install), ::String, ::String) at C:\Users\anshu\.julia\packages\BinaryProvider\TcAwt\src\Prefix.jl:314      
│  [7] (::getfield(BinaryProvider, Symbol("#kw##install")))(::NamedTuple{(:prefix, :force, :verbose),Tuple{Prefix,Bool,Bool}}, ::typeof(install), ::String, ::String) at .\tuple.jl:0
│  [8] top-level scope at C:\Users\anshu\.julia\packages\GDAL\vec6Y\deps\build.jl:51                                                                                                 
│  [9] include at .\boot.jl:328 [inlined]                                                                                                                                            
│  [10] include_relative(::Module, ::String) at .\loading.jl:1094                                                                                                                    
│  [11] include(::Module, ::String) at .\Base.jl:31                                                                                                                                  
│  [12] include(::String) at .\client.jl:431                                                                                                                                         
│  [13] top-level scope at none:5in expression starting at C:\Users\anshu\.julia\packages\GDAL\vec6Y\deps\build.jl:47                                                                                               
│ caused by [exception 1]                                                                                                                                                            
│                                                                                                                                                                                    
│ Stacktrace:                                                                                                                                                                        
│  [1] error() at .\error.jl:42                                                                                                                                                      
│  [2] #download#93(::Bool, ::typeof(BinaryProvider.download), ::String, ::String) at C:\Users\anshu\.julia\packages\BinaryProvider\TcAwt\src\PlatformEngines.jl:492                 
│  [3] #download at .\none:0 [inlined]                                                                                                                                               
│  [4] #download_verify#94(::Bool, ::Bool, ::Bool, ::typeof(download_verify), ::String, ::String, ::String) at C:\Users\anshu\.julia\packages\BinaryProvider\TcAwt\src\PlatformEngine
s.jl:567                                                                                                                                                                             
│  [5] #download_verify at .\tuple.jl:0 [inlined]                                                                                                                                    
│  [6] #install#133(::Prefix, ::String, ::Bool, ::Bool, ::Bool, ::typeof(install), ::String, ::String) at C:\Users\anshu\.julia\packages\BinaryProvider\TcAwt\src\Prefix.jl:314      
│  [7] (::getfield(BinaryProvider, Symbol("#kw##install")))(::NamedTuple{(:prefix, :force, :verbose),Tuple{Prefix,Bool,Bool}}, ::typeof(install), ::String, ::String) at .\tuple.jl:0
│  [8] top-level scope at C:\Users\anshu\.julia\packages\GDAL\vec6Y\deps\build.jl:51                                                                                                 
│  [9] include at .\boot.jl:328 [inlined]                                                                                                                                            
│  [10] include_relative(::Module, ::String) at .\loading.jl:1094                                                                                                                    
│  [11] include(::Module, ::String) at .\Base.jl:31                                                                                                                                  
│  [12] include(::String) at .\client.jl:431                                                                                                                                         
│  [13] top-level scope at none:5                                                                                                                                                    
│ Exception calling "DownloadFile" with "2" argument(s): "An exception occurred during a WebClient request."                                                                         
│ At line:5 char:1+ $webclient.DownloadFile("https://github.com/JuliaGeo/GDALBuilder/rele ...                                                                                                        
│ + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~                                                                                                            
│     + CategoryInfo          : NotSpecified: (:) [], MethodInvocationException                                                                                                      
│     + FullyQualifiedErrorId : WebException                                                                                                                                         

└ @ Pkg.Operations C:\cygwin\home\Administrator\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.2\Pkg\src\backwards_compatible_isolation.jl:647                        
                                                                                                                                                                                     

It looks like the URL may have changed? Might make sense to tag a patch release if possible.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.