Quotes around otherwise ambiguous (underline containing) name
[geos.git] / src / geom / MultiPoint.cpp
blobaed6bccec1753cd2766e63d4d3a866b20d903083
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>
25 #include <vector>
27 using namespace std;
29 //using namespace geos::operation;
31 namespace geos {
32 namespace geom { // geos::geom
34 /*protected*/
35 MultiPoint::MultiPoint(vector<Geometry *> *newPoints, const GeometryFactory *factory)
37 Geometry(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 {
55 return "MultiPoint";
58 Geometry* MultiPoint::getBoundary() const {
59 return getFactory()->createGeometryCollection();
62 bool
63 MultiPoint::equalsExact(const Geometry *other, double tolerance) const
65 if (!isEquivalentClass(other)) {
66 return false;
68 return GeometryCollection::equalsExact(other,tolerance);
71 const Coordinate* MultiPoint::getCoordinateN(int n) const {
72 return ((*geometries)[n])->getCoordinate();
74 GeometryTypeId
75 MultiPoint::getGeometryTypeId() const {
76 return GEOS_MULTIPOINT;
79 } // namespace geos::geom
80 } // namespace geos