GEOS  3.9.1dev
ExtractLineByLocation.h
Go to the documentation of this file.
1 /**********************************************************************
2  *
3  * GEOS - Geometry Engine Open Source
4  * http://geos.osgeo.org
5  *
6  * Copyright (C) 2005-2006 Refractions Research Inc.
7  * Copyright (C) 2001-2002 Vivid Solutions Inc.
8  *
9  * This is free software; you can redistribute and/or modify it under
10  * the terms of the GNU Lesser General Public Licence as published
11  * by the Free Software Foundation.
12  * See the COPYING file for more information.
13  *
14  **********************************************************************
15  *
16  * Last port: linearref/ExtractLineByLocation.java rev. 1.10
17  *
18  **********************************************************************/
19 
20 #ifndef GEOS_LINEARREF_EXTRACTLINEBYLOCATION_H
21 #define GEOS_LINEARREF_EXTRACTLINEBYLOCATION_H
22 
23 #include <geos/geom/Coordinate.h>
24 #include <geos/geom/Geometry.h>
26 
27 namespace geos {
28 namespace linearref { // geos::linearref
29 
35 
36 private:
38  std::unique_ptr<geom::Geometry> reverse(const geom::Geometry* linear);
39 
47  std::unique_ptr<geom::LineString> computeLine(const LinearLocation& start, const LinearLocation& end);
48 
56  std::unique_ptr<geom::Geometry> computeLinear(const LinearLocation& start, const LinearLocation& end);
57 
58 public:
71  static std::unique_ptr<geom::Geometry> extract(const geom::Geometry* line, const LinearLocation& start, const LinearLocation& end);
72 
74 
84  std::unique_ptr<geom::Geometry> extract(const LinearLocation& start, const LinearLocation& end);
85 
86 };
87 }
88 }
89 #endif
ExtractLineByLocation(const geom::Geometry *line)
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.
Basic implementation of Geometry, constructed and destructed by GeometryFactory.
Definition: Geometry.h:188
Extracts the subline of a linear Geometry between two LinearLocations on the line.
Represents a location along a LineString or MultiLineString.
std::unique_ptr< geom::LineString > computeLine(const LinearLocation &start, const LinearLocation &end)
Basic namespace for all GEOS functionalities.
std::unique_ptr< geom::Geometry > reverse(const geom::Geometry *linear)
std::unique_ptr< geom::Geometry > computeLinear(const LinearLocation &start, const LinearLocation &end)