GEOS  3.12.0dev
Public Types | Public Member Functions | Static Public Member Functions | Public Attributes | List of all members
geos::geom::Coordinate Class Reference

Coordinate is the lightweight class used to store coordinates. More...

#include <geos.h>

Inherits geos::geom::CoordinateXY.

Inherited by geos::geom::CoordinateXYZM.

Public Types

typedef std::set< const Coordinate *, CoordinateLessThenConstSet
 A set of const Coordinate pointers.
 
typedef std::vector< const Coordinate * > ConstVect
 A vector of const Coordinate pointers.
 
typedef std::stack< const Coordinate * > ConstStack
 A stack of const Coordinate pointers.
 
typedef std::vector< CoordinateVect
 A vector of Coordinate objects (real object, not pointers)
 

Public Member Functions

 Coordinate (double xNew, double yNew, double zNew=DEFAULT_Z)
 
 Coordinate (const CoordinateXY &other)
 
void setNull ()
 
bool isNull () const
 
bool equals3D (const Coordinate &other) const
 3D comparison
 
std::string toString () const
 Returns a string of the form (x,y,z) .
 
Coordinateoperator= (const CoordinateXY &other)
 

Static Public Member Functions

static const CoordinategetNull ()
 

Public Attributes

double z
 z-coordinate
 

Detailed Description

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.


The documentation for this class was generated from the following file: