Interface GridCoverageWriter

  • All Known Implementing Classes:
    AbstractGridCoverageWriter, ArcGridWriter, GeoTiffWriter, GrassCoverageWriter, WorldImageWriter

    public interface GridCoverageWriter
    Support for writing grid coverages into a persistent store. Instance of GridCoverageWriter are obtained through a call to GridCoverageExchange#getWriter. Grid coverages are usually added to the output stream in a sequential order.
    GeoAPI 2.0
    Martin Desruisseaux (IRD)
    See Also:
    GridCoverageExchange#getWriter, ImageWriter
    • Method Detail

      • getFormat

        Format getFormat()
        Returns the format handled by this GridCoverageWriter.
      • getDestination

        Object getDestination()
        Returns the output destination. This is the object passed to the GridCoverageExchange#getWriter method. It can be a String, an OutputStream, a FileChannel, etc.
      • getMetadataNames

        String[] getMetadataNames()
        Returns the list of metadata keywords associated with the output destination as a whole (not associated with any particular grid coverage). If no metadata is allowed, the array will be empty.
        The list of metadata keywords for the output destination.
        IOException - if an error occurs during reading or writing.
      • setMetadataValue

        void setMetadataValue​(String name,
                              String value)
                       throws IOException
        Sets the metadata value for a given metadata name.
        name - Metadata keyword for which to set the metadata.
        value - The metadata value for the given metadata name.
        IOException - if an error occurs during writing.
      • setCurrentSubname

        void setCurrentSubname​(String name)
                        throws IOException
        Set the name for the next grid coverage to write within the output destination. The subname can been fetch later at reading time.
        IOException - if an error occurs during writing.
      • dispose

        void dispose()
              throws IOException
        Allows any resources held by this object to be released. The result of calling any other method subsequent to a call to this method is undefined. It is important for applications to call this method when they know they will no longer be using this GridCoverageWriter. Otherwise, the writer may continue to hold on to resources indefinitely.
        IOException - if an error occured while disposing resources (for example while flushing data and closing a file).