[geos-commits] r4024 - trunk/src/operation/intersection
svn_geos at osgeo.org
svn_geos at osgeo.org
Thu Sep 25 08:21:56 PDT 2014
Author: strk
Date: 2014-09-25 08:21:56 -0700 (Thu, 25 Sep 2014)
New Revision: 4024
Modified:
trunk/src/operation/intersection/RectangleIntersection.cpp
Log:
Fix bug in RectangleIntersection on finding rect fully contained
Modified: trunk/src/operation/intersection/RectangleIntersection.cpp
===================================================================
--- trunk/src/operation/intersection/RectangleIntersection.cpp 2014-09-25 15:21:45 UTC (rev 4023)
+++ trunk/src/operation/intersection/RectangleIntersection.cpp 2014-09-25 15:21:56 UTC (rev 4024)
@@ -467,8 +467,10 @@
using geos::algorithm::CGAlgorithms;
if( parts.empty() )
{
- const Coordinate rectCorner(rect.xmin(), rect.ymin());
- if ( CGAlgorithms::locatePointInRing(rectCorner,
+ Coordinate rectCenter(rect.xmin(), rect.ymin());
+ rectCenter.x += (rect.xmax()-rect.xmin())/2;
+ rectCenter.y += (rect.ymax()-rect.ymin())/2;
+ if ( CGAlgorithms::locatePointInRing(rectCenter,
*g->getExteriorRing()->getCoordinatesRO())
!= Location::INTERIOR )
{
More information about the geos-commits
mailing list