[gdal-dev] GDAL DATA PATH - test
Even Rouault
even.rouault at spatialys.com
Mon Apr 15 05:42:41 PDT 2024
The following fails if GDAL_DATA is incorrect:
srs = osr.SpatialReference()
srs.SetStatePlane(403, 1) # California III NAD83.
Le 15/04/2024 à 14:26, Paul Harwood via gdal-dev a écrit :
> I have an interesting little problem.
>
> I want to write (in the code using the API - not as a test script -
> actually in C#) a command that will fail if the GDAL data path is set
> incorrectly.
>
> I am having difficulty finding a command that will fail if the path is
> incorrect.
>
> I thought that some of the commands in OSR (like ImportFromPCI ) would
> fail since the data files are in the data folder - but when I try that
> with the GDAL-DATA configuration item set to a path that does not
> exists - they do not fail!
>
> There are a lot of commands out there - and I do not want to have to
> try them all. Does anyone have a good idea about what should fail?
>
> _______________________________________________
> gdal-dev mailing list
> gdal-dev at lists.osgeo.org
> https://lists.osgeo.org/mailman/listinfo/gdal-dev
--
http://www.spatialys.com
My software is free, but my time generally not.
More information about the gdal-dev
mailing list