PreparedLineStringDistance.h
/**********************************************************************
*
* GEOS - Geometry Engine Open Source
* http://geos.osgeo.org
*
* Copyright (C) 2020 Sandro Santilli <strk@kbt.io>
*
* 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: ORIGINAL WORK
*
**********************************************************************/
#pragma once
namespace geos {
namespace geom { // geos::geom
class Geometry;
namespace prep { // geos::geom::prep
class PreparedLineString;
class PreparedLineStringDistance {
public:
static double distance(const PreparedLineString& prep, const geom::Geometry* geom)
{
PreparedLineStringDistance op(prep);
return op.distance(geom);
}
PreparedLineStringDistance(const PreparedLineString& prep)
: prepLine(prep)
{ }
double distance(const geom::Geometry* g) const;
bool isWithinDistance(const geom::Geometry* g, double d) const;
protected:
const PreparedLineString& prepLine;
// Declare type as noncopyable
PreparedLineStringDistance(const PreparedLineStringDistance& other) = delete;
PreparedLineStringDistance& operator=(const PreparedLineStringDistance& rhs) = delete;
};
} // namespace geos::geom::prep
} // namespace geos::geom
} // namespace geos
geos::geom::Geometry
Basic implementation of Geometry, constructed and destructed by GeometryFactory.
Definition Geometry.h:196
geos::geom::prep::PreparedLineString
A prepared version of LinearRing, LineString or MultiLineString geometries.
Definition PreparedLineString.h:41
geos::geom::prep
Contains classes and interfaces implementing algorithms that optimize the performance of repeated cal...
Definition AbstractPreparedPolygonContains.h:30
geos::geom
Definition Angle.h:26
geos
Basic namespace for all GEOS functionalities.
Definition geos.h:38