[mapguide-commits] r9708 - sandbox/jng/geos_c/Common/Geometry
svn_mapguide at osgeo.org
svn_mapguide at osgeo.org
Tue Aug 4 09:28:30 PDT 2020
Author: jng
Date: 2020-08-04 09:28:30 -0700 (Tue, 04 Aug 2020)
New Revision: 9708
Modified:
sandbox/jng/geos_c/Common/Geometry/GeosUtil.cpp
sandbox/jng/geos_c/Common/Geometry/PreparedGeometry.cpp
Log:
Fix some failing geometry tests
Modified: sandbox/jng/geos_c/Common/Geometry/GeosUtil.cpp
===================================================================
--- sandbox/jng/geos_c/Common/Geometry/GeosUtil.cpp 2020-08-04 15:10:47 UTC (rev 9707)
+++ sandbox/jng/geos_c/Common/Geometry/GeosUtil.cpp 2020-08-04 16:28:30 UTC (rev 9708)
@@ -751,7 +751,7 @@
double MgGeosUtil::Area(MgGeometricEntity* geom1)
{
- bool dResult = 0.0;
+ double dResult = 0.0;
MG_GEOMETRY_TRY()
@@ -764,7 +764,7 @@
double MgGeosUtil::Length(MgGeometricEntity* geom1)
{
- bool dResult = 0.0;
+ double dResult = 0.0;
MG_GEOMETRY_TRY()
@@ -787,7 +787,7 @@
hCtx = initGEOS_r(MgGeosWarningHandler, MgGeosErrorHandler);
- hGeom = GeometricEntityToGeos(hCtx, geom);
+ hGeom = GeometricEntityToGeos(hCtx, geom1);
if (NULL != hGeom)
{
@@ -853,7 +853,7 @@
MG_GEOMETRY_TRY()
- STRING wkt = geom1->ToAwkt(true);
+ STRING wkt = ToAwkt(geom1);
MgWktReaderWriter wktRw;
Ptr<MgGeometry> geom2 = wktRw.Read(wkt);
Modified: sandbox/jng/geos_c/Common/Geometry/PreparedGeometry.cpp
===================================================================
--- sandbox/jng/geos_c/Common/Geometry/PreparedGeometry.cpp 2020-08-04 15:10:47 UTC (rev 9707)
+++ sandbox/jng/geos_c/Common/Geometry/PreparedGeometry.cpp 2020-08-04 16:28:30 UTC (rev 9708)
@@ -22,7 +22,7 @@
{
public:
PreparedGeometryImpl()
- : m_pg(NULL), m_hCtx(NULL)
+ : m_pg(nullptr), m_hCtx(nullptr)
{
m_hCtx = initGEOS_r(MgGeosWarningHandler, MgGeosErrorHandler);
}
@@ -29,7 +29,7 @@
~PreparedGeometryImpl()
{
GEOSPreparedGeom_destroy_r(m_hCtx, m_pg);
- if (NULL != m_hCtx)
+ if (nullptr != m_hCtx)
{
finishGEOS_r(m_hCtx);
}
@@ -37,7 +37,7 @@
void Prepare(MgGeometry* geom)
{
GEOSGeometry* g = GeometryToGeos(geom);
- m_pg = GEOSPrepare(g);
+ m_pg = GEOSPrepare_r(m_hCtx, g);
GEOSGeom_destroy_r(m_hCtx, g);
}
bool Contains(MgGeometry * geom)
More information about the mapguide-commits
mailing list