GEOS  3.4.2
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
27 namespace geos {
28  namespace geom {
29  class Coordinate;
30  }
31 }
32 
33 namespace geos {
34 namespace geom { // geos::geom
35 
44 
45 public:
46 
51  CoordinateSequence *create(std::vector<Coordinate> *coords) const;
52 
53  CoordinateSequence *create(std::vector<Coordinate> *coords, std::size_t dims) const;
54 
56  CoordinateSequence *create(std::size_t size, std::size_t dimension=0) const;
57 
58  CoordinateSequence *create(const CoordinateSequence &coordSeq) const;
59 
63  static const CoordinateSequenceFactory *instance();
64 };
65 
68 
69 } // namespace geos::geom
70 } // namespace geos
71 
72 #ifdef GEOS_INLINE
73 # include "geos/geom/CoordinateArraySequenceFactory.inl"
74 #endif
75 
76 #endif // ndef GEOS_GEOM_COORDINATEARRAYSEQUENCEFACTORY_H
Creates CoordinateSequences internally represented as an array of Coordinates.
Definition: CoordinateArraySequenceFactory.h:43
A factory to create concrete instances of CoordinateSequences.
Definition: CoordinateSequenceFactory.h:47
The internal representation of a list of coordinates inside a Geometry.
Definition: CoordinateSequence.h:59
CoordinateArraySequenceFactory DefaultCoordinateSequenceFactory
This is for backward API compatibility.
Definition: CoordinateArraySequenceFactory.h:67