[Gdal-dev] Adding Fugawi .JPR Support to GDAL

Christian Doenges christiandoenges at mac.com
Wed Aug 25 15:18:30 EDT 2004


Hi,

we want to add Fugawi .JPR file support to our application. I would like to
put this into GDAL, since I guess that's where it belongs.

.JPR is an extension to ESRI worldfile, where the 6 standard lines are
followed by a set of key=value pairs. The graphics themselves can be in
BMP, TIFF, JPEG, GIF, or PNG format.

I don't think it makes sense to write a new driver for this, since all of
the different bitmap formats are all supported by other drivers. IMHO, it
would make more sense to extend GDALReadWorldFile() to see if the
additional key=value pairs are present and if so, to parse them.

The problem is that there is currently no way to have GDALReadWorldFile()
return data other than the geo transform matrix.

My suggestion is to change the interface of GDALReadWorldFile() from

int GDALReadWorldFile( const char * pszBaseFilename,
                       const char *pszExtension,
                       double *padfGeoTransform)

to

int GDALReadWorldFile( const char * pszBaseFilename,
                       const char *pszExtension,
                       GDALDataset *pDataset)

There are currently about 30 calls to GDALReadWorldFile(), so I think it's
not too hard to do.

While I'm at it, I would like to change the interface even further to be

int GDALReadWorldFile( const char * pszBaseFilename,
                       GDALDataset *pDataset,
                       const char *pszExtension,
                       ...)

where the ellipsis denotes a variable number of pszExtension parameters.
That way the number of calls can be reduced to 13 and the code will be
streamlined somewhat.

What do you think? I would really like to know if there is something that I
overlooked or if you have a better suggestion for handling this.

Best regards,
Christian
---
Christian Dönges
Use GPS data on Mac OS X! <http://www.truenav.com/>




More information about the Gdal-dev mailing list