Record Class Geometry
java.lang.Object
java.lang.Record
com.eco.bio7.gdal.Geometry
- Record Components:
type- POINT, LINESTRING, POLYGON, or COLLECTION (see members), EMPTYparts- the parts (e.g., the polygons of a multi polygon)members- the geometries of a collection (else empty)
public record Geometry(String type, List<List<double[][]>> parts, List<Geometry> members)
extends Record
A geometry with its coordinates (parsed from WKT): points, line strings and
polygons (also multi geometries and collections). Each part is a list of
paths of {x, y} coordinates: a point is one path with one coordinate, a line
string one path, a polygon its outer ring and its holes.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionList<double[]> All points of all parts and members (e.g., for the extent).final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.members()Returns the value of themembersrecord component.static GeometryParses WKT (2D, Z and M coordinates; only x and y are kept).parts()Returns the value of thepartsrecord component.The geometry as GeoJSON geometry (2D; a geometry with several parts is a Multi geometry).final StringtoString()Returns a string representation of this record class.type()Returns the value of thetyperecord component.
-
Constructor Details
-
Geometry
-
-
Method Details
-
parse
-
allPoints
All points of all parts and members (e.g., for the extent). -
toGeoJson
The geometry as GeoJSON geometry (2D; a geometry with several parts is a Multi geometry). Written in Java: OGR_G_ExportToJson of GDAL 3.13 doesn't free its memory (about 1.2 KB per call). -
toString
-
hashCode
-
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared withObjects::equals(Object,Object). -
type
-
parts
-
members
-