[geos-commits] r2440 - in trunk/source: geom headers/geos/geom
svn_geos at osgeo.org
svn_geos at osgeo.org
Thu Apr 30 07:47:17 EDT 2009
Author: strk
Date: 2009-04-30 07:47:17 -0400 (Thu, 30 Apr 2009)
New Revision: 2440
Modified:
trunk/source/geom/Polygon.cpp
trunk/source/headers/geos/geom/Polygon.h
Log:
Polygon to rev 1.50 (getBoundary always return MultiLineString)
Modified: trunk/source/geom/Polygon.cpp
===================================================================
--- trunk/source/geom/Polygon.cpp 2009-04-30 11:42:05 UTC (rev 2439)
+++ trunk/source/geom/Polygon.cpp 2009-04-30 11:47:17 UTC (rev 2440)
@@ -14,7 +14,7 @@
*
**********************************************************************
*
- * Last port: geom/Polygon.java rev. 1.47
+ * Last port: geom/Polygon.java rev. 1.50
*
**********************************************************************/
@@ -209,7 +209,7 @@
const GeometryFactory* gf = getFactory();
if (isEmpty()) {
- return gf->createEmptyGeometry();
+ return gf->createMultiLineString();
}
if ( ! holes->size() )
Modified: trunk/source/headers/geos/geom/Polygon.h
===================================================================
--- trunk/source/headers/geos/geom/Polygon.h 2009-04-30 11:42:05 UTC (rev 2439)
+++ trunk/source/headers/geos/geom/Polygon.h 2009-04-30 11:47:17 UTC (rev 2440)
@@ -14,7 +14,7 @@
*
**********************************************************************
*
- * Last port: geom/Polygon.java rev. 1.47
+ * Last port: geom/Polygon.java rev. 1.50
*
**********************************************************************/
@@ -72,6 +72,12 @@
virtual ~Polygon();
+ /**
+ * Creates and returns a full copy of this {@link Polygon} object.
+ * (including all coordinates contained by it).
+ *
+ * @return a clone of this instance
+ */
virtual Geometry *clone() const { return new Polygon(*this); }
CoordinateSequence* getCoordinates() const;
@@ -84,11 +90,11 @@
/// Returns 1 (Polygon boundary is a MultiLineString)
int getBoundaryDimension() const;
- /**
- * \brief
- * Returns a MultiLineString.
- * One LineString for the shell and one for each hole.
- * Empty for an empty Polygon.
+ /** \brief
+ * Computes the boundary of this geometry
+ *
+ * @return a lineal geometry (which may be empty)
+ * @see Geometry#getBoundary
*/
Geometry* getBoundary() const;
More information about the geos-commits
mailing list