GEOS 3.11.1
CoordinateSequenceFactory.h
1/**********************************************************************
2 *
3 * GEOS - Geometry Engine Open Source
4 * http://geos.osgeo.org
5 *
6 * Copyright (C) 2006 Refractions Research Inc.
7 *
8 * This is free software; you can redistribute and/or modify it under
9 * the terms of the GNU Lesser General Public Licence as published
10 * by the Free Software Foundation.
11 * See the COPYING file for more information.
12 *
13 **********************************************************************
14 *
15 * Last port: geom/CoordinateSequenceFactory.java r591 (JTS-1.12)
16 *
17 **********************************************************************/
18
19#pragma once
20
21
22#include <geos/export.h>
23#include <memory>
24#include <vector>
25
26// Forward declarations
27namespace geos {
28namespace geom {
29class CoordinateSequence;
30class Coordinate;
31}
32}
33
34namespace geos {
35namespace geom { // geos::geom
36
45public:
46
51 virtual std::unique_ptr<CoordinateSequence> create() const = 0;
52
68 virtual std::unique_ptr<CoordinateSequence> create(
69 std::vector<Coordinate>* coordinates,
70 std::size_t dimension = 0) const = 0;
71
78 virtual std::unique_ptr<CoordinateSequence> create(
79 std::vector<Coordinate> && coordinates,
80 std::size_t dimension = 0) const = 0;
81
92 virtual std::unique_ptr<CoordinateSequence> create(std::size_t size,
93 std::size_t dimension = 0) const = 0;
94
102 virtual std::unique_ptr<CoordinateSequence> create(const CoordinateSequence& coordSeq) const = 0;
103
104 virtual ~CoordinateSequenceFactory() = default;
105};
106
107} // namespace geos::geom
108} // namespace geos
109
A factory to create concrete instances of CoordinateSequences.
Definition: CoordinateSequenceFactory.h:44
virtual std::unique_ptr< CoordinateSequence > create(std::size_t size, std::size_t dimension=0) const =0
Creates a CoordinateSequence of the specified size and dimension.
virtual std::unique_ptr< CoordinateSequence > create(std::vector< Coordinate > *coordinates, std::size_t dimension=0) const =0
Returns a CoordinateSequence based on the given array.
virtual std::unique_ptr< CoordinateSequence > create(const CoordinateSequence &coordSeq) const =0
Creates a CoordinateSequence which is a copy of the given one.
virtual std::unique_ptr< CoordinateSequence > create(std::vector< Coordinate > &&coordinates, std::size_t dimension=0) const =0
Returns a CoordinateSequence based on the given array.
virtual std::unique_ptr< CoordinateSequence > create() const =0
Returns an empty CoordinateSequence, the dimensions will be autodetected when it is populated.
The internal representation of a list of coordinates inside a Geometry.
Definition: CoordinateSequence.h:44
Basic namespace for all GEOS functionalities.
Definition: geos.h:39