PointLocation.h
/**********************************************************************
*
* GEOS - Geometry Engine Open Source
* http://geos.osgeo.org
*
* Copyright (C) 2018 Paul Ramsey <pramsey@cleverlephant.ca>
*
* 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: algorithm/PointLocation.java @ 2017-09-04
*
**********************************************************************/
#pragma once
#include <geos/export.h>
#include <geos/geom/Location.h>
#include <vector>
namespace geos {
namespace geom {
class Coordinate;
class CoordinateXY;
class CoordinateSequence;
class Curve;
}
namespace algorithm { // geos::algorithm
class GEOS_DLL PointLocation {
public:
static bool isOnSegment(const geom::CoordinateXY& p, const geom::CoordinateXY& p0, const geom::CoordinateXY& p1);
static bool isOnLine(const geom::CoordinateXY& p, const geom::CoordinateSequence* line);
static bool isInRing(const geom::CoordinateXY& p, const std::vector<const geom::Coordinate*>& ring);
static bool isInRing(const geom::CoordinateXY& p, const geom::CoordinateSequence* ring);
static geom::Location locateInRing(const geom::CoordinateXY& p, const std::vector<const geom::Coordinate*>& ring);
static geom::Location locateInRing(const geom::CoordinateXY& p, const geom::CoordinateSequence& ring);
static geom::Location locateInRing(const geom::CoordinateXY& p, const geom::Curve& ring);
};
} // namespace geos::algorithm
} // namespace geos
geos::algorithm::PointLocation
Functions for locating points within basic geometric structures such as lines and rings.
Definition PointLocation.h:43
geos::algorithm::PointLocation::isOnSegment
static bool isOnSegment(const geom::CoordinateXY &p, const geom::CoordinateXY &p0, const geom::CoordinateXY &p1)
Tests whether a point lies on a line segment.
geos::algorithm::PointLocation::isOnLine
static bool isOnLine(const geom::CoordinateXY &p, const geom::CoordinateSequence *line)
Tests whether a point lies on the line defined by a CoordinateSequence.
geos::algorithm::PointLocation::isInRing
static bool isInRing(const geom::CoordinateXY &p, const std::vector< const geom::Coordinate * > &ring)
Tests whether a point lies inside or on a ring.
geos::algorithm::PointLocation::locateInRing
static geom::Location locateInRing(const geom::CoordinateXY &p, const std::vector< const geom::Coordinate * > &ring)
Determines whether a point lies in the interior, on the boundary, or in the exterior of a ring....
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::algorithm
Contains classes and interfaces implementing fundamental computational geometry algorithms.
Definition Angle.h:32
geos::geom
Definition Angle.h:26
geos::geom::Location
Location
Constants representing the location of a point relative to a geometry.
Definition Location.h:32
geos
Basic namespace for all GEOS functionalities.
Definition geos.h:38