GEOS
3.14.0dev
include
geos
geom
util
ComponentCoordinateExtracter.h
1
/**********************************************************************
2
*
3
* GEOS - Geometry Engine Open Source
4
* http://geos.osgeo.org
5
*
6
* Copyright (C) 2001-2002 Vivid Solutions Inc.
7
* Copyright (C) 2006 Refractions Research 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
#pragma once
17
18
#include <vector>
19
20
#include <geos/geom/GeometryComponentFilter.h>
21
#include <geos/geom/Geometry.h>
// to be removed when we have the .inl
22
#include <geos/geom/Coordinate.h>
// to be removed when we have the .inl
23
#include <geos/geom/LineString.h>
// to be removed when we have the .inl
24
#include <geos/geom/Point.h>
// to be removed when we have the .inl
25
26
namespace
geos
{
27
namespace
geom {
// geos::geom
28
namespace
util {
// geos::geom::util
29
36
class
ComponentCoordinateExtracter
:
public
GeometryComponentFilter
{
37
public
:
45
static
void
getCoordinates
(
const
Geometry
& geom, std::vector<const CoordinateXY*>& ret);
46
51
ComponentCoordinateExtracter
(std::vector<const CoordinateXY*>& newComps);
52
53
void
filter_rw
(
Geometry
* geom)
override
;
54
55
void
filter_ro(
const
Geometry
* geom)
override
;
56
57
private
:
58
59
std::vector<const CoordinateXY*>& comps;
60
61
// Declare type as noncopyable
62
ComponentCoordinateExtracter
(
const
ComponentCoordinateExtracter
& other) =
delete
;
63
ComponentCoordinateExtracter
& operator=(
const
ComponentCoordinateExtracter
& rhs) =
delete
;
64
};
65
66
}
// namespace geos.geom.util
67
}
// namespace geos.geom
68
}
// namespace geos
69
geos::geom::GeometryComponentFilter
Definition
GeometryComponentFilter.h:41
geos::geom::Geometry
Basic implementation of Geometry, constructed and destructed by GeometryFactory.
Definition
Geometry.h:197
geos::geom::util::ComponentCoordinateExtracter
Extracts a single representative Coordinate from each connected component of a Geometry.
Definition
ComponentCoordinateExtracter.h:36
geos::geom::util::ComponentCoordinateExtracter::getCoordinates
static void getCoordinates(const Geometry &geom, std::vector< const CoordinateXY * > &ret)
geos::geom::util::ComponentCoordinateExtracter::filter_rw
void filter_rw(Geometry *geom) override
geos::geom::util::ComponentCoordinateExtracter::ComponentCoordinateExtracter
ComponentCoordinateExtracter(std::vector< const CoordinateXY * > &newComps)
geos
Basic namespace for all GEOS functionalities.
Definition
geos.h:39
Generated by
1.9.8