Each geometric object is considered as an infinite set of points
(except the Point
object which contains only itself).
To better represent this concept, the TransfiniteSet
interface
can be seen as a Set
of potentially infinite size in which the elements are points.
All geometries are specializations of TransfiniteSet
.
There is two types of structures to represent a point: Point
and DirectPosition
.
The first type is a true geometry and may therefore be relatively cumbersome, depending on the implementation.
The second type is not formally considered to be a geometry;
it extends neither Geometry
nor TransfiniteSet
.
It barely defines any operations besides the storing of a sequence of numbers representing a coordinate.
It may therefore be a more lightweight object.
In order to allow the API to work equally with these two types of positions,
Position
is defined as a common interface implemented by DirectPosition
and Point
.
In practice, the great majority of Apache SIS’s API works on DirectPosition
s,
and occasionally on Position
s when it seems useful to also allow geometric points.