1 /**********************************************************************
3 * GEOS - Geometry Engine Open Source
4 * http://geos.osgeo.org
6 * Copyright (C) 2011 Sandro Santilli <strk@kbt.io>
7 * Copyright (C) 2005-2006 Refractions Research Inc.
8 * Copyright (C) 2001-2002 Vivid Solutions Inc.
10 * This is free software; you can redistribute and/or modify it under
11 * the terms of the GNU Lesser General Public Licence as published
12 * by the Free Software Foundation.
13 * See the COPYING file for more information.
15 **********************************************************************
17 * Last port: geom/MultiPoint.java r320 (JTS-1.12)
19 **********************************************************************/
21 #include <geos/geom/MultiPoint.h>
22 #include <geos/geom/GeometryFactory.h>
23 #include <geos/geom/Dimension.h>
29 //using namespace geos::operation;
32 namespace geom
{ // geos::geom
35 MultiPoint::MultiPoint(vector
<Geometry
*> *newPoints
, const GeometryFactory
*factory
)
38 GeometryCollection(newPoints
,factory
)
43 MultiPoint::~MultiPoint(){}
45 Dimension::DimensionType
46 MultiPoint::getDimension() const {
47 return Dimension::P
; // point
50 int MultiPoint::getBoundaryDimension() const {
51 return Dimension::False
;
54 string
MultiPoint::getGeometryType() const {
58 Geometry
* MultiPoint::getBoundary() const {
59 return getFactory()->createGeometryCollection();
63 MultiPoint::equalsExact(const Geometry
*other
, double tolerance
) const
65 if (!isEquivalentClass(other
)) {
68 return GeometryCollection::equalsExact(other
,tolerance
);
71 const Coordinate
* MultiPoint::getCoordinateN(int n
) const {
72 return ((*geometries
)[n
])->getCoordinate();
75 MultiPoint::getGeometryTypeId() const {
76 return GEOS_MULTIPOINT
;
79 } // namespace geos::geom