Class GeoTiffGeoreferencing

java.lang.Object
org.gvsig.basicformats.impl.AbstractFormatFile
org.gvsig.basicformats.impl.DefaultWLDFile
org.gvsig.fmap.dal.file.tiff.GeoTiffGeoreferencing
All Implemented Interfaces:
org.gvsig.basicformats.FormatFile, org.gvsig.basicformats.WLDFile

public class GeoTiffGeoreferencing extends org.gvsig.basicformats.impl.DefaultWLDFile
Clase de utilidad para poblar un objeto IIOMetadata de ImageIO con las etiquetas (tags) de georreferenciacion estandar de GeoTIFF.

Esta clase encapsula la complejidad de la manipulacion del arbol DOM de los metadatos nativos de ImageIO para el formato TIFF.

Flujo de trabajo:

  1. Instanciar la clase.
  2. Usar setValue(WorldGeoreferencing) para establecer los parametros geometricos.
  3. Llamar a populateMetadata(IIOMetadata, Projection) para inyectar las etiquetas GeoTIFF en el objeto de metadatos proporcionado.
  • Nested Class Summary

    Nested classes/interfaces inherited from class org.gvsig.basicformats.impl.DefaultWLDFile

    org.gvsig.basicformats.impl.DefaultWLDFile.WorldGeoreferencingImpl

    Nested classes/interfaces inherited from interface org.gvsig.basicformats.WLDFile

    org.gvsig.basicformats.WLDFile.WorldGeoreferencing
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final String
     

    Fields inherited from class org.gvsig.basicformats.impl.DefaultWLDFile

    georeferencing, source

    Fields inherited from interface org.gvsig.basicformats.WLDFile

    FILE_EXTENSION
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    getFile(File file)
     
    org.gvsig.crs.projection.lib.Projection
     
    void
     
    void
    populateMetadata(IIOMetadata metadata, org.gvsig.crs.projection.lib.Projection projection)
    Populates a given IIOMetadata object with the GeoTIFF tags corresponding to the georeferencing information held by this instance.
    void
    read(File tiffFile)
     
    void
    setValue(org.gvsig.basicformats.WLDFile.WorldGeoreferencing georeferencing)
     
    void
    setValue(org.gvsig.fmap.geom.primitive.Envelope envelope, int rows, int columns)
     

    Methods inherited from class org.gvsig.basicformats.impl.DefaultWLDFile

    getFile, getGeoreferencing, read, write

    Methods inherited from class org.gvsig.basicformats.impl.AbstractFormatFile

    writeQuietly

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface org.gvsig.basicformats.FormatFile

    writeQuietly
  • Field Details

  • Constructor Details

    • GeoTiffGeoreferencing

      public GeoTiffGeoreferencing()
  • Method Details

    • setValue

      public void setValue(org.gvsig.fmap.geom.primitive.Envelope envelope, int rows, int columns)
      Specified by:
      setValue in interface org.gvsig.basicformats.WLDFile
      Overrides:
      setValue in class org.gvsig.basicformats.impl.DefaultWLDFile
    • setValue

      public void setValue(org.gvsig.basicformats.WLDFile.WorldGeoreferencing georeferencing)
      Specified by:
      setValue in interface org.gvsig.basicformats.WLDFile
      Overrides:
      setValue in class org.gvsig.basicformats.impl.DefaultWLDFile
    • populateMetadata

      public void populateMetadata(IIOMetadata metadata, org.gvsig.crs.projection.lib.Projection projection) throws IIOInvalidTreeException
      Populates a given IIOMetadata object with the GeoTIFF tags corresponding to the georeferencing information held by this instance.
      Parameters:
      metadata - The metadata object to populate. It must be a valid TIFF metadata object obtained from an ImageWriter.
      projection - The projection to be written into the metadata.
      Throws:
      IIOInvalidTreeException - if there is an error manipulating the metadata tree.
    • getProjection

      public org.gvsig.crs.projection.lib.Projection getProjection()
    • read

      public void read(File tiffFile) throws IOException
      Specified by:
      read in interface org.gvsig.basicformats.FormatFile
      Overrides:
      read in class org.gvsig.basicformats.impl.DefaultWLDFile
      Throws:
      IOException
    • populateFromMetadata

      public void populateFromMetadata(IIOMetadata metadata)
    • getFile

      public File getFile(File file)
      Specified by:
      getFile in interface org.gvsig.basicformats.FormatFile
      Overrides:
      getFile in class org.gvsig.basicformats.impl.DefaultWLDFile