-
Notifications
You must be signed in to change notification settings - Fork 12
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
GDAL_DATA not set #49
Comments
see #30 for previous discussion |
Encountered the same here, will try to look for a fix next week. |
this seems to fix GDAL_DATA issues reported in JuliaGeo/GDAL.jl#49
I tried to look into this a bit, GDAL.jl sets GDAL_DATA in Lines 72 to 74 in 45a9c2e
To test if this works we have this test. If you stop setting the GDAL_DATA in Lines 25 to 26 in 45a9c2e
When ArchGDAL starts it also runs GDAL.jl info("GDAL.jl set GDAL_DATA to ", GDAL_DATA) But somehow this is not good enough, because running the same test from ArchGDAL fails. Instead of setting the config option via ENV["GDAL_DATA"] = GDAL_DATA For ArchGDAL this still doesn't work, even though it can see the modified ENV from there. The only thing that works so far is setting the GDAL_DATA environment variable yourself globally, which is something I hope to avoid telling users to do. I even tried to set the GDAL_DATA via function __init__()
ccall((:CPLSetConfigOption, GDAL.libgdal), Void, (Cstring, Cstring), "GDAL_DATA", GDAL.GDAL_DATA)
info("ArchGDAL.jl set GDAL_DATA to ", GDAL.GDAL_DATA)
end But even though it is running:
It doesn't work. Whyyyyy? Oh wait, just noticed that ArchGDAL doesn't I just added enabling |
Hmm CI doesn't think adding |
I encountered it on GDAL.jl, not using ArchGDAL at all. Maybe these are separate issues? For me it has to do with multiple processes: using GDAL
GDAL.importfromepsg(GDAL.newspatialreference(C_NULL), 4326) # works
pmap(x->GDAL.importfromepsg(GDAL.newspatialreference(C_NULL), x), 4326:4330) # fails |
Wouldn't be surprised if they are actually the same. Let's try and see! EDIT: They aren't, see #50 for fix of the above issue. And as a workaround for ArchGDAL.jl, try setting GDAL_DATA as environment variable. |
setting ENV["GDAL_DATA"] is better since it also works for parallel processes, see #49
* update for latest version of gdal.jl * don't throw away test files people who test will want to keep them anyway, and people who don’t won’t be bothered by the bloat * fix travis script * remove projection tests for now * delete empty test REQUIRE * add master testset this will give aligned and more compact printing of test results * remove workarounds * remove unnecessary checknull * precompile this seems to fix GDAL_DATA issues reported in JuliaGeo/GDAL.jl#49 * add Compat to REQUIRE * use Base.Dates This works on 0.6, on 0.7 it should be `use Dates`, but this is needed to get around this error in 0.7: UndefVarError: Date not defined * fix UndefVarError on 0.7 * make tests more robust
* enable tests after fixing GDAL_DATA issue JuliaGeo/GDAL.jl#49 * use Cstring as in GDAL like JuliaGeo/GDAL.jl#47 without this I received errors like: ``` MethodError: no method matching unsafe_convert(::Type{Ptr{Cstring}}, ::Base.RefValue{Ptr{UInt8}}) ```
Still receiving the following error message:
Unable to open EPSG support file gcs.csv. Try setting the GDAL_DATA environment variable to point to the directory containing EPSG csv files.
log here: https://travis-ci.org/yeesian/ArchGDAL.jl/jobs/398597673#L749
The text was updated successfully, but these errors were encountered: