[geos-commits] r2441 - in trunk/source: geom headers/geos/geom
svn_geos at osgeo.org
svn_geos at osgeo.org
Thu Apr 30 08:07:27 EDT 2009
Author: strk
Date: 2009-04-30 08:07:26 -0400 (Thu, 30 Apr 2009)
New Revision: 2441
Modified:
trunk/source/geom/LineString.cpp
trunk/source/headers/geos/geom/LineString.h
Log:
LineString to rev 1.46 : don't override isSimple, always return MultiPoint as bondary
Modified: trunk/source/geom/LineString.cpp
===================================================================
--- trunk/source/geom/LineString.cpp 2009-04-30 11:47:17 UTC (rev 2440)
+++ trunk/source/geom/LineString.cpp 2009-04-30 12:07:26 UTC (rev 2441)
@@ -12,11 +12,14 @@
* by the Free Software Foundation.
* See the COPYING file for more information.
*
+ **********************************************************************
+ *
+ * Last port: geom/LineString.java rev. 1.46
+ *
**********************************************************************/
#include <geos/util/IllegalArgumentException.h>
#include <geos/algorithm/CGAlgorithms.h>
-#include <geos/operation/IsSimpleOp.h>
#include <geos/geom/Coordinate.h>
#include <geos/geom/CoordinateSequenceFactory.h>
#include <geos/geom/CoordinateSequence.h>
@@ -204,19 +207,15 @@
return "LineString";
}
-bool
-LineString::isSimple() const
-{
- operation::IsSimpleOp iso;
- return iso.isSimple(this);
-}
-
Geometry*
LineString::getBoundary() const
{
if (isEmpty()) {
- return getFactory()->createEmptyGeometry();
+ return getFactory()->createMultiPoint();
}
+
+ // using the default OGC_SFS MOD2 rule, the boundary of a
+ // closed LineString is empty
if (isClosed()) {
return getFactory()->createMultiPoint();
}
Modified: trunk/source/headers/geos/geom/LineString.h
===================================================================
--- trunk/source/headers/geos/geom/LineString.h 2009-04-30 11:47:17 UTC (rev 2440)
+++ trunk/source/headers/geos/geom/LineString.h 2009-04-30 12:07:26 UTC (rev 2441)
@@ -12,6 +12,10 @@
* by the Free Software Foundation.
* See the COPYING file for more information.
*
+ **********************************************************************
+ *
+ * Last port: geom/LineString.java rev. 1.46
+ *
**********************************************************************/
#ifndef GEOS_GEOS_LINESTRING_H
@@ -55,6 +59,12 @@
virtual ~LineString();
+ /**
+ * Creates and returns a full copy of this {@link LineString} object.
+ * (including all coordinates contained by it).
+ *
+ * @return a clone of this instance
+ */
virtual Geometry *clone() const;
virtual CoordinateSequence* getCoordinates() const;
@@ -107,8 +117,6 @@
virtual GeometryTypeId getGeometryTypeId() const;
- virtual bool isSimple() const;
-
virtual bool isCoordinate(Coordinate& pt) const;
virtual bool equalsExact(const Geometry *other, double tolerance=0)
More information about the geos-commits
mailing list