commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Gary Lucas (Created) (JIRA)" <j...@apache.org>
Subject [jira] [Created] (SANSELAN-57) Add method to specify metadata (TiffOutputFields) when a new TIFF file is created
Date Tue, 04 Oct 2011 20:11:35 GMT
Add method to specify metadata (TiffOutputFields) when a new TIFF file is created
---------------------------------------------------------------------------------

                 Key: SANSELAN-57
                 URL: https://issues.apache.org/jira/browse/SANSELAN-57
             Project: Commons Sanselan
          Issue Type: Improvement
         Environment: All supported operating systems
            Reporter: Gary Lucas



I propose to add a new method to the TiffImageWriterBase class that will simplify the process
of adding metadata tags (any kind, not just the geographic ones) to a TIFF file when it is
created.  I have a version of this class ready for uploading, and will do so in a day or two
if nobody has any suggestions for alternatives.

The rationale for this new feature grows from a requirement to produce GeoTIFF files.  GeoTIFF's
are a widely supported industry standard that takes advantage of the fact that TIFF files
permit the use of supplemental metadata tags (TIFF's equivalent to EXIF tags).  The GeoTIFF
tags feature metadata that allows the TIFF file to be tied to images of maps, convert pixels
to latitude/longitude coordinates, etc.  

Although Sanselan that does provide an API that allows an application to add such tags to
an existing image (TiffImageWriterLossy), this approach requires writing the TIFF file twice.
 Since some GeoTIFF's can be quite large (50 megs is common), this is a suboptimal approach.
 An API that permits the file to be written just once would be preferred.

The new method will a variation of writeImage that includes an array list of TiffOutputFields:

   writeImage(BufferedImage src, OutputStream os, Map params, ArrayList applicationSuppliedFieldList)

When the initial TIFF file header is created, Sanselan currently adds a "directory" to the
beginning of the file ("directory" is the term used in the TIFF format specification to mean,
simply, a collection of data). This directory provides image metadata such as width, height,
etc.  The new method will add application-supplied output fields to the initial directory.
 This approach will have the advantage that an application will be able to obtain metadata
for a GeoTIFF file without actually reading the full body of the image. It will also permit
the creating of GeoTIFFs consistent with those being produced by the U.S. Geological Survey
and other agencies that provide a complete set of geographic information in the first directory
in the file.


--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Mime
View raw message