| 18 | == CPL CSV Access via VSI*L == |
| 19 | |
| 20 | The large majority of the support data file access is via the CPL CSV API (gdal/port/cpl_csv.cpp). Finding support data files is done via CPLFindFile(). It turns out these functions are still using the old VSI API which does not support special handlers (like /vsizip/), or in at least one case direct fopen() calls. So the first stage of this RFC is to convert these functions to all use the VSI*L API. A [http://trac.osgeo.org/gdal/attachment/wiki/rfc27_supportdata/rfc27_csv_vsil.patch patch] has been prepared that demonstrates the bulk of the required changes. With this patch it is possible to access files from a GDAL_DATA setting like /vsizip//home/warmerda/gdal/data/gdaldata.zip. |
| 21 | |
| 22 | Note that we are explicitly changing the contract about the nature of the FILE* passed to functions like CSVReadParseLine() (real FILE* vs. VSI*L style FILE*). It is possible, though relatively unlikely that application code, or private driver implementations will be using the SV functions and will need to be changed. This change should be noted in the GDAL 1.8 release notes. |
| 23 | |
| 24 | It is also unclear if there will be bad interactions with the cpl_csv implementation embedded in libgeotiff in some situations, such as when using libgeotiff as an external library. Some review will be needed. |
| 25 | |
| 26 | Another point to investigate is what the performance impact of doing all the file finding through the VSI*L API will be. |
| 27 | |
| 28 | |
| 29 | |
| 30 | |
| 31 | |