Commit 6a2a2b2a authored by Sandro Santilli's avatar Sandro Santilli

Remove unused code and protect debug-only used one

parent 24e4daea
Pipeline #11609013 passed with stage
in 43 minutes and 33 seconds
......@@ -7,7 +7,7 @@
*
* 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.
* by the Free Software Foundation.
* See the COPYING file for more information.
*
***********************************************************************
......@@ -55,23 +55,12 @@ namespace validate { // geos.operation.overlay.validate
namespace { // anonymous namespace
bool
isArea(const Geometry& g)
{
GeometryTypeId type = g.getGeometryTypeId();
if ( type == GEOS_POLYGON ) return true;
if ( type == GEOS_MULTIPOLYGON ) return true;
#if GEOS_DEBUG
cerr << "OverlayResultValidator: one of the geoms being checked is not a POLYGON or MULTIPOLYGON, blindly returning a positive answer (is valid)" << endl;
#endif
return false;
}
auto_ptr<MultiPoint>
toMultiPoint(vector<Coordinate>& coords)
{
const GeometryFactory& gf = *(GeometryFactory::getDefaultInstance());
const CoordinateSequenceFactory& csf =
const CoordinateSequenceFactory& csf =
*(gf.getCoordinateSequenceFactory());
auto_ptr< vector<Coordinate> > nc ( new vector<Coordinate>(coords) );
......@@ -81,6 +70,7 @@ toMultiPoint(vector<Coordinate>& coords)
return mp;
}
#endif
} // anonymous namespace
......@@ -118,13 +108,6 @@ OverlayResultValidator::OverlayResultValidator(
bool
OverlayResultValidator::isValid(OverlayOp::OpCode overlayOp)
{
// The check only works for areal geoms
#if 0 // now that FuzzyPointLocator extracts polygonal geoms,
// there should be no problem here
if ( ! isArea(g0) ) return true;
if ( ! isArea(g1) ) return true;
if ( ! isArea(gres) ) return true;
#endif
addTestPts(g0);
addTestPts(g1);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment