[geos-commits] [SCM] GEOS branch master updated. e83855d40d8ce0645a5d47469e82245e630d3290

git at osgeo.org git at osgeo.org
Mon Jun 17 15:05:11 PDT 2019


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GEOS".

The branch, master has been updated
       via  e83855d40d8ce0645a5d47469e82245e630d3290 (commit)
       via  a2e06abed63f3aed2a200cea512bf966473d82cb (commit)
       via  5f93b9708f2fa9c9e3fe332b08c617b544f30a75 (commit)
       via  e74849c16465ee7af450bfef9493df990a3ad64a (commit)
      from  075eb3cd1f6f267697aaae8ba7ba67c766f83170 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit e83855d40d8ce0645a5d47469e82245e630d3290
Merge: 075eb3c a2e06ab
Author: Daniel Baston <dbaston at gmail.com>
Date:   Mon Jun 17 18:04:49 2019 -0400

    Merge branch 'remove-dimension-classes'

diff --cc include/geos/geom/Polygon.h
index ff0fa38,45bfbca..45cbd4e
--- a/include/geos/geom/Polygon.h
+++ b/include/geos/geom/Polygon.h
@@@ -25,9 -25,7 +25,8 @@@
  #include <string>
  #include <vector>
  #include <geos/geom/Geometry.h> // for inheritance
- #include <geos/geom/Polygonal.h> // for inheritance
  #include <geos/geom/Envelope.h> // for proper use of unique_ptr<>
 +#include <geos/geom/LinearRing.h>
  #include <geos/geom/Dimension.h> // for Dimension::DimensionType
  
  #include <geos/inline.h>

commit a2e06abed63f3aed2a200cea512bf966473d82cb
Author: Daniel Baston <dbaston at gmail.com>
Date:   Sun Jun 16 20:22:38 2019 -0400

    Add Geometry::isDimensionStrict

diff --git a/include/geos/geom/Geometry.h b/include/geos/geom/Geometry.h
index 8d7598a..24a072f 100644
--- a/include/geos/geom/Geometry.h
+++ b/include/geos/geom/Geometry.h
@@ -352,20 +352,21 @@ public:
     /// Returns the dimension of this Geometry (0=point, 1=line, 2=surface)
     virtual Dimension::DimensionType getDimension() const = 0; //Abstract
 
