|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectjavax.media.jai.EnumeratedParameter
org.geotools.renderer.geom.CompressionLevel
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:
First, it invokes
where
dx is the geometry mean resolution and
std is the resolution's standard deviation. This call ensure that distance
between each consecutive points is approximatively constant and long enough for 2/3 of
line segments (i.e. this resampling may add new points for less than
1/3 of line segments, assuming a normal (gaussian) distribution). If a different resampling
is wanted, just invoke setResolution(dx + 0.5*std)setResolution(...) explicitely before
compress(...).
Second, it replaces absolute positions (left handed image) by relative positions
(right handed image), i.e. distances relative to the previous point. Since all
distances are of similar magnitude, distances can be coded in byte
primitive type instead of float.
|
|
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 |
public static final CompressionLevel DIRECT_AS_FLOATS
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).
public static final CompressionLevel RELATIVE_AS_BYTES
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.
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||