[Proj] Virtual File Access

Paul Kelly paul-grass at stjohnspoint.co.uk
Fri Jul 26 09:32:22 EST 2013

Greg Troxel wrote:
> Frank Warmerdam <warmerdam at pobox.com> writes:
> Perhaps I am totally misunderstanding what you are doing.   Is this
> about letting IO done on behalf of a user to read and write the user's
> data (not grid shift files, which are part of the library) to come from
> different places?
> The path to the files is set
> via PROJ_LIB at build time to $(pkgdatadir).  So I view it as a bug to
> have to set search paths.  There is a single correct place for the grid
> files, and they are part of the package (or a depending package if one
> wants to split things).

What's to say a gridshift file might not also be user-supplied? What do 
you do then if you want to use a grid file you've created yourself (e.g. 
as I did a few years ago: 
<http://www.stjohnspoint.co.uk/gis/france.htm>), or got from an external 
source, and don't have root access to install it in the "single correct 

Or what if you're running PROJ.4 on some obscure embedded system that 
doesn't have the concept of a conventional filesystem and you need to 
access the gridshift data over a network connection, or even embed it in 
the binary?

The solution Frank has implemented looks to me flexible enough to handle 
any such unusual situations, as long as you write the necessary 
interface functions to make whatever way you've stored the gridshift 
data appears to the PROJ.4 library as if its seeking around in a file. 
Seems to me a lot more elegant than the old pj_set_finder() solution - 
although for simple cases of the gridshift files being stored in a 
non-standard directory that's obviously simpler to use.


More information about the Proj mailing list