You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "Gary Lucas (Created) (JIRA)" <ji...@apache.org> on 2011/10/04 22:11:35 UTC

[jira] [Created] (SANSELAN-57) Add method to specify metadata (TiffOutputFields) when a new TIFF file is created

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

        

[jira] [Updated] (SANSELAN-57) Add method to specify metadata (TiffOutputFields) when a new TIFF file is created

Posted by "Damjan Jovanovic (Updated) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/SANSELAN-57?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Damjan Jovanovic updated SANSELAN-57:
-------------------------------------

    Component/s: Format: TIFF
    Description: 
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 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.


  was:

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 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.


    
> 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
>          Components: Format: TIFF
>         Environment: All supported operating systems
>            Reporter: Gary Lucas
>         Attachments: Sanselan-57-TiffMetadataWriter.patch
>
>   Original Estimate: 1h
>  Remaining Estimate: 1h
>
> 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 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

        

[jira] [Commented] (SANSELAN-57) Add method to specify metadata (TiffOutputFields) when a new TIFF file is created

Posted by "Damjan Jovanovic (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SANSELAN-57?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13166131#comment-13166131 ] 

Damjan Jovanovic commented on SANSELAN-57:
------------------------------------------

This only lets you change fields in one directory, and only works for TIFF. I agree that a way to specify metadata at the time an image is written is necessary, but that should be done for all image formats in a uniform way, and should allow you to write fields into any directory. I am going to defer this problem until after the next Sanselan release.

                
> 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
>         Attachments: Sanselan-57-TiffMetadataWriter.patch
>
>   Original Estimate: 1h
>  Remaining Estimate: 1h
>
> 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 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

        

[jira] [Updated] (SANSELAN-57) Add method to specify metadata (TiffOutputFields) when a new TIFF file is created

Posted by "Gary Lucas (Updated) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/SANSELAN-57?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Gary Lucas updated SANSELAN-57:
-------------------------------

    Description: 

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 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.


  was:

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.


    
> 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
>   Original Estimate: 1h
>  Remaining Estimate: 1h
>
> 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 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

        

[jira] [Resolved] (SANSELAN-57) Add method to specify metadata (TiffOutputFields) when a new TIFF file is created

Posted by "Damjan Jovanovic (Resolved) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/SANSELAN-57?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Damjan Jovanovic resolved SANSELAN-57.
--------------------------------------

       Resolution: Fixed
    Fix Version/s: 1.0

In commit 1292909 I've added a general API for writing EXIF into images using writeImage(). You populate the parameter map passed to writeImage() with SanselanConstants.PARAM_KEY_EXIF having a TiffOutputSet as the value, and thus gain the ability to write any field into any TIFF directory. Thus resolving FIXED.

                
> 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
>          Components: Format: TIFF
>         Environment: All supported operating systems
>            Reporter: Gary Lucas
>             Fix For: 1.0
>
>         Attachments: Sanselan-57-TiffMetadataWriter.patch
>
>   Original Estimate: 1h
>  Remaining Estimate: 1h
>
> 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 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

        

[jira] [Updated] (SANSELAN-57) Add method to specify metadata (TiffOutputFields) when a new TIFF file is created

Posted by "Gary Lucas (Updated) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/SANSELAN-57?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Gary Lucas updated SANSELAN-57:
-------------------------------

    Attachment: Sanselan-57-TiffMetadataWriter.patch

Patch tested successfully using existing unit tests.
                
> 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
>         Attachments: Sanselan-57-TiffMetadataWriter.patch
>
>   Original Estimate: 1h
>  Remaining Estimate: 1h
>
> 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 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