object PrecisionModel extends Serializable

Specifies the precision model of the {link Coordinate}s in a {link Geometry}. In other words, specifies the grid of allowable points for all Geometrys.

The {link #makePrecise(Coordinate)} method allows rounding a coordinate to a "precise" value; that is, one whose precision is known exactly.

Coordinates are assumed to be precise in geometries. That is, the coordinates are assumed to be rounded to the precision model given for the geometry. JTS input routines automatically round coordinates to the precision model before creating Geometries. All internal operations assume that coordinates are rounded to the precision model. Constructive methods (such as boolean operations) always round computed coordinates to the appropriate precision model.

Currently three types of precision model are supported:

  • FLOATING - represents full double precision floating point. This is the default precision model used in JTS
  • FLOATING_SINGLE - represents single precision floating point.
  • FIXED - represents a model with a fixed number of decimal places. A Fixed Precision Model is specified by a scale factor. The scale factor specifies the size of the grid which numbers are rounded to. Input coordinates are mapped to fixed coordinates according to the following equations: <UL> <LI> jtsPt.x = round( (inputPt.x * scale ) / scale <LI> jtsPt.y = round( (inputPt.y * scale ) / scale </UL>

For example, to specify 3 decimal places of precision, use a scale factor of 1000. To specify -3 decimal places of precision (i.e. rounding to the nearest 1000), use a scale factor of 0.001.

Coordinates are represented internally as Java double-precision values. Since Java uses the IEEE-394 floating point standard, this provides 53 bits of precision. (Thus the maximum precisely representable integer is 9,007,199,254,740,992 - or almost 16 decimal digits of precision).

JTS binary methods currently do not handle inputs which have different precision models. The precision model of any constructed geometric value is undefined.

Annotations
@SerialVersionUID()
Version

1.7

Linear Supertypes
Serializable, AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. PrecisionModel
  2. Serializable
  3. AnyRef
  4. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

Type Members

  1. class Type extends Serializable
    Annotations
    @SerialVersionUID()

Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##: Int
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  4. val FIXED: Type

    Fixed Precision indicates that coordinates have a fixed number of decimal places.

    Fixed Precision indicates that coordinates have a fixed number of decimal places. The number of decimal places is determined by the log10 of the scale factor.

  5. val FLOATING: Type

    Floating precision corresponds to the standard Java double-precision floating-point representation, which is based on the IEEE-754 standard

  6. val FLOATING_SINGLE: Type

    Floating single precision corresponds to the standard Java single-precision floating-point representation, which is based on the IEEE-754 standard

  7. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  8. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.CloneNotSupportedException]) @native()
  9. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  10. def equals(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef → Any
  11. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.Throwable])
  12. final def getClass(): Class[_ <: AnyRef]
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  13. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  14. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  15. val maximumPreciseValue: Double

    The maximum precise value representable in a double.

    The maximum precise value representable in a double. Since IEE754 double-precision numbers allow 53 bits of mantissa, the value is equal to 2^53 - 1. This provides almost 16 decimal digits of precision.

  16. def mostPrecise(pm1: PrecisionModel, pm2: PrecisionModel): PrecisionModel

    Determines which of two {link PrecisionModel}s is the most precise (allows the greatest number of significant digits).

    Determines which of two {link PrecisionModel}s is the most precise (allows the greatest number of significant digits).

    pm1

    a PrecisionModel

    pm2

    a PrecisionModel return the PrecisionModel which is most precise

  17. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  18. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  19. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  20. final def synchronized[T0](arg0: => T0): T0
    Definition Classes
    AnyRef
  21. def toString(): String
    Definition Classes
    AnyRef → Any
  22. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  23. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  24. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException]) @native()
  25. object Type extends Serializable

    The types of Precision Model which JTS supports.

    The types of Precision Model which JTS supports.

    Annotations
    @SerialVersionUID()

Inherited from Serializable

Inherited from AnyRef

Inherited from Any

Ungrouped