Closed donnacalhoun closed 9 years ago
It sounds like we should rely on the users to install the gdal
library and all the accoutrements, maybe with some instructions in the docs, and rely on the library's warnings when things are not setup. This way we do not have to support the installation of gdal
beyond pointing users in the right direction.
On the matter of using os.system
calls, I would suggest using the subprocess
module instead as it gives you better control of the system call and as you suggested, more portable.
Thanks for the tip on using subprocess; I've changed our os.system calls to subprocess.call().
and for now,we'll go with letting the user set GDAL_DATA, and warning them about warnings if the file is not found.
My plan to is supply the gcs.cvs file with the GE version (or somewhere). Users can then decide if they want to set the GDAL environment variable to suppress any warnings relate dot it not being found.
To create tilings of raw PNG files needed for faster loading in GE, we are using tools from a supporting library GDAL. The GDAL libraries is easily imported via set-up tools. However at least one supporting file
gcs.cvs
, containing geo-referencing data should be supplied.gcs.cvs
available to the user? (It isn't part of the GDAL library). Do we distribute it with Clawpack? Make it available via a web link in the documentation? Ask the user to find it on their own? (I got it via MacPorts). Or, maybe this filegcs.cvs
is not required if we are using standard projections (lat/long?), and we can safely run the code without it. But then we want to figure out to suppress the warning issued by GDAL when this file is not found.gdal
library? Normally,gdal
searches the path set by the GDAL_DATA environment variable. We can check for this environment variable, or if it is not set, we can set up a warning or error, or set it to a default location of thegcs.cvs
file (possibly installed with clawpack).gdal_translate
andgdal2tiles
are called usingos.system
calls (there doesn't appear t be any obvious function version of these routines). Will these calls work on all systems?