getCoordinate method

Coordinate? getCoordinate()
override

Returns a vertex of this Geometry (usually, but not necessarily, the first one). The returned coordinate should not be assumed to be an actual Coordinate object used in the internal representation.

@return a {@link Coordinate} which is a vertex of this Geometry. @return null if this Geometry is empty

Implementation

Coordinate? getCoordinate() {
  if (isEmpty()) return null;
  return geometries[0].getCoordinate();
}