DYT/Tool/OpenSceneGraph-3.6.5/include/geos/geom/prep/PreparedLineStringNearestPoints.h
2024-12-25 07:49:36 +08:00

55 lines
1.5 KiB
C++

/**********************************************************************
*
* 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
namespace prep { // geos::geom::prep
class PreparedLineStringNearestPoints {
public:
static std::unique_ptr<geom::CoordinateSequence>
nearestPoints(const PreparedLineString& prep, const geom::Geometry* geom)
{
PreparedLineStringNearestPoints op(prep);
return op.nearestPoints(geom);
}
PreparedLineStringNearestPoints(const PreparedLineString& prep)
: prepLine(prep)
{ }
std::unique_ptr<geom::CoordinateSequence> nearestPoints(const geom::Geometry* g) const;
protected:
const PreparedLineString& prepLine;
// Declare type as noncopyable
PreparedLineStringNearestPoints(const PreparedLineStringNearestPoints& other) = delete;
PreparedLineStringNearestPoints& operator=(const PreparedLineStringNearestPoints& rhs) = delete;
};
} // namespace geos::geom::prep
} // namespace geos::geom
} // namespace geos