A representation of a planar, linear vector Geometry.
Because it is not clear at this time what semantics for spatial analysis methods involvingGeometryCollection
s would be useful,GeometryCollection
s are not supported as arguments to binary predicates or therelate
The overlay methods return the most specific class possible to represent the result. If the result is homogeneous, aPoint
will be returned if the result contains a single element; otherwise, aMultiPoint
will be returned. If the result is heterogeneous aGeometryCollection
will be returned.
Because it is not clear at this time what semantics for set-theoretic methods involving GeometryCollections would be useful, GeometryCollections are not supported as arguments to the set-theoretic methods.Representation of Computed Geometries
The SFS states that the result of a set-theoretic method is the "point-set" result of the usual set-theoretic definition of the operation (SFS 184.108.40.206). However, there are sometimes many ways of representing a point set as aGeometry
The SFS does not specify an unambiguous representation of a given point set returned from a spatial analysis method. One goal of JTS is to make this specification precise and unambiguous. JTS uses a canonical form for Geometrys returned from overlay methods. The canonical form is a Geometry which is simple and noded:Simple means that the Geometry returned will be simple according to the JTS definition of isSimple. Noded applies only to overlays involving LineStrings. It means that all intersection points on LineStrings will be present as endpoints of LineStrings in the result.
This definition implies that non-simple geometries which are arguments to spatial analysis methods must be subjected to a line-dissolve process to ensure that the results are simple.Constructed Points And The Precision Model
The results computed by the set-theoretic methods may contain constructed points which are not present in the inputGeometry
s. These new points arise from intersections between line segments in the edges of the inputGeometry
#math #Geometry #puzzle #challenge #education #Questionbox There are six coins, each of radius 1 cm. Each coin is tangent to exactly two other coins next to it. Between the coins, there is an empty area whose boundary is a star-like shape. What is the pe— Bilal Sarımeşeli (@SteamPoweredDM) Apr 21, 2020
s. In the general case it is not possible to represent constructed points exactly. This is due to the fact that the coordinates of an intersection point may contain twice as many bits of precision as the coordinates of the input line segments. In order to represent these constructed points explicitly, JTS must truncate them to fit thePrecisionModel
Unfortunately, truncating coordinates moves them slightly. Line segments which would not be coincident in the exact result may become coincident in the truncated representation. This in turn leads to "topology collapses" -- situations where a computed element has a lower dimension than it would in the exact result.
When JTS detects topology collapses during the computation of spatial analysis methods, it will throw an exception. If possible the exception will report the location of the collapse.
There are two ways of comparing geometries for equality:structural equality
Structural Equality is provided by theequalsExact(Geometry)
method. This implements a comparison based on exact, structural pointwise equality. Theequals(Object)
is a synonym for this method, to provide structural equality semantics for use in Java collections. It is important to note that structural pointwise equality is easily affected by things like ring order and component order. In many situations it will be desirable to normalize geometries before comparing them (using thenorm()
is provided as a convenience method to compute equality over normalized geometries, but it is expensive to use. Finally,equalsExact(Geometry, double)
allows using a tolerance value for point comparison.Topological Equality
Topological Equality is provided by theequalsTopo(Geometry)
method. It implements the SFS definition of point-set equality defined in terms of the DE-9IM matrix. To support the SFS naming convention, the methodequals(Geometry)
is also provided as a synonym. However, due to the potential for confusion withequals(Object)
its use is discouraged.
Since equals(Object) and hashCode() are overridden, Geometries can be used effectively in Java collections.