[Gdal-dev] RFC 12: Improved File Management

Daniel Morissette dmorissette at mapgears.com
Mon May 7 09:52:40 EDT 2007


Ari Jolma wrote:
> Ray Gardener kirjoitti:
>> Hmm... I'm partial to the opposite route: abstracting away details 
>> like the structure of datasets, since they're driver-dependant. Do 
>> callers really need to know how datasets are organized? 

Yes, some apps need that information. For instance, if your app wants to 
zip up a copy of a dataset then it needs to know which files to include 
in the ZIP. This is not a made up use case, it's a problem I and others 
have encountered in the past.


>> Is it even a 
>> warranted assumption that the data is on a filesystem? 

No it's not. The 3rd item in the "outstanding issues" section relates to 
that. If we properly document that behavior then perhaps it would be 
enough for GetFileList() to return NULL for datasets that are not 
file-based (e.g. WCS).


> The more we get 
>> away from a black box model, the more maintenance it's going to be; 
>> the API surface area keeps going up and increases the combinatorial 
>> effects. No offence, but an RFC like this seems more like solving a 
>> symptom instead of a root cause.
>>
>> GDAL should do all file and filesystem I/O as callbacks, and a utility 
>> reference library built on top that implements the callbacks for 
>> common cases like C stdlib I/O, GUI filesys browsers, etc. The more 
>> GDAL continues to know about files and filesys details, the more 
>> painful it's going to get.
> 
> 
> Ray,
> 
> I don't quite get your point. Isn't it one of GDAL's main tasks to know 
> about files and their details (or WCS data sources for that matter)?
> 

I guess I don't get the point either. I think this RFC serves a useful 
purpose, and I don't quite see how callbacks could do a better job in 
this case. If some callers don't care about the structure of a dataset 
then they can simply ignore the new methods, they are not required to do 
any extra work that they didn't have to do before.


> I think this RFC with the "fast identify" allow us tool developers to 
> build GUIs that let the users not to worry about those details - this is 
> in my opinion a good thing, they just want to know which raster layers 
> are available in a given data source. This is similar to what already 
> can be done with OGR.
> 

I don't think this RFC relates to knowing which layers are part of a 
dataset, my understanding is that it's just intended to tell the caller 
which files constitute a dataset in case it needs to be zipped up or 
copied to a new location, etc.

I didn't think OGR already had a similar GetFileList() and family of 
methods. Did I miss that addition?

Daniel
-- 
Daniel Morissette
http://www.mapgears.com/



More information about the Gdal-dev mailing list