LocationIndexOfPoint.h
/**********************************************************************
*
* GEOS - Geometry Engine Open Source
* http://geos.osgeo.org
*
* Copyright (C) 2011 Sandro Santilli <strk@kbt.io>
* Copyright (C) 2005-2006 Refractions Research Inc.
* Copyright (C) 2001-2002 Vivid Solutions Inc.
*
* 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: linearref/LinearGeometryBuilder.java r466
*
**********************************************************************/
#pragma once
#include <geos/geom/Coordinate.h>
#include <geos/geom/Geometry.h>
#include <geos/linearref/LinearLocation.h>
namespace geos {
namespace linearref { // geos::linearref
class LocationIndexOfPoint {
private:
const geom::Geometry* linearGeom;
LinearLocation indexOfFromStart(const geom::CoordinateXY& inputPt, const LinearLocation* minIndex) const;
public:
static LinearLocation indexOf(const geom::Geometry* linearGeom, const geom::CoordinateXY& inputPt);
static LinearLocation indexOfAfter(const geom::Geometry* linearGeom, const geom::CoordinateXY& inputPt,
const LinearLocation* minIndex);
LocationIndexOfPoint(const geom::Geometry* linearGeom);
LinearLocation indexOf(const geom::CoordinateXY& inputPt) const;
LinearLocation indexOfAfter(const geom::CoordinateXY& inputPt, const LinearLocation* minIndex) const;
};
}
}
geos::geom::Geometry
Basic implementation of Geometry, constructed and destructed by GeometryFactory.
Definition Geometry.h:196
geos::linearref::LinearLocation
Represents a location along a LineString or MultiLineString.
Definition LinearLocation.h:43
geos::linearref::LocationIndexOfPoint::indexOfAfter
LinearLocation indexOfAfter(const geom::CoordinateXY &inputPt, const LinearLocation *minIndex) const
Find the nearest LinearLocation along the linear Geometry to a given Coordinate after the specified m...
geos::linearref::LocationIndexOfPoint::indexOf
LinearLocation indexOf(const geom::CoordinateXY &inputPt) const
Find the nearest location along a linear Geometry to a given point.
geos::linearref
Contains classes and interfaces implementing linear referencing on linear geometries.
Definition ExtractLineByLocation.h:27
geos
Basic namespace for all GEOS functionalities.
Definition geos.h:38