Package org.locationtech.jtsexample.geom
Class PrecisionModelExample
- java.lang.Object
-
- org.locationtech.jtsexample.geom.PrecisionModelExample
-
public class PrecisionModelExample extends 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 voiddifference(String wktA, String wktB, PrecisionModel pm)voidexample1()voidexample2()voidintersection(String wktA, String wktB, PrecisionModel pm)static voidmain(String[] args)voidrun()
-
-
-
Method Detail
-
main
public static void main(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(String wktA, String wktB, PrecisionModel pm) throws ParseException
- Throws:
ParseException
-
difference
public void difference(String wktA, String wktB, PrecisionModel pm) throws ParseException
- Throws:
ParseException
-
-