[geos-commits] r2442 - in trunk/source: geom headers/geos/geom
svn_geos at osgeo.org
svn_geos at osgeo.org
Thu Apr 30 08:17:23 EDT 2009
Author: strk
Date: 2009-04-30 08:17:23 -0400 (Thu, 30 Apr 2009)
New Revision: 2442
Modified:
trunk/source/geom/Point.cpp
trunk/source/headers/geos/geom/Point.h
Log:
Point full up to JTS-1.0 (rev 1.37) : adds reverse()
Modified: trunk/source/geom/Point.cpp
===================================================================
--- trunk/source/geom/Point.cpp 2009-04-30 12:07:26 UTC (rev 2441)
+++ trunk/source/geom/Point.cpp 2009-04-30 12:17:23 UTC (rev 2442)
@@ -12,6 +12,10 @@
* by the Free Software Foundation.
* See the COPYING file for more information.
*
+ **********************************************************************
+ *
+ * Last port: geom/Point.java rev. 1.37 (JTS-1.10)
+ *
**********************************************************************/
#include <geos/util/UnsupportedOperationException.h>
@@ -253,94 +257,3 @@
} // namespace geos::geom
} // namesapce geos
-
-/**********************************************************************
- *
- * $Log$
- * Revision 1.46 2006/05/04 15:49:39 strk
- * updated all Geometry::getDimension() methods to return Dimension::DimensionType (closes bug#93)
- *
- * Revision 1.45 2006/04/28 10:55:39 strk
- * Geometry constructors made protected, to ensure all constructions use GeometryFactory,
- * which has been made friend of all Geometry derivates. getNumPoints() changed to return
- * size_t.
- *
- * Revision 1.44 2006/04/10 18:15:09 strk
- * Changed Geometry::envelope member to be of type auto_ptr<Envelope>.
- * Changed computeEnvelopeInternal() signater to return auto_ptr<Envelope>
- *
- * Revision 1.43 2006/04/10 17:35:44 strk
- * Changed LineString::points and Point::coordinates to be wrapped
- * in an auto_ptr<>. This should close bugs #86 and #89
- *
- * Revision 1.42 2006/03/22 16:58:34 strk
- * Removed (almost) all inclusions of geom.h.
- * Removed obsoleted .cpp files.
- * Fixed a bug in WKTReader not using the provided CoordinateSequence
- * implementation, optimized out some memory allocations.
- *
- * Revision 1.41 2006/03/09 16:46:47 strk
- * geos::geom namespace definition, first pass at headers split
- *
- * Revision 1.40 2006/03/06 19:40:46 strk
- * geos::util namespace. New GeometryCollection::iterator interface, many cleanups.
- *
- * Revision 1.39 2006/03/03 10:46:21 strk
- * Removed 'using namespace' from headers, added missing headers in .cpp files, removed useless includes in headers (bug#46)
- *
- * Revision 1.38 2006/02/09 15:52:47 strk
- * GEOSException derived from std::exception; always thrown and cought by const ref.
- *
- * Revision 1.37 2006/01/31 19:07:33 strk
- * - Renamed DefaultCoordinateSequence to CoordinateArraySequence.
- * - Moved GetNumGeometries() and GetGeometryN() interfaces
- * from GeometryCollection to Geometry class.
- * - Added getAt(int pos, Coordinate &to) funtion to CoordinateSequence class.
- * - Reworked automake scripts to produce a static lib for each subdir and
- * then link all subsystem's libs togheter
- * - Moved C-API in it's own top-level dir capi/
- * - Moved source/bigtest and source/test to tests/bigtest and test/xmltester
- * - Fixed PointLocator handling of LinearRings
- * - Changed CoordinateArrayFilter to reduce memory copies
- * - Changed UniqueCoordinateArrayFilter to reduce memory copies
- * - Added CGAlgorithms::isPointInRing() version working with
- * Coordinate::ConstVect type (faster!)
- * - Ported JTS-1.7 version of ConvexHull with big attention to
- * memory usage optimizations.
- * - Improved XMLTester output and user interface
- * - geos::geom::util namespace used for geom/util stuff
- * - Improved memory use in geos::geom::util::PolygonExtractor
- * - New ShortCircuitedGeometryVisitor class
- * - New operation/predicate package
- *
- * Revision 1.36 2005/12/08 14:14:07 strk
- * ElevationMatrixFilter used for both elevation and Matrix fill,
- * thus removing CoordinateSequence copy in ElevetaionMatrix::add(Geometry *).
- * Changed CoordinateFilter::filter_rw to be a const method: updated
- * all apply_rw() methods to take a const CoordinateFilter.
- *
- * Revision 1.35 2005/06/23 14:22:33 strk
- * Inlined and added missing ::clone() for Geometry subclasses
- *
- * Revision 1.34 2005/05/23 16:42:43 strk
- * Added Refractions copyright
- *
- * Revision 1.33 2005/05/13 17:15:34 strk
- * cleanups and indentations
- *
- * Revision 1.32 2005/04/19 11:49:26 strk
- * Fixed segfault in ::isEmpty
- *
- * Revision 1.31 2004/11/23 16:22:49 strk
- * Added ElevationMatrix class and components to do post-processing draping of overlayed geometries.
- *
- * Revision 1.30 2004/09/13 12:39:14 strk
- * Made Point and MultiPoint subject to Validity tests.
- *
- * Revision 1.29 2004/07/08 19:34:49 strk
- * Mirrored JTS interface of CoordinateSequence, factory and
- * default implementations.
- * Added CoordinateArraySequenceFactory::instance() function.
- *
- **********************************************************************/
-
Modified: trunk/source/headers/geos/geom/Point.h
===================================================================
--- trunk/source/headers/geos/geom/Point.h 2009-04-30 12:07:26 UTC (rev 2441)
+++ trunk/source/headers/geos/geom/Point.h 2009-04-30 12:17:23 UTC (rev 2442)
@@ -12,6 +12,10 @@
* by the Free Software Foundation.
* See the COPYING file for more information.
*
+ **********************************************************************
+ *
+ * Last port: geom/Point.java rev. 1.37 (JTS-1.10)
+ *
**********************************************************************/
#ifndef GEOS_GEOS_POINT_H
@@ -48,7 +52,9 @@
* \class Point geom.h geos.h
* \brief Basic implementation of Point.
*/
-class Point : public Geometry {
+class Point : public Geometry
+ // NOTE: in JTS Point implements Puntual
+{
public:
@@ -59,6 +65,12 @@
virtual ~Point();
+ /**
+ * Creates and returns a full copy of this {@link Point} object.
+ * (including all coordinates contained by it).
+ *
+ * @return a clone of this instance
+ */
Geometry *clone() const { return new Point(*this); }
CoordinateSequence* getCoordinates(void) const;
@@ -76,7 +88,14 @@
/// Returns Dimension::False (Point has no boundary)
int getBoundaryDimension() const;
- /// Returns an EMPTY Geometry.
+ /**
+ * Gets the boundary of this geometry.
+ * Zero-dimensional geometries have no boundary by definition,
+ * so an empty GeometryCollection is returned.
+ *
+ * @return an empty GeometryCollection
+ * @see Geometry::getBoundary
+ */
Geometry* getBoundary() const;
double getX() const;
@@ -94,8 +113,17 @@
void apply_ro(CoordinateSequenceFilter& filter) const;
bool equalsExact(const Geometry *other, double tolerance=0) const;
- void normalize(void) { };
+ void normalize(void)
+ {
+ // a Point is always in normalized form
+ }
+
+ Geometry* reverse() const
+ {
+ return clone();
+ }
+
protected:
/**
@@ -135,28 +163,3 @@
#endif // ndef GEOS_GEOS_POINT_H
-/**********************************************************************
- * $Log$
- * Revision 1.6 2006/05/04 15:49:39 strk
- * updated all Geometry::getDimension() methods to return Dimension::DimensionType (closes bug#93)
- *
- * Revision 1.5 2006/04/28 10:55:39 strk
- * Geometry constructors made protected, to ensure all constructions use GeometryFactory,
- * which has been made friend of all Geometry derivates. getNumPoints() changed to return
- * size_t.
- *
- * Revision 1.4 2006/04/10 18:15:09 strk
- * Changed Geometry::envelope member to be of type auto_ptr<Envelope>.
- * Changed computeEnvelopeInternal() signater to return auto_ptr<Envelope>
- *
- * Revision 1.3 2006/04/10 17:35:44 strk
- * Changed LineString::points and Point::coordinates to be wrapped
- * in an auto_ptr<>. This should close bugs #86 and #89
- *
- * Revision 1.2 2006/03/24 09:52:41 strk
- * USE_INLINE => GEOS_INLINE
- *
- * Revision 1.1 2006/03/09 16:46:49 strk
- * geos::geom namespace definition, first pass at headers split
- *
- **********************************************************************/
More information about the geos-commits
mailing list