ExtractLineByLocation.h
/**********************************************************************
*
* GEOS - Geometry Engine Open Source
* http://geos.osgeo.org
*
* 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/ExtractLineByLocation.java rev. 1.10
*
**********************************************************************/
#pragma once
#include <geos/geom/Coordinate.h>
#include <geos/geom/Geometry.h>
#include <geos/linearref/LinearLocation.h>
namespace geos {
namespace linearref { // geos::linearref
class ExtractLineByLocation {
private:
const geom::Geometry* line;
std::unique_ptr<geom::Geometry> reverse(const geom::Geometry* linear);
std::unique_ptr<geom::LineString> computeLine(const LinearLocation& start, const LinearLocation& end);
std::unique_ptr<geom::Geometry> computeLinear(const LinearLocation& start, const LinearLocation& end);
public:
static std::unique_ptr<geom::Geometry> extract(const geom::Geometry* line, const LinearLocation& start, const LinearLocation& end);
ExtractLineByLocation(const geom::Geometry* line);
std::unique_ptr<geom::Geometry> extract(const LinearLocation& start, const LinearLocation& end);
};
}
}
geos::geom::Geometry
Basic implementation of Geometry, constructed and destructed by GeometryFactory.
Definition Geometry.h:196
geos::linearref::ExtractLineByLocation::extract
static std::unique_ptr< geom::Geometry > extract(const geom::Geometry *line, const LinearLocation &start, const LinearLocation &end)
Computes the subline of a LineString between two LinearLocations on the line.
geos::linearref::ExtractLineByLocation::extract
std::unique_ptr< geom::Geometry > extract(const LinearLocation &start, const LinearLocation &end)
Extracts a subline of the input.
geos::linearref::LinearLocation
Represents a location along a LineString or MultiLineString.
Definition LinearLocation.h:43
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