-    virtual bool isMixedDimension() const {
-        return false;
+    /// Checks whether this Geometry consists only of components having dimension d.
+    virtual bool isDimensionStrict(Dimension::DimensionType d) const {
+        return d == getDimension();
     }
 
     bool isPuntal() const {
-        return getDimension() == Dimension::P;
+        return isDimensionStrict(Dimension::P);
     }
 
     bool isLineal() const {
-        return getDimension() == Dimension::L && !isMixedDimension();
+        return isDimensionStrict(Dimension::L);
     }
 
     bool isPolygonal() const {
-        return getDimension() == Dimension::A && !isMixedDimension();
+        return isDimensionStrict(Dimension::A);
     }
 
     /// Returns the coordinate dimension of this Geometry (2=XY, 3=XYZ, 4=XYZM in future).
diff --git a/include/geos/geom/GeometryCollection.h b/include/geos/geom/GeometryCollection.h
index 0e51e9c..001d88d 100644
--- a/include/geos/geom/GeometryCollection.h
+++ b/include/geos/geom/GeometryCollection.h
@@ -107,7 +107,7 @@ public:
      */
     Dimension::DimensionType getDimension() const override;
 
-    bool isMixedDimension() const override;
+    virtual bool isDimensionStrict(Dimension::DimensionType d) const;
 
     /// Returns coordinate dimension.
     int getCoordinateDimension() const override;
diff --git a/include/geos/geom/MultiLineString.h b/include/geos/geom/MultiLineString.h
index d5c593b..602a6d6 100644
--- a/include/geos/geom/MultiLineString.h
+++ b/include/geos/geom/MultiLineString.h
@@ -58,8 +58,8 @@ public:
     /// Returns line dimension (1)
     Dimension::DimensionType getDimension() const override;
 
-    bool isMixedDimension() const override {
-        return false;
+    bool isDimensionStrict(Dimension::DimensionType d) const override {
+        return d == Dimension::L;
     }
 
     /**
diff --git a/include/geos/geom/MultiPoint.h b/include/geos/geom/MultiPoint.h
index 2300301..40005de 100644
--- a/include/geos/geom/MultiPoint.h
+++ b/include/geos/geom/MultiPoint.h
@@ -61,8 +61,8 @@ public:
     /// Returns point dimension (0)
     Dimension::DimensionType getDimension() const override;
 
-    bool isMixedDimension() const override {
-        return false;
+    bool isDimensionStrict(Dimension::DimensionType d) const override {
+        return d == Dimension::P;
     }
 
     /// Returns Dimension::False (Point has no boundary)
diff --git a/include/geos/geom/MultiPolygon.h b/include/geos/geom/MultiPolygon.h
index 850d79a..2726781 100644
--- a/include/geos/geom/MultiPolygon.h
+++ b/include/geos/geom/MultiPolygon.h
@@ -65,8 +65,8 @@ public:
     /// Returns surface dimension (2)
     Dimension::DimensionType getDimension() const override;
 
-    bool isMixedDimension() const override {
-        return false;
+    bool isDimensionStrict(Dimension::DimensionType d) const override {
+        return d == Dimension::A;
     }
 
     /// Returns 1 (MultiPolygon boundary is MultiLineString)
diff --git a/src/geom/GeometryCollection.cpp b/src/geom/GeometryCollection.cpp
index 3d2a2a5..40b0c98 100644
--- a/src/geom/GeometryCollection.cpp
+++ b/src/geom/GeometryCollection.cpp
@@ -129,13 +129,11 @@ GeometryCollection::getDimension() const
 }
 
 bool
-GeometryCollection::isMixedDimension() const
-{
-    for (size_t i = 1; i < geometries->size(); i++) {
-        if ((*geometries)[i]->getDimension() != (*geometries)[0]->getDimension())
-            return true;
-    }
-    return false;
+GeometryCollection::isDimensionStrict(Dimension::DimensionType d) const {
+    return std::all_of(geometries->begin(), geometries->end(),
+            [&d](const Geometry* g) {
+                return g->getDimension() == d;
+            });
 }
 
 int
diff --git a/tests/unit/geom/GeometryCollectionTest.cpp b/tests/unit/geom/GeometryCollectionTest.cpp
index 54ec1f8..8030587 100644
--- a/tests/unit/geom/GeometryCollectionTest.cpp
+++ b/tests/unit/geom/GeometryCollectionTest.cpp
@@ -18,10 +18,17 @@ struct test_geometry_collection_data {
 
     geos::geom::PrecisionModel pm_;
     GeometryFactory::Ptr factory_;
+    std::unique_ptr<geos::geom::Geometry> empty_gc_;
+
+    std::unique_ptr<geos::geom::Geometry> readWKT(std::string wkt) {
+        geos::io::WKTReader reader;
+        return std::unique_ptr<geos::geom::Geometry>(reader.read(wkt));
+    }
 
     test_geometry_collection_data()
-        : pm_(1000), factory_(GeometryFactory::create(&pm_, 0))
+        : pm_(1000), factory_(GeometryFactory::create(&pm_, 0)), empty_gc_(factory_->createGeometryCollection())
     {
+
     }
 };
 
@@ -82,15 +89,58 @@ void object::test<2>
     ensure_equals(clone->getGeometryN(0)->getSRID(), 2);
 }
 
+// test getCoordinate() returns nullptr for empty geometry
 template<>
 template<>
 void object::test<3>
 ()
 {
-    // getCoordinate() returns nullptr for empty geometry
-    auto gf = GeometryFactory::create();
-    std::unique_ptr<geos::geom::Geometry> g(gf->createGeometryCollection());
+    ensure(empty_gc_->getCoordinate() == nullptr);
+}
+
+// test isDimensionStrict for empty GeometryCollection
+template<>
+template<>
+void object::test<4>
+()
+{
+    // Empty GeometryCollection passes isDimensionStrict for any input
+    ensure(empty_gc_->isDimensionStrict(geos::geom::Dimension::P));
+    ensure(empty_gc_->isDimensionStrict(geos::geom::Dimension::L));
+    ensure(empty_gc_->isDimensionStrict(geos::geom::Dimension::A));
+}
+
+// test isDimensionStrict for homogeneous GeometryCollections
+template<>
+template<>
+void object::test<5>
+()
+{
+    auto point = readWKT("GEOMETRYCOLLECTION(POINT (1 1), POINT(2 2))");
+    auto line = readWKT("GEOMETRYCOLLECTION(LINESTRING (1 1, 2 2), LINESTRING (3 8, 3 9))");
+    auto poly = readWKT("GEOMETRYCOLLECTION(POLYGON ((1 1, 2 1, 2 2, 1 1)))");
+
+    ensure(point->isDimensionStrict(geos::geom::Dimension::P));
+    ensure(line->isDimensionStrict(geos::geom::Dimension::L));
+    ensure(poly->isDimensionStrict(geos::geom::Dimension::A));
+
+    ensure(!point->isDimensionStrict(geos::geom::Dimension::L));
+    ensure(!line->isDimensionStrict(geos::geom::Dimension::A));
+    ensure(!poly->isDimensionStrict(geos::geom::Dimension::P));
+}
+
+// test isDimensionStrict for heterogeneous GeometryCollections
+template<>
+template<>
+void object::test<6>
+()
+{
+    // Heterogenous GeometryCollection does not pass isDimensionString for any input
+    auto gc = readWKT("GEOMETRYCOLLECTION(POINT (1 1), LINESTRING (1 1, 2 2))");
 
-    ensure(g->getCoordinate() == nullptr);
+    ensure(!gc->isDimensionStrict(geos::geom::Dimension::P));
+    ensure(!gc->isDimensionStrict(geos::geom::Dimension::L));
+    ensure(!gc->isDimensionStrict(geos::geom::Dimension::A));
 }
+
 } // namespace tut
diff --git a/tests/unit/geom/LineStringTest.cpp b/tests/unit/geom/LineStringTest.cpp
index a04cbd1..b30abb6 100644
--- a/tests/unit/geom/LineStringTest.cpp
+++ b/tests/unit/geom/LineStringTest.cpp
@@ -524,5 +524,26 @@ void object::test<26>
     ensure(g->getCoordinate() == nullptr);
 }
 
+// test isDimensionStrict for empty LineString
+template<>
+template<>
+void object::test<27>
+()
+{
+    ensure(empty_line_->isDimensionStrict(geos::geom::Dimension::L));
+    ensure(!empty_line_->isDimensionStrict(geos::geom::Dimension::A));
+}
+
+// test isDimensionStrict for non-empty LineString
+template<>
+template<>
+void object::test<28>
+()
+{
+    std::unique_ptr<geos::geom::Geometry> geo(reader_.read("LINESTRING (0 0, 10 10, 20 0))"));
+
+    ensure(geo->isDimensionStrict(geos::geom::Dimension::L));
+    ensure(!geo->isDimensionStrict(geos::geom::Dimension::A));
+}
 } // namespace tut
 
diff --git a/tests/unit/geom/LinearRingTest.cpp b/tests/unit/geom/LinearRingTest.cpp
index 9a912d7..aa66102 100644
--- a/tests/unit/geom/LinearRingTest.cpp
+++ b/tests/unit/geom/LinearRingTest.cpp
@@ -460,4 +460,24 @@ void object::test<31>
 
     ensure(g->getCoordinate() == nullptr);
 }
+
+// test isDimensionStrict for empty LinearRing
+template<>
+template<>
+void object::test<32>
+()
+{
+    ensure(empty_ring_.isDimensionStrict(geos::geom::Dimension::L));
+    ensure(!empty_ring_.isDimensionStrict(geos::geom::Dimension::A));
+}
+
+// test isDimensionStrict for non-empty LinearRing
+template<>
+template<>
+void object::test<33>
+()
+{
+    ensure(ring_->isDimensionStrict(geos::geom::Dimension::L));
+    ensure(!ring_->isDimensionStrict(geos::geom::Dimension::A));
+}
 } // namespace tut
diff --git a/tests/unit/geom/MultiLineStringTest.cpp b/tests/unit/geom/MultiLineStringTest.cpp
index e2a43b9..e7ef1f7 100644
--- a/tests/unit/geom/MultiLineStringTest.cpp
+++ b/tests/unit/geom/MultiLineStringTest.cpp
@@ -5,6 +5,7 @@
 // geos
 #include <geos/geom/GeometryFactory.h>
 #include <geos/geom/MultiLineString.h>
+#include <geos/io/WKTReader.h>
 
 namespace tut {
 //
@@ -13,7 +14,15 @@ namespace tut {
 
 // Common data used by tests
 struct test_multilinestring_data {
-    test_multilinestring_data() {}
+    std::unique_ptr<geos::geom::Geometry> empty_mls_;
+    std::unique_ptr<geos::geom::Geometry> mls_;
+
+    geos::io::WKTReader reader_;
+
+    test_multilinestring_data() {
+        empty_mls_.reset(reader_.read("MULTILINESTRING EMPTY"));
+        mls_.reset(reader_.read("MULTILINESTRING ((0 0, 1 1), (3 3, 4 4))"));
+    }
 };
 
 typedef test_group<test_multilinestring_data> group;
@@ -31,10 +40,27 @@ void object::test<1>
 ()
 {
     // getCoordinate() returns nullptr for empty geometry
-    auto gf = geos::geom::GeometryFactory::create();
-    std::unique_ptr<geos::geom::Geometry> g(gf->createMultiLineString());
+    ensure(empty_mls_->getCoordinate() == nullptr);
+}
 
-    ensure(g->getCoordinate() == nullptr);
+// test isDimensionStrict for empty MultiLineString
+template<>
+template<>
+void object::test<2>
+()
+{
+    ensure(empty_mls_->isDimensionStrict(geos::geom::Dimension::L));
+    ensure(!empty_mls_->isDimensionStrict(geos::geom::Dimension::A));
+}
+
+// test isDimensionStrict for non-empty MultiLineString
+template<>
+template<>
+void object::test<3>
+()
+{
+    ensure(mls_->isDimensionStrict(geos::geom::Dimension::L));
+    ensure(!mls_->isDimensionStrict(geos::geom::Dimension::A));
 }
 
 } // namespace tut
diff --git a/tests/unit/geom/MultiPointTest.cpp b/tests/unit/geom/MultiPointTest.cpp
index a2bace0..f8a1cea 100644
--- a/tests/unit/geom/MultiPointTest.cpp
+++ b/tests/unit/geom/MultiPointTest.cpp
@@ -245,7 +245,7 @@ void object::test<16>
     ensure_equals(empty_mp_->getArea(), 0.0);
 }
 
-// Test of isEmpty() for non-empty LinearRing
+// Test of isEmpty() for non-empty MultiPoint
 template<>
 template<>
 void object::test<17>
@@ -255,7 +255,7 @@ void object::test<17>
     ensure(!mp_->isEmpty());
 }
 
-// Test of getEnvelope() for non-empty LinearRing
+// Test of getEnvelope() for non-empty MultiPoint
 template<>
 template<>
 void object::test<18>
@@ -269,7 +269,7 @@ void object::test<18>
     ensure_equals(envelope->getDimension(), geos::geom::Dimension::A);
 }
 
-// Test of getBoundary() for non-empty LinearRing
+// Test of getBoundary() for non-empty MultiPoint
 template<>
 template<>
 void object::test<19>
@@ -284,7 +284,7 @@ void object::test<19>
     ensure("[OGC] The boundary of a MultiPoint is the empty set.", boundary->isEmpty());
 }
 
-// Test of convexHull() for non-empty LinearRing
+// Test of convexHull() for non-empty MultiPoint
 template<>
 template<>
 void object::test<20>
@@ -299,7 +299,7 @@ void object::test<20>
     ensure_equals(hull->getDimension(), geos::geom::Dimension::L);
 }
 
-// Test of getGeometryTypeId() for non-empty LinearRing
+// Test of getGeometryTypeId() for non-empty MultiPoint
 template<>
 template<>
 void object::test<21>
@@ -309,7 +309,7 @@ void object::test<21>
     ensure_equals(mp_->getGeometryTypeId(), geos::geom::GEOS_MULTIPOINT);
 }
 
-// Test of getGeometryType() for non-empty Polygon
+// Test of getGeometryType() for non-empty MultiPoint
 template<>
 template<>
 void object::test<22>
@@ -321,7 +321,7 @@ void object::test<22>
     ensure_equals(mp_->getGeometryType(), type);
 }
 
-// Test of getDimension() for non-empty LinearRing
+// Test of getDimension() for non-empty MultiPoint
 template<>
 template<>
 void object::test<23>
@@ -331,7 +331,7 @@ void object::test<23>
     ensure_equals(mp_->getDimension(), geos::geom::Dimension::P);
 }
 
-// Test of getBoundaryDimension() for non-empty LinearRing
+// Test of getBoundaryDimension() for non-empty MultiPoint
 template<>
 template<>
 void object::test<24>
@@ -341,7 +341,7 @@ void object::test<24>
     ensure_equals(mp_->getBoundaryDimension(), geos::geom::Dimension::False);
 }
 
-// Test of getNumPoints() for non-empty LinearRing
+// Test of getNumPoints() for non-empty MultiPoint
 template<>
 template<>
 void object::test<25>
@@ -351,7 +351,7 @@ void object::test<25>
     ensure_equals(mp_->getNumPoints(), mp_size_);
 }
 
-// Test of getLength() for non-empty LinearRing
+// Test of getLength() for non-empty MultiPoint
 template<>
 template<>
 void object::test<26>
@@ -361,7 +361,7 @@ void object::test<26>
     ensure_equals(mp_->getLength(), 0.0);
 }
 
-// Test of getArea() for non-empty LinearRing
+// Test of getArea() for non-empty MultiPoint
 template<>
 template<>
 void object::test<27>
@@ -371,7 +371,7 @@ void object::test<27>
     ensure_equals(mp_->getArea(), 0.0);
 }
 
-// Test of ParseException thrown when constructing MultiPoint from invalind WKT
+// Test of ParseException thrown when constructing MultiPoint from invalid WKT
 template<>
 template<>
 void object::test<28>
@@ -404,5 +404,25 @@ void object::test<29>
     ensure(g->getCoordinate() == nullptr);
 }
 
+// test isDimensionStrict for empty MultiPoint
+template<>
+template<>
+void object::test<30>
+()
+{
+    ensure(empty_mp_->isDimensionStrict(geos::geom::Dimension::P));
+    ensure(!empty_mp_->isDimensionStrict(geos::geom::Dimension::L));
+}
+
+// test isDimensionStrict for non-empty MultiPoint
+template<>
+template<>
+void object::test<31>
+()
+{
+    ensure(empty_mp_->isDimensionStrict(geos::geom::Dimension::P));
+    ensure(!empty_mp_->isDimensionStrict(geos::geom::Dimension::L));
+}
+
 } // namespace tut
 
diff --git a/tests/unit/geom/MultiPolygonTest.cpp b/tests/unit/geom/MultiPolygonTest.cpp
index 90ad0c6..d719803 100644
--- a/tests/unit/geom/MultiPolygonTest.cpp
+++ b/tests/unit/geom/MultiPolygonTest.cpp
@@ -5,6 +5,7 @@
 // geos
 #include <geos/geom/GeometryFactory.h>
 #include <geos/geom/MultiPolygon.h>
+#include <geos/io/WKTReader.h>
 
 namespace tut {
 //
@@ -13,7 +14,15 @@ namespace tut {
 
 // Common data used by tests
 struct test_multipolygon_data {
-    test_multipolygon_data() {}
+    geos::io::WKTReader reader_;
+    std::unique_ptr<geos::geom::Geometry> empty_mp_;
+    std::unique_ptr<geos::geom::Geometry> mp_;
+
+    test_multipolygon_data() {
+        empty_mp_.reset(reader_.read("MULTIPOLYGON EMPTY"));
+        mp_.reset(reader_.read("MULTIPOLYGON (((1 1, 2 1, 2 2, 1 1)))"));
+
+    }
 };
 
 typedef test_group<test_multipolygon_data> group;
@@ -25,16 +34,33 @@ group test_multipolygon_group("geos::geom::MultiPolygon");
 // Test Cases
 //
 
+// test getCoordinate() returns nullptr for empty geometry
 template<>
 template<>
 void object::test<1>
 ()
 {
-    // getCoordinate() returns nullptr for empty geometry
-    auto gf = geos::geom::GeometryFactory::create();
-    std::unique_ptr<geos::geom::Geometry> g(gf->createMultiPolygon());
+    ensure(empty_mp_->getCoordinate() == nullptr);
+}
 
-    ensure(g->getCoordinate() == nullptr);
+// test isDimensionStrict for empty MultiPolygon
+template<>
+template<>
+void object::test<2>
+()
+{
+    ensure(empty_mp_->isDimensionStrict(geos::geom::Dimension::A));
+    ensure(!empty_mp_->isDimensionStrict(geos::geom::Dimension::L));
+}
+
+// test isDimensionStrict for non-empty MultiPolygon
+template<>
+template<>
+void object::test<3>
+()
+{
+    ensure(mp_->isDimensionStrict(geos::geom::Dimension::A));
+    ensure(!empty_mp_->isDimensionStrict(geos::geom::Dimension::L));
 }
 
 } // namespace tut
diff --git a/tests/unit/geom/PointTest.cpp b/tests/unit/geom/PointTest.cpp
index a935f42..fdead29 100644
--- a/tests/unit/geom/PointTest.cpp
+++ b/tests/unit/geom/PointTest.cpp
@@ -576,5 +576,25 @@ void object::test<41>
     ensure(g->getCoordinate() == nullptr);
 }
 
+// test isDimensionStrict for empty Point
+template<>
+template<>
+void object::test<42>
+()
+{
+    ensure(empty_point_->isDimensionStrict(geos::geom::Dimension::P));
+    ensure(!empty_point_->isDimensionStrict(geos::geom::Dimension::A));
+}
+
+// test isDimensionStrict for non-empty Point
+template<>
+template<>
+void object::test<43>
+()
+{
+    ensure(point_->isDimensionStrict(geos::geom::Dimension::P));
+    ensure(!point_->isDimensionStrict(geos::geom::Dimension::A));
+}
+
 } // namespace tut
 
diff --git a/tests/unit/geom/PolygonTest.cpp b/tests/unit/geom/PolygonTest.cpp
index 21f3279..8523560 100644
--- a/tests/unit/geom/PolygonTest.cpp
+++ b/tests/unit/geom/PolygonTest.cpp
@@ -603,4 +603,24 @@ void object::test<40>
     ensure(g->getCoordinate() == nullptr);
 }
 
+// test isDimensionStrict for empty Polygon
+template<>
+template<>
+void object::test<41>
+()
+{
+    ensure(empty_poly_->isDimensionStrict(geos::geom::Dimension::A));
+    ensure(!empty_poly_->isDimensionStrict(geos::geom::Dimension::L));
+}
+
+// test isDimensionStrict for non-empty Polygon
+template<>
+template<>
+void object::test<42>
+()
+{
+    ensure(poly_->isDimensionStrict(geos::geom::Dimension::A));
+    ensure(!poly_->isDimensionStrict(geos::geom::Dimension::L));
+}
+
 } // namespace tut

commit 5f93b9708f2fa9c9e3fe332b08c617b544f30a75
Author: Daniel Baston <dbaston at gmail.com>
Date:   Fri Jun 14 19:53:54 2019 -0400

    Reformat Doxygen comment that apparently breaks autotools build

diff --git a/include/geos/triangulate/quadedge/QuadEdgeSubdivision.h b/include/geos/triangulate/quadedge/QuadEdgeSubdivision.h
index 43f43ef..9224542 100644
--- a/include/geos/triangulate/quadedge/QuadEdgeSubdivision.h
+++ b/include/geos/triangulate/quadedge/QuadEdgeSubdivision.h
@@ -399,10 +399,10 @@ public:
      * Gets the geometry for the triangles in a triangulated subdivision as a
      * [GeometryCollection](@ref geos::geom::GeometryCollection)
      * of triangular [Polygons](@ref geos::geom::Polygon).
-
+     *
      * @param geomFact the GeometryFactory to use
      * @return a GeometryCollection of triangular polygons.
-     
+     *
      * @note The caller takes ownership of the returned object.
      */
     std::unique_ptr<geom::GeometryCollection> getTriangles(const geom::GeometryFactory& geomFact);

commit e74849c16465ee7af450bfef9493df990a3ad64a
Author: Daniel Baston <dbaston at gmail.com>
Date:   Fri Jun 14 14:16:51 2019 -0400

    Remove Puntal, Lineal, and Polygonal classes
    
    These classes are used in only a handful of locations to check the
    dimension of a Geometry. However, their use in the inheritance hierarchy
    increases the class size of MultiPoint, MultiLineString, and
    MultiPolygon by 8 bytes, and possibly imposes a runtime cost. This commit
    provides alternative methods of checking Geometry dimension.

diff --git a/benchmarks/ClassSizes.cpp b/benchmarks/ClassSizes.cpp
index 63a211b..1e45a7f 100644
--- a/benchmarks/ClassSizes.cpp
+++ b/benchmarks/ClassSizes.cpp
@@ -20,6 +20,14 @@
 #include <geos/geom/GeometryFactory.h>
 #include <geos/io/WKTReader.h>
 #include <geos/geom/Geometry.h>
+#include <geos/geom/Point.h>
+#include <geos/geom/LinearRing.h>
+#include <geos/geom/LineString.h>
+#include <geos/geom/Polygon.h>
+#include <geos/geom/GeometryCollection.h>
+#include <geos/geom/MultiPoint.h>
+#include <geos/geom/MultiLineString.h>
+#include <geos/geom/MultiPolygon.h>
 #include <geos/geomgraph/DirectedEdge.h>
 #include <geos/geomgraph/EdgeEnd.h>
 #include <geos/geomgraph/PlanarGraph.h>
@@ -41,6 +49,15 @@ main()
     check(geomgraph::EdgeEnd);
     check(geomgraph::DirectedEdge);
     check(noding::NodedSegmentString);
+    check(geom::Geometry);
+    check(geom::Point);
+    check(geom::LineString);
+    check(geom::LinearRing);
+    check(geom::Polygon);
+    check(geom::GeometryCollection);
+    check(geom::MultiPoint);
+    check(geom::MultiLineString);
+    check(geom::MultiPolygon);
     check(int64);
 }
 
diff --git a/include/geos/geom/BinaryOp.h b/include/geos/geom/BinaryOp.h
index d0f81ae..3a385e3 100644
--- a/include/geos/geom/BinaryOp.h
+++ b/include/geos/geom/BinaryOp.h
@@ -53,7 +53,6 @@
 #include <geos/geom/Geometry.h>
 #include <geos/geom/GeometryCollection.h>
 #include <geos/geom/Polygon.h>
-#include <geos/geom/Lineal.h>
 #include <geos/geom/PrecisionModel.h>
 #include <geos/geom/GeometryFactory.h>
 #include <geos/precision/CommonBitsRemover.h>
@@ -170,7 +169,7 @@ namespace geom { // geos::geom
 inline bool
 check_valid(const Geometry& g, const std::string& label, bool doThrow = false, bool validOnly = false)
 {
-    if(dynamic_cast<const Lineal*>(&g)) {
+    if(g.isLineal()) {
         if(! validOnly) {
             operation::IsSimpleOp sop(g, algorithm::BoundaryNodeRule::getBoundaryEndPoint());
             if(! sop.isSimple()) {
diff --git a/include/geos/geom/Geometry.h b/include/geos/geom/Geometry.h
index f8a82ce..8d7598a 100644
--- a/include/geos/geom/Geometry.h
+++ b/include/geos/geom/Geometry.h
@@ -352,6 +352,22 @@ public:
     /// Returns the dimension of this Geometry (0=point, 1=line, 2=surface)
     virtual Dimension::DimensionType getDimension() const = 0; //Abstract
 
+    virtual bool isMixedDimension() const {
+        return false;
+    }
+
+    bool isPuntal() const {
+        return getDimension() == Dimension::P;
+    }
+
+    bool isLineal() const {
+        return getDimension() == Dimension::L && !isMixedDimension();
+    }
+
+    bool isPolygonal() const {
+        return getDimension() == Dimension::A && !isMixedDimension();
+    }
+
     /// Returns the coordinate dimension of this Geometry (2=XY, 3=XYZ, 4=XYZM in future).
     virtual int getCoordinateDimension() const = 0; //Abstract
 
diff --git a/include/geos/geom/GeometryCollection.h b/include/geos/geom/GeometryCollection.h
index 2163ef9..0e51e9c 100644
--- a/include/geos/geom/GeometryCollection.h
+++ b/include/geos/geom/GeometryCollection.h
@@ -107,6 +107,8 @@ public:
      */
     Dimension::DimensionType getDimension() const override;
 
+    bool isMixedDimension() const override;
+
     /// Returns coordinate dimension.
     int getCoordinateDimension() const override;
 
diff --git a/include/geos/geom/LineString.h b/include/geos/geom/LineString.h
index 10ce548..d56fb1a 100644
--- a/include/geos/geom/LineString.h
+++ b/include/geos/geom/LineString.h
@@ -23,7 +23,6 @@
 
 #include <geos/export.h>
 #include <geos/geom/Geometry.h> // for inheritance
-#include <geos/geom/Lineal.h> // for inheritance
 #include <geos/geom/CoordinateSequence.h> // for proper use of unique_ptr<>
 #include <geos/geom/Envelope.h> // for proper use of unique_ptr<>
 #include <geos/geom/Dimension.h> // for Dimension::DimensionType
@@ -66,7 +65,7 @@ namespace geom { // geos::geom
  *  If these conditions are not met, the constructors throw
  *  an {@link util::IllegalArgumentException}.
  */
-class GEOS_DLL LineString: public virtual Geometry, public Lineal {
+class GEOS_DLL LineString: public virtual Geometry {
 
 public:
 
diff --git a/include/geos/geom/Lineal.h b/include/geos/geom/Lineal.h
deleted file mode 100644
index 8664367..0000000
--- a/include/geos/geom/Lineal.h
+++ /dev/null
@@ -1,49 +0,0 @@
-/**********************************************************************
- *
- * GEOS - Geometry Engine Open Source
- * http://geos.osgeo.org
- *
- * Copyright (C) 2011  Sandro Santilli <strk at kbt.io>
- *
- * This is free software; you can redistribute and/or modify it under
- * the terms of the GNU Lesser General Public Licence as published
- * by the Free Software Foundation.
- * See the COPYING file for more information.
- *
- **********************************************************************
- *
- * Last port: geom/Lineal.java r320 (JTS-1.12)
- *
- **********************************************************************/
-
-#ifndef GEOS_GEOM_LINEAL_H
-#define GEOS_GEOM_LINEAL_H
-
-#include <geos/export.h>
-#include <geos/geom/Geometry.h> // for inheritance
-
-#ifdef _MSC_VER
-#pragma warning(push)
-#pragma warning(disable: 4589) // warning C4589 : Constructor of abstract class 'Lineal' ignores initializer for virtual base class 'Geometry'
-#endif
-
-namespace geos {
-namespace geom { // geos::geom
-
-/**
- * Identifies {@link Geometry} subclasses which
- * are 1-dimensional and with components which are {@link LineString}s.
- */
-class GEOS_DLL Lineal : public virtual Geometry {
-protected:
-    Lineal(): Geometry(nullptr) {}
-};
-
-} // namespace geos::geom
-} // namespace geos
-
-#ifdef _MSC_VER
-#pragma warning(pop)
-#endif
-
-#endif // ndef GEOS_GEOM_LINEAL_H
diff --git a/include/geos/geom/Makefile.am b/include/geos/geom/Makefile.am
index 92a03b6..de11186 100644
--- a/include/geos/geom/Makefile.am
+++ b/include/geos/geom/Makefile.am
@@ -46,7 +46,4 @@ geos_HEADERS = \
     Polygon.h \
     PrecisionModel.h \
     PrecisionModel.inl \
-    Triangle.h \
-    Puntal.h \
-    Lineal.h \
-    Polygonal.h
+    Triangle.h
diff --git a/include/geos/geom/MultiLineString.h b/include/geos/geom/MultiLineString.h
index 181c6ea..d5c593b 100644
--- a/include/geos/geom/MultiLineString.h
+++ b/include/geos/geom/MultiLineString.h
@@ -23,7 +23,6 @@
 
 #include <geos/export.h>
 #include <geos/geom/GeometryCollection.h> // for inheritance
-#include <geos/geom/Lineal.h> // for inheritance
 #include <geos/geom/Dimension.h>
 
 #include <string>
@@ -48,7 +47,7 @@ namespace geom { // geos::geom
 #endif
 
 /// Models a collection of [LineStrings](@ref geom::LineString).
-class GEOS_DLL MultiLineString: public GeometryCollection, public Lineal {
+class GEOS_DLL MultiLineString: public GeometryCollection {
 
 public:
 
@@ -59,6 +58,10 @@ public:
     /// Returns line dimension (1)
     Dimension::DimensionType getDimension() const override;
 
+    bool isMixedDimension() const override {
+        return false;
+    }
+
     /**
      * \brief
      * Returns Dimension::False if all [LineStrings](@ref geom::LineString) in the collection
diff --git a/include/geos/geom/MultiPoint.h b/include/geos/geom/MultiPoint.h
index 8d08a3c..2300301 100644
--- a/include/geos/geom/MultiPoint.h
+++ b/include/geos/geom/MultiPoint.h
@@ -23,7 +23,6 @@
 
 #include <geos/export.h>
 #include <geos/geom/GeometryCollection.h> // for inheritance
-#include <geos/geom/Puntal.h> // for inheritance
 #include <geos/geom/Dimension.h> // for Dimension::DimensionType
 
 #include <geos/inline.h>
@@ -51,7 +50,7 @@ namespace geom { // geos::geom
  *
  * Any collection of Points is a valid MultiPoint.
  */
-class GEOS_DLL MultiPoint: public GeometryCollection, public Puntal {
+class GEOS_DLL MultiPoint: public GeometryCollection {
 
 public:
 
@@ -62,6 +61,10 @@ public:
     /// Returns point dimension (0)
     Dimension::DimensionType getDimension() const override;
 
+    bool isMixedDimension() const override {
+        return false;
+    }
+
     /// Returns Dimension::False (Point has no boundary)
     int getBoundaryDimension() const override;
 
diff --git a/include/geos/geom/MultiPolygon.h b/include/geos/geom/MultiPolygon.h
index fc3805f..850d79a 100644
--- a/include/geos/geom/MultiPolygon.h
+++ b/include/geos/geom/MultiPolygon.h
@@ -25,7 +25,6 @@
 #include <string>
 #include <vector>
 #include <geos/geom/GeometryCollection.h> // for inheritance
-#include <geos/geom/Polygonal.h> // for inheritance
 #include <geos/geom/Dimension.h> // for Dimension::DimensionType
 
 #include <geos/inline.h>
@@ -56,7 +55,7 @@ namespace geom { // geos::geom
 /// This allows the topological point-set semantics
 /// to be well-defined.
 ///
-class GEOS_DLL MultiPolygon: public GeometryCollection, public Polygonal {
+class GEOS_DLL MultiPolygon: public GeometryCollection {
 public:
 
     friend class GeometryFactory;
@@ -66,6 +65,10 @@ public:
     /// Returns surface dimension (2)
     Dimension::DimensionType getDimension() const override;
 
+    bool isMixedDimension() const override {
+        return false;
+    }
+
     /// Returns 1 (MultiPolygon boundary is MultiLineString)
     int getBoundaryDimension() const override;
 
diff --git a/include/geos/geom/Point.h b/include/geos/geom/Point.h
index 2aef1f3..6ba15fc 100644
--- a/include/geos/geom/Point.h
+++ b/include/geos/geom/Point.h
@@ -23,7 +23,6 @@
 
 #include <geos/export.h>
 #include <geos/geom/Geometry.h> // for inheritance
-#include <geos/geom/Puntal.h> // for inheritance
 #include <geos/geom/CoordinateSequence.h> // for proper use of unique_ptr<>
 #include <geos/geom/Envelope.h> // for proper use of unique_ptr<>
 #include <geos/geom/Dimension.h> // for Dimension::DimensionType
@@ -63,7 +62,7 @@ namespace geom { // geos::geom
  *   (i.e does not have an NaN X or Y ordinate)
  *
  */
-class GEOS_DLL Point : public virtual Geometry, public Puntal {
+class GEOS_DLL Point : public virtual Geometry {
 
 public:
 
diff --git a/include/geos/geom/Polygon.h b/include/geos/geom/Polygon.h
index 5013830..45bfbca 100644
--- a/include/geos/geom/Polygon.h
+++ b/include/geos/geom/Polygon.h
@@ -25,7 +25,6 @@
 #include <string>
 #include <vector>
 #include <geos/geom/Geometry.h> // for inheritance
-#include <geos/geom/Polygonal.h> // for inheritance
 #include <geos/geom/Envelope.h> // for proper use of unique_ptr<>
 #include <geos/geom/Dimension.h> // for Dimension::DimensionType
 
@@ -62,7 +61,7 @@ namespace geom { // geos::geom
  *  Specification for SQL</A> .
  *
  */
-class GEOS_DLL Polygon: public virtual Geometry, public Polygonal {
+class GEOS_DLL Polygon: public virtual Geometry {
 
 public:
 
diff --git a/include/geos/geom/Polygonal.h b/include/geos/geom/Polygonal.h
deleted file mode 100644
index 6b90ecf..0000000
--- a/include/geos/geom/Polygonal.h
+++ /dev/null
@@ -1,49 +0,0 @@
-/**********************************************************************
- *
- * GEOS - Geometry Engine Open Source
- * http://geos.osgeo.org
- *
- * Copyright (C) 2011  Sandro Santilli <strk at kbt.io>
- *
- * This is free software; you can redistribute and/or modify it under
- * the terms of the GNU Lesser General Public Licence as published
- * by the Free Software Foundation.
- * See the COPYING file for more information.
- *
- **********************************************************************
- *
- * Last port: geom/Polygonal.java r320 (JTS-1.12)
- *
- **********************************************************************/
-
-#ifndef GEOS_GEOM_POLYGONAL_H
-#define GEOS_GEOM_POLYGONAL_H
-
-#include <geos/export.h>
-#include <geos/geom/Geometry.h> // for inheritance
-
-#ifdef _MSC_VER
-#pragma warning(push)
-#pragma warning(disable: 4589) // warning C4589 : Constructor of abstract class 'Puntal' ignores initializer for virtual base class 'Geometry'
-#endif
-
-namespace geos {
-namespace geom { // geos::geom
-
-/**
- * Identifies {@link Geometry} subclasses which
- * are 2-dimensional and with components which are {@link Polygon}s.
- */
-class GEOS_DLL Polygonal : public virtual Geometry {
-protected:
-    Polygonal(): Geometry(nullptr) {}
-};
-
-} // namespace geos::geom
-} // namespace geos
-
-#ifdef _MSC_VER
-#pragma warning(pop)
-#endif
-
-#endif // ndef GEOS_GEOM_POLYGONAL_H
diff --git a/include/geos/geom/Puntal.h b/include/geos/geom/Puntal.h
deleted file mode 100644
index 7f05ac1..0000000
--- a/include/geos/geom/Puntal.h
+++ /dev/null
@@ -1,49 +0,0 @@
-/**********************************************************************
- *
- * GEOS - Geometry Engine Open Source
- * http://geos.osgeo.org
- *
- * Copyright (C) 2011  Sandro Santilli <strk at kbt.io>
- *
- * This is free software; you can redistribute and/or modify it under
- * the terms of the GNU Lesser General Public Licence as published
- * by the Free Software Foundation.
- * See the COPYING file for more information.
- *
- **********************************************************************
- *
- * Last port: geom/Puntal.java r320 (JTS-1.12)
- *
- **********************************************************************/
-
-#ifndef GEOS_GEOM_PUNTAL_H
-#define GEOS_GEOM_PUNTAL_H
-
-#include <geos/export.h>
-#include <geos/geom/Geometry.h> // for inheritance
-
-#ifdef _MSC_VER
-#pragma warning(push)
-#pragma warning(disable: 4589) // warning C4589 : Constructor of abstract class 'Puntal' ignores initializer for virtual base class 'Geometry'
-#endif
-
-namespace geos {
-namespace geom { // geos::geom
-
-/**
- * Identifies {@link Geometry} subclasses which
- * are 0-dimensional and with components which are {@link Point}s.
- */
-class GEOS_DLL Puntal : public virtual Geometry {
-protected:
-    Puntal(): Geometry(nullptr) {}
-};
-
-} // namespace geos::geom
-} // namespace geos
-
-#ifdef _MSC_VER
-#pragma warning(pop)
-#endif
-
-#endif // ndef GEOS_GEOM_PUNTAL_H
diff --git a/include/geos/linearref/LocationIndexedLine.h b/include/geos/linearref/LocationIndexedLine.h
index bd65911..7feb277 100644
--- a/include/geos/linearref/LocationIndexedLine.h
+++ b/include/geos/linearref/LocationIndexedLine.h
@@ -22,7 +22,6 @@
 #include <geos/export.h>
 #include <geos/geom/Coordinate.h>
 #include <geos/geom/Geometry.h>
-#include <geos/geom/Lineal.h>
 #include <geos/linearref/LinearLocation.h>
 #include <geos/linearref/LocationIndexOfPoint.h>
 #include <geos/linearref/LocationIndexOfLine.h>
@@ -44,7 +43,7 @@ private:
     void
     checkGeometryType()
     {
-        if(! dynamic_cast<const geom::Lineal*>(linearGeom)) {
+        if(!linearGeom->isLineal()) {
             throw util::IllegalArgumentException("Input geometry must be linear");
         }
     }
diff --git a/include/geos/operation/union/PointGeometryUnion.h b/include/geos/operation/union/PointGeometryUnion.h
index 3085cd4..f618262 100644
--- a/include/geos/operation/union/PointGeometryUnion.h
+++ b/include/geos/operation/union/PointGeometryUnion.h
@@ -28,7 +28,6 @@ namespace geos {
 namespace geom {
 class GeometryFactory;
 class Geometry;
-class Puntal;
 }
 }
 
@@ -48,11 +47,11 @@ class GEOS_DLL PointGeometryUnion {
 public:
 
     static std::unique_ptr<geom::Geometry> Union(
-        const geom::Puntal& pointGeom,
+        const geom::Geometry& pointGeom,
         const geom::Geometry& otherGeom);
 
 
-    PointGeometryUnion(const geom::Puntal& pointGeom,
+    PointGeometryUnion(const geom::Geometry& pointGeom,
                        const geom::Geometry& otherGeom);
 
     std::unique_ptr<geom::Geometry> Union() const;
diff --git a/src/geom/GeometryCollection.cpp b/src/geom/GeometryCollection.cpp
index e07d6e0..3d2a2a5 100644
--- a/src/geom/GeometryCollection.cpp
+++ b/src/geom/GeometryCollection.cpp
@@ -128,6 +128,16 @@ GeometryCollection::getDimension() const
     return dimension;
 }
 
+bool
+GeometryCollection::isMixedDimension() const
+{
+    for (size_t i = 1; i < geometries->size(); i++) {
+        if ((*geometries)[i]->getDimension() != (*geometries)[0]->getDimension())
+            return true;
+    }
+    return false;
+}
+
 int
 GeometryCollection::getBoundaryDimension() const
 {
diff --git a/src/geom/prep/PreparedPolygonIntersects.cpp b/src/geom/prep/PreparedPolygonIntersects.cpp
index 255c4ab..862f87b 100644
--- a/src/geom/prep/PreparedPolygonIntersects.cpp
+++ b/src/geom/prep/PreparedPolygonIntersects.cpp
@@ -22,7 +22,6 @@
 #include <geos/geom/prep/PreparedPolygon.h>
 #include <geos/geom/Geometry.h>
 #include <geos/geom/Polygon.h>
-#include <geos/geom/Puntal.h>
 #include <geos/geom/MultiPolygon.h>
 #include <geos/geom/prep/PreparedPolygonPredicate.h>
 #include <geos/noding/SegmentString.h>
@@ -54,7 +53,7 @@ PreparedPolygonIntersects::intersects(const geom::Geometry* geom)
         return true;
     }
 
-    if(dynamic_cast<const geom::Puntal*>(geom)) {
+    if(geom->isPuntal()) {
         // point-in-poly failed, no way there can be an intersection
         // (NOTE: isAnyTestComponentInTarget also checks for boundary)
         return false;
diff --git a/src/operation/union/CascadedPolygonUnion.cpp b/src/operation/union/CascadedPolygonUnion.cpp
index 6134684..362e746 100644
--- a/src/operation/union/CascadedPolygonUnion.cpp
+++ b/src/operation/union/CascadedPolygonUnion.cpp
@@ -19,6 +19,7 @@
  **********************************************************************/
 
 #include <geos/operation/union/CascadedPolygonUnion.h>
+#include <geos/geom/Dimension.h>
 #include <geos/geom/Geometry.h>
 #include <geos/geom/GeometryFactory.h>
 #include <geos/geom/Polygon.h>
@@ -50,7 +51,7 @@ check_valid(const geos::geom::Geometry& g, const std::string& label, bool doThro
 {
     using namespace geos;
 
-    if(dynamic_cast<const geos::geom::Lineal*>(&g)) {
+    if(g.isLineal()) {
         if(! validOnly) {
             operation::IsSimpleOp sop(g, algorithm::BoundaryNodeRule::getBoundaryEndPoint());
             if(! sop.isSimple()) {
@@ -395,7 +396,7 @@ CascadedPolygonUnion::restrictToPolygons(std::unique_ptr<geom::Geometry> g)
     using namespace geom;
     using namespace std;
 
-    if(dynamic_cast<Polygonal*>(g.get())) {
+    if(g->isPolygonal()) {
         return g;
     }
 
diff --git a/src/operation/union/PointGeometryUnion.cpp b/src/operation/union/PointGeometryUnion.cpp
index baa6382..8ee5624 100644
--- a/src/operation/union/PointGeometryUnion.cpp
+++ b/src/operation/union/PointGeometryUnion.cpp
@@ -21,7 +21,6 @@
 #include <algorithm> // for copy
 #include <geos/operation/union/PointGeometryUnion.h>
 #include <geos/geom/Coordinate.h>
-#include <geos/geom/Puntal.h>
 #include <geos/geom/Point.h>
 #include <geos/geom/MultiPoint.h>
 #include <geos/geom/Geometry.h>
@@ -81,7 +80,7 @@ PointGeometryUnion::Union() const
 
 /* public  static */
 std::unique_ptr<geom::Geometry>
-PointGeometryUnion::Union(const geom::Puntal& pointGeom,
+PointGeometryUnion::Union(const geom::Geometry& pointGeom,
                           const geom::Geometry& otherGeom)
 {
     PointGeometryUnion unioner(pointGeom, otherGeom);
@@ -89,7 +88,7 @@ PointGeometryUnion::Union(const geom::Puntal& pointGeom,
 }
 
 /* public */
-PointGeometryUnion::PointGeometryUnion(const geom::Puntal& pointGeom_,
+PointGeometryUnion::PointGeometryUnion(const geom::Geometry& pointGeom_,
                                        const geom::Geometry& otherGeom_)
     :
     pointGeom(pointGeom_),
diff --git a/src/operation/union/UnaryUnionOp.cpp b/src/operation/union/UnaryUnionOp.cpp
index 1158329..26a2d5c 100644
--- a/src/operation/union/UnaryUnionOp.cpp
+++ b/src/operation/union/UnaryUnionOp.cpp
@@ -25,7 +25,6 @@
 #include <geos/operation/union/CascadedPolygonUnion.h>
 #include <geos/operation/union/PointGeometryUnion.h>
 #include <geos/geom/Coordinate.h>
-#include <geos/geom/Puntal.h>
 #include <geos/geom/Point.h>
 #include <geos/geom/MultiPoint.h>
 #include <geos/geom/MultiLineString.h>
@@ -66,7 +65,6 @@ UnaryUnionOp::unionWithNull(std::unique_ptr<geom::Geometry> g0,
 std::unique_ptr<geom::Geometry>
 UnaryUnionOp::Union()
 {
-    using geom::Puntal;
     typedef std::unique_ptr<geom::Geometry> GeomPtr;
 
     GeomPtr ret;
@@ -130,8 +128,7 @@ UnaryUnionOp::Union()
         assert(!unionPoints.get());
     }
     else {
-        Puntal& up = dynamic_cast<Puntal&>(*unionPoints);
-        ret = PointGeometryUnion::Union(up, *unionLA);
+        ret = PointGeometryUnion::Union(*unionPoints, *unionLA);
     }
 
     if(! ret.get()) {
diff --git a/src/precision/GeometryPrecisionReducer.cpp b/src/precision/GeometryPrecisionReducer.cpp
index 80997e3..8e817fb 100644
--- a/src/precision/GeometryPrecisionReducer.cpp
+++ b/src/precision/GeometryPrecisionReducer.cpp
@@ -80,7 +80,7 @@ GeometryPrecisionReducer::reduce(const Geometry& geom)
     }
 
     //TODO: handle GeometryCollections containing polys
-    if(!(dynamic_cast<const Polygonal*>(reducePW.get()))) {
+    if(!reducePW->isPolygonal()) {
         return reducePW;
     }
 
diff --git a/tests/unit/geom/GeometryComponentFilterTest.cpp b/tests/unit/geom/GeometryComponentFilterTest.cpp
index 29127c7..16eeda9 100644
--- a/tests/unit/geom/GeometryComponentFilterTest.cpp
+++ b/tests/unit/geom/GeometryComponentFilterTest.cpp
@@ -90,7 +90,7 @@ void object::test<1>
         void
         filter_ro(geos::geom::Geometry const* g) override
         {
-            if(dynamic_cast<geos::geom::Lineal const*>(g)) {
+            if(g->isLineal()) {
                 lineal.push_back(g);
             }
             else {
diff --git a/tests/unit/geom/GeometryFilterTest.cpp b/tests/unit/geom/GeometryFilterTest.cpp
index ea2f434..13c76a3 100644
--- a/tests/unit/geom/GeometryFilterTest.cpp
+++ b/tests/unit/geom/GeometryFilterTest.cpp
@@ -60,7 +60,7 @@ void object::test<1>
         void
         filter_ro(geos::geom::Geometry const* g) override
         {
-            if(dynamic_cast<geos::geom::Lineal const*>(g)) {
+            if(g->isLineal()) {
                 lineal.push_back(g);
             }
             else {

-----------------------------------------------------------------------

Summary of changes:
 benchmarks/ClassSizes.cpp                         | 17 +++++++
 include/geos/geom/BinaryOp.h                      |  3 +-
 include/geos/geom/Geometry.h                      | 17 +++++++
 include/geos/geom/GeometryCollection.h            |  2 +
 include/geos/geom/LineString.h                    |  3 +-
 include/geos/geom/Lineal.h                        | 49 ------------------
 include/geos/geom/Makefile.am                     |  5 +-
 include/geos/geom/MultiLineString.h               |  7 ++-
 include/geos/geom/MultiPoint.h                    |  7 ++-
 include/geos/geom/MultiPolygon.h                  |  7 ++-
 include/geos/geom/Point.h                         |  3 +-
 include/geos/geom/Polygon.h                       |  3 +-
 include/geos/geom/Polygonal.h                     | 49 ------------------
 include/geos/geom/Puntal.h                        | 49 ------------------
 include/geos/linearref/LocationIndexedLine.h      |  3 +-
 include/geos/operation/union/PointGeometryUnion.h |  5 +-
 src/geom/GeometryCollection.cpp                   |  8 +++
 src/geom/prep/PreparedPolygonIntersects.cpp       |  3 +-
 src/operation/union/CascadedPolygonUnion.cpp      |  5 +-
 src/operation/union/PointGeometryUnion.cpp        |  5 +-
 src/operation/union/UnaryUnionOp.cpp              |  5 +-
 src/precision/GeometryPrecisionReducer.cpp        |  2 +-
 tests/unit/geom/GeometryCollectionTest.cpp        | 60 +++++++++++++++++++++--
 tests/unit/geom/GeometryComponentFilterTest.cpp   |  2 +-
 tests/unit/geom/GeometryFilterTest.cpp            |  2 +-
 tests/unit/geom/LineStringTest.cpp                | 21 ++++++++
 tests/unit/geom/LinearRingTest.cpp                | 20 ++++++++
 tests/unit/geom/MultiLineStringTest.cpp           | 34 +++++++++++--
 tests/unit/geom/MultiPointTest.cpp                | 44 ++++++++++++-----
 tests/unit/geom/MultiPolygonTest.cpp              | 36 ++++++++++++--
 tests/unit/geom/PointTest.cpp                     | 20 ++++++++
 tests/unit/geom/PolygonTest.cpp                   | 20 ++++++++
 32 files changed, 306 insertions(+), 210 deletions(-)
 delete mode 100644 include/geos/geom/Lineal.h
 delete mode 100644 include/geos/geom/Polygonal.h
 delete mode 100644 include/geos/geom/Puntal.h


hooks/post-receive
-- 
GEOS


More information about the geos-commits mailing list