TaggedLineSegment.h
/**********************************************************************
*
* GEOS - Geometry Engine Open Source
* http://geos.osgeo.org
*
* Copyright (C) 2006 Refractions Research Inc.
*
* This is free software; you can redistribute and/or modify it under
* the terms of the GNU Lesser General Licence as published
* by the Free Software Foundation.
* See the COPYING file for more information.
*
**********************************************************************
*
* Last port: simplify/TaggedLineSegment.java rev. 1.1 (JTS-1.7)
*
**********************************************************************
*
* NOTES: Use of this class by DP simplification algorithms
* makes it useless for a TaggedLineSegment to store copies
* of coordinates. Using pointers would be good enough here.
* We don't do it to avoid having to break inheritance from
* LineSegment, which has copies instead. Whether LineSegment
* itself should be refactored can be discussed.
* --strk 2006-04-12
*
**********************************************************************/
#pragma once
#include <geos/export.h>
#include <geos/geom/LineSegment.h> // for inheritance
// Forward declarations
namespace geos {
namespace geom {
class Coordinate;
class Geometry;
}
}
namespace geos {
namespace simplify { // geos::simplify
class GEOS_DLL TaggedLineSegment: public geom::LineSegment {
public:
TaggedLineSegment(const geom::Coordinate& p0,
const geom::Coordinate& p1,
const geom::Geometry* parent,
std::size_t index);
TaggedLineSegment(const geom::Coordinate& p0,
const geom::Coordinate& p1);
TaggedLineSegment(const TaggedLineSegment& ls);
const geom::Geometry* getParent() const;
std::size_t getIndex() const;
private:
const geom::Geometry* parent;
std::size_t index;
};
} // namespace geos::simplify
} // namespace geos
geos::geom::Coordinate
Coordinate is the lightweight class used to store coordinates.
Definition Coordinate.h:217
geos::geom::Geometry
Basic implementation of Geometry, constructed and destructed by GeometryFactory.
Definition Geometry.h:196
geos::geom::LineSegment
Definition LineSegment.h:61
geos::geom::LineSegment::p1
Coordinate p1
Segment start.
Definition LineSegment.h:66
geos::geom
Definition Angle.h:26
geos::simplify
Classes which implement algorithms for simplifying or generalizing geometries.
Definition Corner.h:26
geos
Basic namespace for all GEOS functionalities.
Definition geos.h:38