geotrellis.data.geotiff

Encoder

class Encoder extends AnyRef

Class for writing GeoTIFF data to a given DataOutputStream.

This class implements the basic TIFF spec [1] and also supports the GeoTIFF extension tags. It is not a general purpose TIFF encoder (in particular it always writes the data into a single strip) but should work well for encoding raster data.

In addition to using one strip it uses a single sample per pixel and encodes the data in one band. This means that files using more than 8-bit samples will often not render correctly in image programs like the Gimp. It also does not implement compression.

Future work may add compression options, as well as options related to the color palette, multiple bands, etc.

Encoders are not thread-safe and can only be used to write a single raster to single output stream.

[1] http://partners.adobe.com/public/developer/en/tiff/TIFF6.pdf

Linear Supertypes
AnyRef, Any
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. Hide All
  2. Show all
  1. Encoder
  2. AnyRef
  3. Any
Visibility
  1. Public
  2. All

Instance Constructors

  1. new Encoder(dos: DataOutputStream, raster: Raster, settings: Settings)

Value Members

  1. final def !=(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  2. final def !=(arg0: Any): Boolean

    Definition Classes
    Any
  3. final def ##(): Int

    Definition Classes
    AnyRef → Any
  4. final def ==(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  5. final def ==(arg0: Any): Boolean

    Definition Classes
    Any
  6. final def asInstanceOf[T0]: T0

    Definition Classes
    Any
  7. val baos: ByteArrayOutputStream

  8. final def bitsPerSample: Int

    Number of bits per sample.

    Number of bits per sample. Should either be a multiple of 8, or evenly divide 8 (i.e. 1, 2 or 4).

  9. final def bytesPerRow: Int

  10. final def bytesPerSample: Int

  11. final def bytesPerStrip: Int

  12. def clone(): AnyRef

    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws()
  13. val cols: Int

  14. val data: ArrayRasterData

  15. final def dataOffset: Int

  16. val e: Extent

  17. final def eq(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  18. def equals(arg0: Any): Boolean

    Definition Classes
    AnyRef → Any
  19. final def esriCompat: Boolean

    ESRI compatibility changes the data we write out.

    ESRI compatibility changes the data we write out. It results in some extra TIFF tags and many extra GeoTIFF tags.

  20. def finalize(): Unit

    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws()
  21. final def getClass(): java.lang.Class[_]

    Definition Classes
    AnyRef → Any
  22. def hashCode(): Int

    Definition Classes
    AnyRef → Any
  23. final def ifdOffset: Int

  24. final def imageStartOffset: Int

  25. val img: ByteArrayOutputStream

  26. var index: Int

  27. final def isInstanceOf[T0]: Boolean

    Definition Classes
    Any
  28. final def leftOverRows: Int

  29. final def maxRowsPerStrip: Int

    Here we do a bunch of calculations around strip size.

    Here we do a bunch of calculations around strip size. We limit each strip to 65K in size. Given that constraint, we can determine how many strips we need, how large each strip is, how many rows per strip we'll write, etc.

  30. final def ne(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  31. final def noDataString: String

    String nodata value to use in GeoTIFF metadata.

  32. final def noDataValue: Int

    Int nodata value to use when writing raster.

  33. final def notify(): Unit

    Definition Classes
    AnyRef
  34. final def notifyAll(): Unit

    Definition Classes
    AnyRef
  35. final def numEntries: Int

    The number of TIFF tags to be written.

    The number of TIFF tags to be written.

    If we update the writer to support additional TIFF tags this number needs to be increased also. The writeTag calls in write are numbered to help make this process easier.

  36. final def numGeoTags: Int

    The number of GeoTags to be written.

    The number of GeoTags to be written.

    If we write extra GeoTIFF tags this number needs to be increased.

  37. final def numStrips: Int

  38. val re: RasterExtent

  39. def renderImage(): Array[Int]

  40. def renderImageFloat(): Array[Int]

  41. def renderImageInt(): Array[Int]

  42. val rows: Int

  43. final def rowsPerStrip: Int

  44. final def sampleFormat: Int

    Type of samples, using numeric constants from the TIFF spec.

  45. final def synchronized[T0](arg0: ⇒ T0): T0

    Definition Classes
    AnyRef
  46. def toString(): String

    Definition Classes
    AnyRef → Any
  47. val todo: DataOutputStream

  48. def todoByte(value: Int): Unit

  49. def todoDouble(value: Double): Unit

  50. def todoFloat(value: Float): Unit

  51. def todoGeoTag(tag: Int, loc: Int, count: Int, offset: Int): Unit

  52. def todoInt(value: Int): Unit

  53. def todoLong(value: Long): Unit

  54. def todoShort(value: Int): Unit

  55. final def wait(): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws()
  56. final def wait(arg0: Long, arg1: Int): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws()
  57. final def wait(arg0: Long): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws()
  58. def write(): Unit

    Encodes the raster to GeoTIFF, and writes the data to the output stream.

    Encodes the raster to GeoTIFF, and writes the data to the output stream.

    This method does not return a result; the result is written into the output stream provided to Encoder's constructor. Many of the methods used by write mutate the object, and Encoder is not thread-safe, so it's important not to call this more than once.

  59. def writeByte(value: Int): Unit

  60. def writeByteArrayOutputStream(b: ByteArrayOutputStream): Unit

  61. def writeDouble(value: Double): Unit

  62. def writeFloat(value: Float): Unit

  63. def writeInt(value: Int): Unit

  64. def writeLong(value: Long): Unit

  65. def writeShort(value: Int): Unit

  66. def writeString(tag: Int, s: String): Unit

  67. def writeTag(tag: Int, typ: Int, count: Int, value: Int): Unit

  68. def writeTagDouble(tag: Int, typ: Int, value: Double): Unit

Inherited from AnyRef

Inherited from Any