Package org.locationtech.jtsexample.geom
Class PrecisionModelExample
- java.lang.Object
-
- org.locationtech.jtsexample.geom.PrecisionModelExample
-
public class PrecisionModelExample extends java.lang.Object
An example showing the results of using different precision models in computations involving geometric constructions. A simple intersection computation is carried out in three different precision models (Floating, FloatingSingle and Fixed with 0 decimal places). The input is the same in all cases (since it is precise in all three models), The output shows the effects of rounding in the single-precision and fixed-precision models.- Version:
- 1.7
-
-
Constructor Summary
Constructors Constructor Description PrecisionModelExample()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
difference(java.lang.String wktA, java.lang.String wktB, PrecisionModel pm)
void
example1()
void
example2()
void
intersection(java.lang.String wktA, java.lang.String wktB, PrecisionModel pm)
static void
main(java.lang.String[] args)
void
run()
-
-
-
Method Detail
-
main
public static void main(java.lang.String[] args)
-
run
public void run() throws ParseException
- Throws:
ParseException
-
example1
public void example1() throws ParseException
- Throws:
ParseException
-
example2
public void example2() throws ParseException
- Throws:
ParseException
-
intersection
public void intersection(java.lang.String wktA, java.lang.String wktB, PrecisionModel pm) throws ParseException
- Throws:
ParseException
-
difference
public void difference(java.lang.String wktA, java.lang.String wktB, PrecisionModel pm) throws ParseException
- Throws:
ParseException
-
-