Class Java2DConverter
- java.lang.Object
-
- org.locationtech.jts.jump.workbench.ui.renderer.java2D.Java2DConverter
-
public class Java2DConverter extends Object
Converts JTS Geometry objects into Java 2D Shape objects
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interface
Java2DConverter.PointConverter
-
Constructor Summary
Constructors Constructor Description Java2DConverter(Java2DConverter.PointConverter pointConverter)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Shape
toShape(org.locationtech.jts.geom.Geometry geometry)
If you pass in a general GeometryCollection, note that a Shape cannot preserve information about which elements are 1D and which are 2D.
-
-
-
Constructor Detail
-
Java2DConverter
public Java2DConverter(Java2DConverter.PointConverter pointConverter)
-
-
Method Detail
-
toShape
public Shape toShape(org.locationtech.jts.geom.Geometry geometry) throws NoninvertibleTransformException
If you pass in a general GeometryCollection, note that a Shape cannot preserve information about which elements are 1D and which are 2D. For example, if you pass in a GeometryCollection containing a ring and a disk, you cannot render them as such: if you use Graphics.fill, you'll get two disks, and if you use Graphics.draw, you'll get two rings. Solution: create Shapes for each element.- Throws:
NoninvertibleTransformException
-
-