17#include <geos/geom/CoordinateSequenceFactory.h>
18#include <geos/geom/CoordinateArraySequence.h>
19#include <geos/geom/FixedSizeCoordinateSequence.h>
27 std::unique_ptr<CoordinateSequence> create() const final
override {
28 return detail::make_unique<CoordinateArraySequence>();
31 std::unique_ptr<CoordinateSequence> create(std::vector<Coordinate> *coords, std::size_t dims = 0) const final
override {
32 return detail::make_unique<CoordinateArraySequence>(coords, dims);
35 std::unique_ptr <CoordinateSequence> create(std::vector <Coordinate> &&coords, std::size_t dims = 0) const final
override {
36 return detail::make_unique<CoordinateArraySequence>(std::move(coords), dims);
39 std::unique_ptr <CoordinateSequence> create(std::size_t size, std::size_t dims = 0) const final
override {
41 case 5:
return detail::make_unique<FixedSizeCoordinateSequence<5>>(dims);
42 case 4:
return detail::make_unique<FixedSizeCoordinateSequence<4>>(dims);
43 case 3:
return detail::make_unique<FixedSizeCoordinateSequence<3>>(dims);
44 case 2:
return detail::make_unique<FixedSizeCoordinateSequence<2>>(dims);
45 case 1:
return detail::make_unique<FixedSizeCoordinateSequence<1>>(dims);
47 return detail::make_unique<CoordinateArraySequence>(size, dims);
51 std::unique_ptr <CoordinateSequence> create(
const CoordinateSequence &coordSeq)
const final override {
52 auto cs = create(coordSeq.size(), coordSeq.getDimension());
53 for (std::size_t i = 0; i < cs->size(); i++) {
54 cs->setAt(coordSeq[i], i);
59 static const CoordinateSequenceFactory *instance();
CoordinateArraySequenceFactory DefaultCoordinateSequenceFactory
This is for backward API compatibility.
Definition: CoordinateArraySequenceFactory.h:82
Basic namespace for all GEOS functionalities.
Definition: geos.h:39