GEOS 3.9.1
CoordinateArraySequenceFactory.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#ifndef GEOS_GEOM_COORDINATEARRAYSEQUENCEFACTORY_H
16#define GEOS_GEOM_COORDINATEARRAYSEQUENCEFACTORY_H
17
18
19#include <geos/export.h>
20#include <vector>
21
22#include <geos/geom/CoordinateSequenceFactory.h> // for inheritance
23
24#include <geos/inline.h>
25
26// Forward declarations
27namespace geos {
28namespace geom {
29class Coordinate;
30}
31}
32
33namespace geos {
34namespace geom { // geos::geom
35
44
45public:
46 std::unique_ptr<CoordinateSequence> create() const override;
47
48 std::unique_ptr<CoordinateSequence> create(std::vector<Coordinate>* coords, std::size_t dims = 0) const override;
49
50 std::unique_ptr<CoordinateSequence> create(std::vector<Coordinate> && coords, std::size_t dims = 0) const override;
51
53 std::unique_ptr<CoordinateSequence> create(std::size_t size, std::size_t dimension = 0) const override;
54
55 std::unique_ptr<CoordinateSequence> create(const CoordinateSequence& coordSeq) const override;
56
61};
62
65
66} // namespace geos::geom
67} // namespace geos
68
69#ifdef GEOS_INLINE
70# include "geos/geom/CoordinateArraySequenceFactory.inl"
71#endif
72
73#endif // ndef GEOS_GEOM_COORDINATEARRAYSEQUENCEFACTORY_H
Creates CoordinateSequences internally represented as an array of Coordinates.
Definition CoordinateArraySequenceFactory.h:43
static const CoordinateSequenceFactory * instance()
Returns the singleton instance of CoordinateArraySequenceFactory.
std::unique_ptr< CoordinateSequence > create(const CoordinateSequence &coordSeq) const override
Creates a CoordinateSequence which is a copy of the given one.
std::unique_ptr< CoordinateSequence > create(std::size_t size, std::size_t dimension=0) const override
std::unique_ptr< CoordinateSequence > create() const override
Returns an empty CoordinateSequence, the dimensions will be autodetected when it is populated.
std::unique_ptr< CoordinateSequence > create(std::vector< Coordinate > &&coords, std::size_t dims=0) const override
Returns a CoordinateSequence based on the given array.
std::unique_ptr< CoordinateSequence > create(std::vector< Coordinate > *coords, std::size_t dims=0) const override
Returns a CoordinateSequence based on the given array.
A factory to create concrete instances of CoordinateSequences.
Definition CoordinateSequenceFactory.h:48
The internal representation of a list of coordinates inside a Geometry.
Definition CoordinateSequence.h:58
CoordinateArraySequenceFactory DefaultCoordinateSequenceFactory
This is for backward API compatibility.
Definition CoordinateArraySequenceFactory.h:64
Basic namespace for all GEOS functionalities.
Definition IndexedNestedRingTester.h:26