Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions src/gdal/gdal.jl
Original file line number Diff line number Diff line change
Expand Up @@ -433,6 +433,7 @@ OSRImportFromWkt(a1, a2) = acare(ccall((:OSRImportFromWkt, libgdal), Cint, (pVoi
OSRImportFromProj4(a1, a2) = acare(ccall((:OSRImportFromProj4, libgdal), Cint, (pVoid, Cstring), a1, a2))
OSRImportFromEPSG(a1, a2) = acare(ccall((:OSRImportFromEPSG, libgdal), Cint, (pVoid, Cint), a1, a2))
OSRNewSpatialReference(a1) = acare(ccall((:OSRNewSpatialReference, libgdal), pVoid, (Cstring,), a1))
OSRSetPROJSearchPaths(a1) = acare(ccall((:OSRSetPROJSearchPaths, libgdal), Cvoid, (Ptr{Cstring},), a1))

function OSRSetAxisMappingStrategy(hSRS, strategy)
#(Gdal.GDALVERSION[] < v"3.0.0") && return # This breakes precompile if called from one PrecompileTools call
Expand Down Expand Up @@ -2680,6 +2681,14 @@ end
CPLSetConfigOption("GDAL_HTTP_UNSAFESSL", "YES")
isdir(GDAL_DATA_DIR) && CPLSetConfigOption("GDAL_DATA", GDAL_DATA_DIR)
#CPLSetConfigOption("GDAL_NUM_THREADS", "ALL_CPUS")

# set PROJ_LIB location, this overrides setting the environment variable
if (isJLL)
PROJ_LIB = Ref{String}(joinpath(GMT.PROJ_jll.artifact_dir, "share", "proj"))
OSRSetPROJSearchPaths([PROJ_LIB[]])
#else
#PROJ_LIB = Ref{String}(dirname(GMT.libproj) * "/../share/proj") # Fails for me because GMTdir is symlink of bin only
end
end

"""
Expand Down
Loading