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

Ed McNierney ed at topozone.com
Wed Aug 25 16:27:32 EDT 2004

Christian -

I presume you have found the JPR specification at http://www.fugawi.com/docs/jprdoc.pdf

Unfortunately, the spec says that all of the fields are optional, which makes it a little tricky to accurately identify the file.  You may wish to insist that it have a filename ending in .jpr; otherwise I think you'd need to check for all the possible keys and see if any are present.

	- Ed

Ed McNierney
President and Chief Mapmaker
TopoZone.com / Maps a la carte, Inc.
73 Princeton Street, Suite 305
North Chelmsford, MA  01863
Phone: +1 978 251-4242   Fax: +1 978 251-1396  

-----Original Message-----
From: gdal-dev-bounces at xserve.flids.com [mailto:gdal-dev-bounces at xserve.flids.com] On Behalf Of Christian Doenges
Sent: Wednesday, August 25, 2004 3:19 PM
To: gdal-dev at remotesensing.org
Subject: [Gdal-dev] Adding Fugawi .JPR Support to GDAL


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)


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 Dönges
Use GPS data on Mac OS X! <http://www.truenav.com/>

Gdal-dev mailing list
Gdal-dev at xserve.flids.com

More information about the Gdal-dev mailing list