[Proj] Virtual File Access

Frank Warmerdam warmerdam at pobox.com
Sat Jun 22 12:32:48 EST 2013


Folks,

To smooth out deployment of PROJ.4 at my workplace, I have made some
changes so that all file access can go through a virtual layer. This
virtual file
api looks like the following, and is associated with a "context" (projCtx).

typedef struct projFileAPI_t {
    PAFile  (*FOpen)(projCtx ctx, const char *filename, const char *access);
    size_t  (*FRead)(void *buffer, size_t size, size_t nmemb, PAFile file);
    int     (*FSeek)(PAFile file, long offset, int whence);
    long    (*FTell)(PAFile file);
    void    (*FClose)(PAFile);
} projFileAPI;

I have reworked the the init file and grid shift file access goes through
this
and provided a default "stdio" based implementation.  These changes are
now available in svn and I have yet to actually try it out beyond use of the
stdio based implementation, but I'm interested in if anyone sees this as
useful or has thoughts on how it ought to be done better.

I'm also contemplating an optional build mechanism that will build grid
shift files and init files right into the shared library for easy deployment
though I'm not sure exactly how I'll do that yet.

I have also updated svn in preparation for a 4.9.0 beta release which I
hope to do in the next week or so.  I'll try to review the bug database and
fix anything I can but this is a good time to bring any pressing bugs to the
table.  So far the NEWS file contains:

4.9.0 Release Notes
-------------------

 o Implement new virtual file api (projFileAPI) so that all access to grid
   shift and init files can be hooked.

 o Replace geodesic implementation with one from Charles Karney and add a
   supported public interface (geod_interface.h).

 o Upgraded to EPSG 8.0.

 o Removed old (deprecated) Java bindings in favor of the new api introduced
   in 4.8.0.

 o Various bug fixes and cleanup.

Best regards,
-- 
---------------------------------------+--------------------------------------
I set the clouds in motion - turn up   | Frank Warmerdam,
warmerdam at pobox.com
light and sound - activate the windows | http://pobox.com/~warmerdam
and watch the world go round - Rush    | Geospatial Software Developer
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.maptools.org/pipermail/proj/attachments/20130622/6f8c2cc2/attachment.htm 


More information about the Proj mailing list