GEOS 3.9.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#ifndef GEOS_GEOM_COORDINATESEQUENCEFACTORY_H
20#define GEOS_GEOM_COORDINATESEQUENCEFACTORY_H
21
22
23#include <geos/export.h>
24#include <memory>
25#include <vector>
26
27//#include <geos/geom/Coordinate.h>
28#include <geos/inline.h>
29
30// Forward declarations
31namespace geos {
32namespace geom {
33class CoordinateSequence;
34class Coordinate;
35}
36}
37
38namespace geos {
39namespace geom { // geos::geom
40
49public:
50
55 virtual std::unique_ptr<CoordinateSequence> create() const = 0;
56
72 virtual std::unique_ptr<CoordinateSequence> create(
73 std::vector<Coordinate>* coordinates,
74 std::size_t dimension = 0) const = 0;
75
82 virtual std::unique_ptr<CoordinateSequence> create(
83 std::vector<Coordinate> && coordinates,
84 std::size_t dimension = 0) const = 0;
85
96 virtual std::unique_ptr<CoordinateSequence> create(std::size_t size,
97 std::size_t dimension = 0) const = 0;
98
106 virtual std::unique_ptr<CoordinateSequence> create(const CoordinateSequence& coordSeq) const = 0;
107
108 virtual ~CoordinateSequenceFactory() = default;
109};
110
111} // namespace geos::geom
112} // namespace geos
113
114//#ifdef GEOS_INLINE
115//# include "geos/geom/CoordinateSequenceFactory.inl"
116//#endif
117
118#endif // ndef GEOS_GEOM_COORDINATESEQUENCEFACTORY_H
A factory to create concrete instances of CoordinateSequences.
Definition CoordinateSequenceFactory.h:48
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:58
Basic namespace for all GEOS functionalities.
Definition IndexedNestedRingTester.h:26