LinearRing.h
/**********************************************************************
*
* GEOS - Geometry Engine Open Source
* http://geos.osgeo.org
*
* Copyright (C) 2001-2002 Vivid Solutions Inc.
* Copyright (C) 2005 2006 Refractions Research Inc.
*
* This is free software; you can redistribute and/or modify it under
* the terms of the GNU Lesser General Public Licence as published
* by the Free Software Foundation.
* See the COPYING file for more information.
*
**********************************************************************
*
* Last port: geom/LinearRing.java r320 (JTS-1.12)
*
**********************************************************************/
#pragma once
#include <geos/export.h>
#include <string>
#include <vector>
#include <geos/geom/LineString.h>
// Forward declarations
namespace geos {
namespace geom { // geos::geom
class Coordinate;
}
}
namespace geos {
namespace geom { // geos::geom
class GEOS_DLL LinearRing : public LineString {
public:
static const unsigned int MINIMUM_VALID_SIZE = 3;
LinearRing(const LinearRing& lr);
LinearRing(CoordinateSequence::Ptr && points,
const GeometryFactory& newFactory);
std::unique_ptr<LinearRing> clone() const
{
return std::unique_ptr<LinearRing>(cloneImpl());
}
~LinearRing() override = default;
int getBoundaryDimension() const override;
bool isClosed() const override;
std::string getGeometryType() const override;
GeometryTypeId getGeometryTypeId() const override;
void setPoints(const CoordinateSequence* cl);
std::unique_ptr<LinearRing> reverse() const { return std::unique_ptr<LinearRing>(reverseImpl()); }
void orient(bool isCW);
protected:
int
getSortIndex() const override
{
return SORTINDEX_LINEARRING;
};
LinearRing* cloneImpl() const override { return new LinearRing(*this); }
LinearRing* reverseImpl() const override;
private:
void validateConstruction();
};
} // namespace geos::geom
} // namespace geos
geos::geom::CoordinateSequence
The internal representation of a list of coordinates inside a Geometry.
Definition CoordinateSequence.h:56
geos::geom::Coordinate
Coordinate is the lightweight class used to store coordinates.
Definition Coordinate.h:217
geos::geom::LinearRing
Models an OGC SFS LinearRing. A LinearRing is a LineString which is both closed and simple.
Definition LinearRing.h:54
geos::geom::LinearRing::cloneImpl
LinearRing * cloneImpl() const override
Make a deep-copy of this Geometry.
Definition LinearRing.h:116
geos::geom::LinearRing::getBoundaryDimension
int getBoundaryDimension() const override
Returns Dimension.FALSE, since by definition LinearRings do not have a boundary.
geos::geom::LinearRing::LinearRing
LinearRing(CoordinateSequence::Ptr &&points, const GeometryFactory &newFactory)
Constructs a LinearRing with the given points.
geos::geom::LinearRing::getGeometryType
std::string getGeometryType() const override
Return a string representation of this Geometry type.
geos::geom::LinearRing::MINIMUM_VALID_SIZE
static const unsigned int MINIMUM_VALID_SIZE
The minimum number of vertices allowed in a valid non-empty ring. Empty rings with 0 vertices are als...
Definition LinearRing.h:62
geos::geom::LinearRing::getGeometryTypeId
GeometryTypeId getGeometryTypeId() const override
Return an integer representation of this Geometry type.
geos::geom::LinearRing::reverseImpl
LinearRing * reverseImpl() const override
Make a geometry with coordinates in reverse order.
geos::geom
Definition Angle.h:26
geos::geom::GeometryTypeId
GeometryTypeId
Geometry types.
Definition Geometry.h:73
geos
Basic namespace for all GEOS functionalities.
Definition geos.h:38