GEOS
3.9.1dev
|
Coordinate is the lightweight class used to store coordinates. More...
#include <geos.h>
Classes | |
struct | HashCode |
Public Types | |
typedef std::set< const Coordinate *, CoordinateLessThen > | ConstSet |
A set of const Coordinate pointers. More... | |
typedef std::vector< const Coordinate * > | ConstVect |
A vector of const Coordinate pointers. More... | |
typedef std::stack< const Coordinate * > | ConstStack |
A stack of const Coordinate pointers. More... | |
typedef std::vector< Coordinate > | Vect |
A vector of Coordinate objects (real object, not pointers) More... | |
Public Member Functions | |
void | setNull () |
bool | isNull () const |
Coordinate (double xNew=0.0, double yNew=0.0, double zNew=DoubleNotANumber) | |
bool | equals2D (const Coordinate &other) const |
bool | equals (const Coordinate &other) const |
2D only More... | |
int | compareTo (const Coordinate &other) const |
TODO: deprecate this, move logic to CoordinateLessThen instead. More... | |
bool | equals3D (const Coordinate &other) const |
3D comparison More... | |
std::string | toString () const |
Returns a string of the form (x,y,z) . More... | |
double | distance (const Coordinate &p) const |
double | distanceSquared (const Coordinate &p) const |
Static Public Member Functions | |
static Coordinate & | getNull () |
Public Attributes | |
double | x |
x-coordinate More... | |
double | y |
y-coordinate More... | |
double | z |
z-coordinate More... | |
Static Private Attributes | |
static Coordinate | _nullCoord |
Coordinate is the lightweight class used to store coordinates.
It is distinct from Point, which is a subclass of Geometry. Unlike objects of type Point (which contain additional information such as an envelope, a precision model, and spatial reference system information), a Coordinate only contains ordinate values and accessor methods.
Coordinate objects are two-dimensional points, with an additional z-ordinate. JTS does not support any operations on the z-ordinate except the basic accessor functions.
Constructed coordinates will have a z-ordinate of DoubleNotANumber. The standard comparison functions will ignore the z-ordinate.
Definition at line 60 of file Coordinate.h.
typedef std::set<const Coordinate*, CoordinateLessThen> geos::geom::Coordinate::ConstSet |
A set of const Coordinate pointers.
Definition at line 68 of file Coordinate.h.
typedef std::stack<const Coordinate*> geos::geom::Coordinate::ConstStack |
A stack of const Coordinate pointers.
Definition at line 74 of file Coordinate.h.
typedef std::vector<const Coordinate*> geos::geom::Coordinate::ConstVect |
A vector of const Coordinate pointers.
Definition at line 71 of file Coordinate.h.
typedef std::vector<Coordinate> geos::geom::Coordinate::Vect |
A vector of Coordinate objects (real object, not pointers)
Definition at line 77 of file Coordinate.h.
geos::geom::Coordinate::Coordinate | ( | double | xNew = 0.0 , |
double | yNew = 0.0 , |
||
double | zNew = DoubleNotANumber |
||
) |
int geos::geom::Coordinate::compareTo | ( | const Coordinate & | other | ) | const |
TODO: deprecate this, move logic to CoordinateLessThen instead.
Referenced by geos::operation::overlayng::Edge::compareTo().
double geos::geom::Coordinate::distance | ( | const Coordinate & | p | ) | const |
TODO: obsoleted this, can use PrecisionModel::makePrecise(Coordinate*) instead
Referenced by geos::triangulate::quadedge::Vertex::equals(), and geos::operation::buffer::OffsetSegmentString::isRedundant().
double geos::geom::Coordinate::distanceSquared | ( | const Coordinate & | p | ) | const |
Referenced by geos::algorithm::CentralEndpointIntersector::findNearestPoint(), geos::algorithm::distance::PointPairDistance::initialize(), geos::algorithm::distance::PointPairDistance::setMaximum(), and geos::algorithm::distance::PointPairDistance::setMinimum().
bool geos::geom::Coordinate::equals | ( | const Coordinate & | other | ) | const |
2D only
Referenced by geos::operation::buffer::OffsetSegmentString::closeRing().
bool geos::geom::Coordinate::equals2D | ( | const Coordinate & | other | ) | const |
Referenced by geos::noding::NodedSegmentString::addIntersectionNode(), geos::noding::SegmentPointComparator::compare(), geos::geom::CoordinateList::insert(), and geos::geomgraph::Node::testInvariant().
bool geos::geom::Coordinate::equals3D | ( | const Coordinate & | other | ) | const |
3D comparison
|
static |
Referenced by geos::algorithm::CentralEndpointIntersector::findNearestPoint().
bool geos::geom::Coordinate::isNull | ( | ) | const |
void geos::geom::Coordinate::setNull | ( | ) |
Referenced by geos::algorithm::MinimumBoundingCircle::MinimumBoundingCircle().
std::string geos::geom::Coordinate::toString | ( | ) | const |
Returns a string of the form (x,y,z) .
|
staticprivate |
Definition at line 64 of file Coordinate.h.
double geos::geom::Coordinate::x |
x-coordinate
Definition at line 80 of file Coordinate.h.
Referenced by geos::algorithm::CentralEndpointIntersector::average(), geos::noding::SegmentPointComparator::compare(), geos::geom::Envelope::contains(), geos::triangulate::quadedge::Vertex::cross(), geos::triangulate::quadedge::Vertex::crossProduct(), geos::edgegraph::HalfEdge::directionX(), geos::triangulate::quadedge::Vertex::dot(), geos::triangulate::quadedge::Vertex::equals(), geos::operation::overlayng::PrecisionUtil::InherentScaleFilter::filter_ro(), geos::index::kdtree::KdNode::getX(), geos::triangulate::quadedge::Vertex::getX(), geos::triangulate::quadedge::Vertex::isCCW(), geos::triangulate::quadedge::Vertex::magn(), geos::geom::LineSegment::HashCode::operator()(), geos::triangulate::quadedge::Vertex::sub(), geos::triangulate::quadedge::Vertex::sum(), and geos::triangulate::quadedge::Vertex::times().
double geos::geom::Coordinate::y |
y-coordinate
Definition at line 83 of file Coordinate.h.
Referenced by geos::algorithm::CentralEndpointIntersector::average(), geos::noding::SegmentPointComparator::compare(), geos::geom::Envelope::contains(), geos::triangulate::quadedge::Vertex::cross(), geos::triangulate::quadedge::Vertex::crossProduct(), geos::edgegraph::HalfEdge::directionY(), geos::triangulate::quadedge::Vertex::dot(), geos::triangulate::quadedge::Vertex::equals(), geos::operation::overlayng::PrecisionUtil::InherentScaleFilter::filter_ro(), geos::index::kdtree::KdNode::getY(), geos::triangulate::quadedge::Vertex::getY(), geos::triangulate::quadedge::Vertex::isCCW(), geos::triangulate::quadedge::Vertex::magn(), geos::geom::LineSegment::HashCode::operator()(), geos::triangulate::quadedge::Vertex::sub(), geos::triangulate::quadedge::Vertex::sum(), and geos::triangulate::quadedge::Vertex::times().
double geos::geom::Coordinate::z |
z-coordinate
Definition at line 86 of file Coordinate.h.
Referenced by geos::triangulate::quadedge::Vertex::getZ(), and geos::triangulate::quadedge::Vertex::setZ().