org.geotools.renderer.geom
Class CompressionLevel

java.lang.Object
  extended byjavax.media.jai.EnumeratedParameter
      extended byorg.geotools.renderer.geom.CompressionLevel
All Implemented Interfaces:
java.io.Serializable

public final class CompressionLevel
extends javax.media.jai.EnumeratedParameter

The compression level for coordinate points in a Geometry object. Compressions are trigged by the Geometry.compress(...) method and consist in a change of the storage type for (x,y) coordinates. Note that the compression may be destructive, i.e. it may sacrifice data and/or precision. For example, JTS 1.3 stores points as Coordinate objects with (x,y,z) double values, which consume a lot of memory. The compression level DIRECT_AS_FLOATS recopies the (x,y) ordinates in a float[] array, loosing the z value and some precision due to the conversion of double to float values. The compression level RELATIVE_AS_BYTES goes further with a two steps process:

Version:
$Id: CompressionLevel.java 17672 2006-01-19 00:25:55Z desruisseaux $
Author:
Martin Desruisseaux
See Also:
Geometry.compress(org.geotools.renderer.geom.CompressionLevel), Serialized Form

Field Summary
static CompressionLevel DIRECT_AS_FLOATS
          Transform coordinate points into direct positions stored as float values.
static CompressionLevel RELATIVE_AS_BYTES
          Transform coordinate points into relative positions stored as byte values.
 
Methods inherited from class javax.media.jai.EnumeratedParameter
equals, getName, getValue, hashCode, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

DIRECT_AS_FLOATS

public static final CompressionLevel DIRECT_AS_FLOATS
Transform coordinate points into direct positions stored as float values. This compression level has no effect if data are already stored as float, or if a more agressive compression is already in use (e.g. RELATIVE_AS_BYTES).


RELATIVE_AS_BYTES

public static final CompressionLevel RELATIVE_AS_BYTES
Transform coordinate points into relative positions stored as byte values. Before the compression, the coordinates are resampled (if needed) in order to obtain line segments of equal length. This compression level has no effect if the data are already compressed as relative positions.



Copyright © GeoTools. All Rights Reserved.