[mapguide-commits] r9705 - in sandbox/jng/geos_c: . Common/Geometry Oem Oem/geos/VisualStudio Server/src/PostBuild UnitTest/WebTier/Java Web/src/MapGuideApi
svn_mapguide at osgeo.org
svn_mapguide at osgeo.org
Tue Aug 4 07:32:21 PDT 2020
Author: jng
Date: 2020-08-04 07:32:16 -0700 (Tue, 04 Aug 2020)
New Revision: 9705
Added:
sandbox/jng/geos_c/Oem/geos/VisualStudio/geos_c.vcxproj
Removed:
sandbox/jng/geos_c/Common/Geometry/GeosInclude.h
Modified:
sandbox/jng/geos_c/
sandbox/jng/geos_c/Common/Geometry/Geometry.vcxproj
sandbox/jng/geos_c/Common/Geometry/GeometryExceptionDef.h
sandbox/jng/geos_c/Common/Geometry/GeometrySimplifier.cpp
sandbox/jng/geos_c/Common/Geometry/GeosUtil.cpp
sandbox/jng/geos_c/Common/Geometry/GeosUtil.h
sandbox/jng/geos_c/Common/Geometry/PreparedGeometry.cpp
sandbox/jng/geos_c/Oem/geos/VisualStudio/GEOS.sln
sandbox/jng/geos_c/Oem/geos/VisualStudio/GEOS.vcxproj
sandbox/jng/geos_c/Oem/oem.sln
sandbox/jng/geos_c/Server/src/PostBuild/PostBuild.mak
sandbox/jng/geos_c/UnitTest/WebTier/Java/build.xml
sandbox/jng/geos_c/Web/src/MapGuideApi/copydlls.bat
sandbox/jng/geos_c/desktop_package_excludes.txt
sandbox/jng/geos_c/viewer_package_excludes.txt
Log:
Merged revision(s) 9465-9704 from sandbox/jng/use_geos_c_api:
Index: sandbox/jng/geos_c
===================================================================
--- sandbox/jng/geos_c 2020-08-04 14:22:55 UTC (rev 9704)
+++ sandbox/jng/geos_c 2020-08-04 14:32:16 UTC (rev 9705)
Property changes on: sandbox/jng/geos_c
___________________________________________________________________
Modified: svn:mergeinfo
## -33,6 +33,7 ##
/sandbox/jng/tiling:8174-8208
/sandbox/jng/tiling_v2:9490-9509
/sandbox/jng/tiling_v3:9539-9559
+/sandbox/jng/use_geos_c_api:9465-9704
/sandbox/jng/utfgrid:9179-9212
/sandbox/jng/v30:8212-8227
/sandbox/jng/v4:9511-9519
Modified: sandbox/jng/geos_c/Common/Geometry/Geometry.vcxproj
===================================================================
--- sandbox/jng/geos_c/Common/Geometry/Geometry.vcxproj 2020-08-04 14:22:55 UTC (rev 9704)
+++ sandbox/jng/geos_c/Common/Geometry/Geometry.vcxproj 2020-08-04 14:32:16 UTC (rev 9705)
@@ -94,7 +94,7 @@
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<ClCompile>
<Optimization>Disabled</Optimization>
- <AdditionalIncludeDirectories>..\CoordinateSystem;..\Foundation;..\Geometry;..\..\Oem\ACE\ACE_wrappers;..\..\Oem\geos\include;..\..\Oem\CsMap\CsMapDev\Include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories>..\CoordinateSystem;..\Foundation;..\Geometry;..\..\Oem\ACE\ACE_wrappers;..\..\Oem\geos\capi;..\..\Oem\geos\include;..\..\Oem\CsMap\CsMapDev\Include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_USRDLL;GEOMETRY_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
@@ -103,7 +103,7 @@
<MultiProcessorCompilation>true</MultiProcessorCompilation>
</ClCompile>
<Link>
- <AdditionalDependencies>csmapd.lib;ACEd.lib;GEOSd.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <AdditionalDependencies>csmapd.lib;ACEd.lib;geos_cd.lib;%(AdditionalDependencies)</AdditionalDependencies>
<OutputFile>$(OutDir)MgGeometryd.dll</OutputFile>
<AdditionalLibraryDirectories>..\..\Oem\CsMap\CsMapDev\lib140\$(Configuration);..\..\Oem\ACE\ACE_wrappers\lib\$(Configuration);..\..\Oem\geos\VisualStudio\$(Configuration);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<GenerateDebugInformation>true</GenerateDebugInformation>
@@ -120,7 +120,7 @@
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<ClCompile>
<Optimization>Disabled</Optimization>
- <AdditionalIncludeDirectories>..\CoordinateSystem;..\Foundation;..\Geometry;..\..\Oem\ACE\ACE_wrappers;..\..\Oem\geos\include;..\..\Oem\CsMap\CsMapDev\Include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories>..\CoordinateSystem;..\Foundation;..\Geometry;..\..\Oem\ACE\ACE_wrappers;..\..\Oem\geos\capi;..\..\Oem\geos\include;..\..\Oem\CsMap\CsMapDev\Include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_USRDLL;GEOMETRY_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
@@ -129,7 +129,7 @@
<MultiProcessorCompilation>true</MultiProcessorCompilation>
</ClCompile>
<Link>
- <AdditionalDependencies>csmapd.lib;ACEd.lib;GEOSd.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <AdditionalDependencies>csmapd.lib;ACEd.lib;geos_cd.lib;%(AdditionalDependencies)</AdditionalDependencies>
<OutputFile>$(OutDir)MgGeometryd.dll</OutputFile>
<AdditionalLibraryDirectories>..\..\Oem\CsMap\CsMapDev\lib140\$(Configuration)64;..\..\Oem\ACE\ACE_wrappers\lib64\$(Configuration);..\..\Oem\geos\VisualStudio\$(Configuration)64;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<GenerateDebugInformation>true</GenerateDebugInformation>
@@ -143,7 +143,7 @@
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<ClCompile>
<Optimization>MaxSpeed</Optimization>
- <AdditionalIncludeDirectories>..\CoordinateSystem;..\Foundation;..\Geometry;..\..\Oem\ACE\ACE_wrappers;..\..\Oem\geos\include;..\..\Oem\CsMap\CsMapDev\Include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories>..\CoordinateSystem;..\Foundation;..\Geometry;..\..\Oem\ACE\ACE_wrappers;..\..\Oem\geos\capi;..\..\Oem\geos\include;..\..\Oem\CsMap\CsMapDev\Include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;GEOMETRY_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
<WarningLevel>Level3</WarningLevel>
@@ -151,7 +151,7 @@
<MultiProcessorCompilation>true</MultiProcessorCompilation>
</ClCompile>
<Link>
- <AdditionalDependencies>csmap.lib;ACE.lib;GEOS.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <AdditionalDependencies>csmap.lib;ACE.lib;geos_c.lib;%(AdditionalDependencies)</AdditionalDependencies>
<OutputFile>$(OutDir)MgGeometry.dll</OutputFile>
<AdditionalLibraryDirectories>..\..\Oem\CsMap\CsMapDev\lib140\$(Configuration);..\..\Oem\ACE\ACE_wrappers\lib\$(Configuration);..\..\Oem\geos\VisualStudio\$(Configuration);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<GenerateDebugInformation>true</GenerateDebugInformation>
@@ -170,7 +170,7 @@
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<ClCompile>
<Optimization>MaxSpeed</Optimization>
- <AdditionalIncludeDirectories>..\CoordinateSystem;..\Foundation;..\Geometry;..\..\Oem\ACE\ACE_wrappers;..\..\Oem\geos\include;..\..\Oem\CsMap\CsMapDev\Include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories>..\CoordinateSystem;..\Foundation;..\Geometry;..\..\Oem\ACE\ACE_wrappers;..\..\Oem\geos\capi;..\..\Oem\geos\include;..\..\Oem\CsMap\CsMapDev\Include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;GEOMETRY_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
<WarningLevel>Level3</WarningLevel>
@@ -178,7 +178,7 @@
<MultiProcessorCompilation>true</MultiProcessorCompilation>
</ClCompile>
<Link>
- <AdditionalDependencies>csmap.lib;ACE.lib;GEOS.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <AdditionalDependencies>csmap.lib;ACE.lib;geos_c.lib;%(AdditionalDependencies)</AdditionalDependencies>
<OutputFile>$(OutDir)MgGeometry.dll</OutputFile>
<AdditionalLibraryDirectories>..\..\Oem\CsMap\CsMapDev\lib140\$(Configuration)64;..\..\Oem\ACE\ACE_Wrappers\lib64\$(Configuration);..\..\Oem\geos\VisualStudio\$(Configuration)64;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<GenerateDebugInformation>true</GenerateDebugInformation>
Modified: sandbox/jng/geos_c/Common/Geometry/GeometryExceptionDef.h
===================================================================
--- sandbox/jng/geos_c/Common/Geometry/GeometryExceptionDef.h 2020-08-04 14:22:55 UTC (rev 9704)
+++ sandbox/jng/geos_c/Common/Geometry/GeometryExceptionDef.h 2020-08-04 14:32:16 UTC (rev 9705)
@@ -26,14 +26,6 @@
MG_TRY() \
#define MG_GEOMETRY_CATCH(methodName) \
- } \
- catch (const geos::util::GEOSException& e) \
- { \
- MgStringCollection arguments; \
- std::string sWhat = e.what(); \
- arguments.Add(MgUtil::MultiByteToWideChar(sWhat)); \
- mgException = NULL; \
- \
MG_CATCH(methodName) \
#define MG_GEOMETRY_THROW() \
Modified: sandbox/jng/geos_c/Common/Geometry/GeometrySimplifier.cpp
===================================================================
--- sandbox/jng/geos_c/Common/Geometry/GeometrySimplifier.cpp 2020-08-04 14:22:55 UTC (rev 9704)
+++ sandbox/jng/geos_c/Common/Geometry/GeometrySimplifier.cpp 2020-08-04 14:32:16 UTC (rev 9705)
@@ -15,9 +15,7 @@
// Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
//
-#include "GeosInclude.h"
-#include "geos/simplify/DouglasPeuckerSimplifier.h"
-#include "geos/simplify/TopologyPreservingSimplifier.h"
+#include <geos_c.h>
#include "GeometryCommon.h"
#include "GeosUtil.h"
@@ -33,52 +31,13 @@
MgGeometry* MgGeometrySimplifier::Simplify(MgGeometry* geom, double tolerance, INT32 algorithm)
{
Ptr<MgGeometry> simplified;
- std::unique_ptr<Geometry> gInput;
- std::unique_ptr<Geometry> gOutput;
+
MG_GEOMETRY_TRY()
- CHECKARGUMENTNULL(geom, L"MgGeometrySimplifier.Simplify");
- if (algorithm != MgGeometrySimplificationAlgorithmType::DouglasPeucker &&
- algorithm != MgGeometrySimplificationAlgorithmType::TopologyPreserving)
- {
- throw new MgInvalidArgumentException(L"MgGeometrySimplifier.Simplify", __LINE__, __WFILE__, NULL, L"MgInvalidGeometrySimplficationAlgorithm", NULL);
- }
+ simplified = MgGeosUtil::Simplify(geom, tolerance, algorithm);
- STRING inputWKt = geom->ToAwkt(true);
- PrecisionModel pm;
-// GEOS 3.6.0 onwards changes the C++ API around GeometryFactory
-#if (GEOS_VERSION_MAJOR == 3) && (GEOS_VERSION_MINOR >= 6)
- GeometryFactory::unique_ptr gf = GeometryFactory::create(&pm, 10);
- WKTReader r(gf.get());
-#else
- GeometryFactory gf(&pm, 10);
- WKTReader r(&gf);
-#endif
- WKTWriter w;
+ MG_GEOMETRY_CATCH_AND_THROW(L"MgGeometrySimplifier.Simplify");
- gInput.reset(r.read(MgUtil::WideCharToMultiByte(inputWKt)));
-
- switch (algorithm)
- {
- case MgGeometrySimplificationAlgorithmType::DouglasPeucker:
- gOutput = geos::simplify::DouglasPeuckerSimplifier::simplify(gInput.get(), tolerance);
- break;
- case MgGeometrySimplificationAlgorithmType::TopologyPreserving:
- gOutput = geos::simplify::TopologyPreservingSimplifier::simplify(gInput.get(), tolerance);
- break;
- }
-
- Geometry* gSimp = gOutput.get();
- std::string mbSimpWkt = w.write(gSimp);
-
- if (mbSimpWkt.find("EMPTY", 0) == string::npos)
- {
- MgWktReaderWriter rdrWrt;
- simplified = rdrWrt.Read(MgUtil::MultiByteToWideChar(mbSimpWkt));
- }
-
- MG_GEOMETRY_CATCH_AND_THROW(L"MgGeometrySimplifier.Simplify")
-
return simplified.Detach();
}
Deleted: sandbox/jng/geos_c/Common/Geometry/GeosInclude.h
===================================================================
--- sandbox/jng/geos_c/Common/Geometry/GeosInclude.h 2020-08-04 14:22:55 UTC (rev 9704)
+++ sandbox/jng/geos_c/Common/Geometry/GeosInclude.h 2020-08-04 14:32:16 UTC (rev 9705)
@@ -1,27 +0,0 @@
-//
-// Copyright (C) 2004-2017 by Autodesk, Inc.
-//
-// This library is free software; you can redistribute it and/or
-// modify it under the terms of version 2.1 of the GNU Lesser
-// General Public License as published by the Free Software Foundation.
-//
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-// Lesser General Public License for more details.
-//
-// You should have received a copy of the GNU Lesser General Public
-// License along with this library; if not, write to the Free Software
-// Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
-//
-
-#ifndef _GEOMETRY_GEOS_INCLUDE_H
-#define _GEOMETRY_GEOS_INCLUDE_H
-
-#include <geos/version.h>
-#include <geos/geom.h>
-#include <geos/util.h>
-#include <geos/io.h>
-#include <geos/unload.h>
-
-#endif
\ No newline at end of file
Modified: sandbox/jng/geos_c/Common/Geometry/GeosUtil.cpp
===================================================================
--- sandbox/jng/geos_c/Common/Geometry/GeosUtil.cpp 2020-08-04 14:22:55 UTC (rev 9704)
+++ sandbox/jng/geos_c/Common/Geometry/GeosUtil.cpp 2020-08-04 14:32:16 UTC (rev 9705)
@@ -15,666 +15,853 @@
// Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
//
-// disable C4244 of io.h about int64 assigned to unsigned long
-#pragma warning(push)
-#pragma warning(disable: 4244)
-#include "GeosInclude.h"
-#pragma warning(pop)
+#include <geos_c.h>
#include "GeometryCommon.h"
#include "Buffer/buffer.h"
#include "GeosUtil.h"
#include "GeometryExceptionDef.h"
-#include "Spatial/SpatialUtilities.h"
+#include "Spatial/SpatialUtility.h"
#include "GeometricEntityType.h"
-using namespace geos;
-using namespace geos::io;
-
-// Dummy class used to automate initialization/uninitialization of GEOS.
-class CInitGeos
+// This is a verbatim implementation of geos::algorithm::InteriorPointPoint
+// since this is not exposed through the GEOS C API
+//
+class MgGeomInteriorPointPoint
{
public:
- CInitGeos()
+ MgGeomInteriorPointPoint(MgGeometry* geom)
{
+ minDistance = std::numeric_limits<double>().max();
+ centroid = geom->GetCentroid();
+ if (NULL == centroid.p)
+ {
+ hasInterior = false;
+ }
+ else
+ {
+ hasInterior = true;
+ Add(geom);
+ }
}
- ~CInitGeos()
+ ~MgGeomInteriorPointPoint()
{
- // free GEOS resources
- Unload::Release();
+ centroid = NULL;
+ SAFE_RELEASE(interiorPoint);
}
+
+ MgPoint* GetInteriorPoint()
+ {
+ if (!hasInterior)
+ {
+ return NULL;
+ }
+ return SAFE_ADDREF(interiorPoint);
+ }
+private:
+ double minDistance;
+ bool hasInterior;
+
+ Ptr<MgPoint> centroid;
+ MgPoint* interiorPoint;
+
+ void Add(MgGeometry* geom)
+ {
+ INT32 gt = geom->GetGeometryType();
+ if (MgGeometryType::Point == gt)
+ {
+ Add(static_cast<MgPoint*>(geom));
+ }
+ else if (MgGeometryType::MultiGeometry)
+ {
+ MgMultiGeometry* gc = static_cast<MgMultiGeometry*>(geom);
+ for (INT32 i = 0; i < gc->GetCount(); i++)
+ {
+ Ptr<MgGeometry> itemGeom = gc->GetGeometryAt(i);
+ Add(itemGeom);
+ }
+ }
+ }
+
+ void Add(MgPoint* point)
+ {
+ double dist = point->Distance(centroid, NULL);
+ if (dist < minDistance)
+ {
+ SAFE_RELEASE(interiorPoint);
+ interiorPoint = SAFE_ADDREF(point);
+ minDistance = dist;
+ }
+ }
};
-static CInitGeos s_InitGeos;
-
-class GeosWktReader
+// This is a verbatim implementation of geos::algorithm::InteriorPointLine
+// since this is not exposed through the GEOS C API
+//
+class MgGeomInteriorPointLine
{
public:
-// GEOS 3.6.0 onwards changes the C++ API around GeometryFactory
-#if (GEOS_VERSION_MAJOR == 3) && (GEOS_VERSION_MINOR >= 6)
- GeosWktReader() : m_pm(NULL), m_reader(NULL)
+ MgGeomInteriorPointLine(MgGeometry* geom)
{
- m_pm = new PrecisionModel();
- m_gf = GeometryFactory::create(m_pm, 10);
- m_reader = new WKTReader(m_gf.get());
+ minDistance = std::numeric_limits<double>().max();
+ hasInterior = false;
+ centroid = geom->GetCentroid();
+ if (NULL != centroid.p)
+ {
+ AddInterior(geom);
+ }
+
+ if (!hasInterior)
+ AddEndpoints(geom);
}
- ~GeosWktReader()
+ ~MgGeomInteriorPointLine()
{
- delete m_reader;
- delete m_pm;
+ centroid = NULL;
+ SAFE_RELEASE(interiorPoint);
}
-#else
- GeosWktReader() : m_pm(NULL), m_reader(NULL), m_gf(NULL)
+ void AddInterior(MgGeometry* geom)
{
- m_pm = new PrecisionModel();
- m_gf = new GeometryFactory(m_pm, 10);
- m_reader = new WKTReader(m_gf);
+ INT32 gt = geom->GetGeometryType();
+ if (MgGeometryType::LineString == gt)
+ {
+ MgLineString* ls = static_cast<MgLineString*>(geom);
+ Ptr<MgCoordinate> start = ls->GetStartCoordinate();
+ Ptr<MgCoordinate> end = ls->GetEndCoordinate();
+ Ptr<MgCoordinateIterator> iter = ls->GetCoordinates();
+ AddInterior(iter, start, end);
+ }
+ else if (MgGeometryType::MultiGeometry == gt)
+ {
+ MgMultiGeometry* mgeom = static_cast<MgMultiGeometry*>(geom);
+ for (INT32 i = 0; i < mgeom->GetCount(); i++)
+ {
+ Ptr<MgGeometry> g = mgeom->GetGeometryAt(i);
+ AddInterior(g);
+ }
+ }
}
- ~GeosWktReader()
+ void AddInterior(MgCoordinateIterator* iter, MgCoordinate* start, MgCoordinate* end)
{
- delete m_reader;
- delete m_gf;
- delete m_pm;
+ while (iter->MoveNext())
+ {
+ Ptr<MgCoordinate> current = iter->GetCurrent();
+ if (current.p == start || current.p == end)
+ continue;
+
+ Ptr<MgPoint> pt = new MgPoint(current);
+ Add(pt);
+ }
}
-#endif
- Geometry* Read(CREFSTRING wkt)
+ void AddEndpoints(MgGeometry* geom)
{
- return m_reader->read(MgUtil::WideCharToMultiByte(wkt));
+ INT32 gt = geom->GetGeometryType();
+ if (MgGeometryType::LineString == gt)
+ {
+ MgLineString* ls = static_cast<MgLineString*>(geom);
+ Ptr<MgCoordinate> start = ls->GetStartCoordinate();
+ Ptr<MgCoordinate> end = ls->GetEndCoordinate();
+ Ptr<MgCoordinateIterator> iter = ls->GetCoordinates();
+ AddEndpoints(start, end);
+ }
+ else if (MgGeometryType::MultiGeometry == gt)
+ {
+ MgMultiGeometry* mgeom = static_cast<MgMultiGeometry*>(geom);
+ for (INT32 i = 0; i < mgeom->GetCount(); i++)
+ {
+ Ptr<MgGeometry> g = mgeom->GetGeometryAt(i);
+ AddEndpoints(g);
+ }
+ }
}
+ void AddEndpoints(MgCoordinate* start, MgCoordinate* end)
+ {
+ Ptr<MgPoint> startPt = new MgPoint(start);
+ Add(startPt);
+ Ptr<MgPoint> endPt = new MgPoint(end);
+ Add(endPt);
+ }
+ void Add(MgPoint* point)
+ {
+ double dist = point->Distance(centroid, NULL);
+ if (!hasInterior || dist < minDistance)
+ {
+ SAFE_RELEASE(interiorPoint);
+ interiorPoint = SAFE_ADDREF(point);
+
+ minDistance = dist;
+ hasInterior = true;
+ }
+ }
+ MgPoint* GetInteriorPoint()
+ {
+ if (!hasInterior)
+ {
+ return NULL;
+ }
+ return SAFE_ADDREF(interiorPoint);
+ }
+
private:
- PrecisionModel* m_pm;
- WKTReader* m_reader;
-// GEOS 3.6.0 onwards changes the C++ API around GeometryFactory
-#if (GEOS_VERSION_MAJOR == 3) && (GEOS_VERSION_MINOR >= 6)
- GeometryFactory::unique_ptr m_gf;
-#else
- GeometryFactory* m_gf;
-#endif
+ double minDistance;
+ bool hasInterior;
+
+ Ptr<MgPoint> centroid;
+ MgPoint* interiorPoint;
};
-bool MgGeosUtil::Contains(MgGeometry* geom1, MgGeometry* geom2)
+// This is a verbatim implementation of geos::algorithm::InteriorPointArea
+// since this is not exposed through the GEOS C API
+//
+class MgGeomInteriorPointArea
{
- bool contains = false;
+public:
+ MgGeomInteriorPointArea(MgGeometry* geom)
+ {
+ throw new MgNotImplementedException(L"MgGeomInteriorPointArea.MgGeomInteriorPointArea", __LINE__, __WFILE__, NULL, L"", NULL);
+ }
+ ~MgGeomInteriorPointArea()
+ {
+ centroid = NULL;
+ SAFE_RELEASE(interiorPoint);
+ }
- MG_GEOMETRY_TRY()
+ MgPoint* GetInteriorPoint()
+ {
+ if (!hasInterior)
+ {
+ return NULL;
+ }
+ return SAFE_ADDREF(interiorPoint);
+ }
- GeosWktReader r;
+private:
+ double minDistance;
+ bool hasInterior;
- Ptr<MgGeometry> tGeom1 = MgSpatialUtility::TesselateCurve(geom1);
- Ptr<MgGeometry> tGeom2 = MgSpatialUtility::TesselateCurve(geom2);
+ Ptr<MgPoint> centroid;
+ MgPoint* interiorPoint;
+};
- STRING wktGeom1 = tGeom1->ToAwkt(true);
- STRING wktGeom2 = tGeom2->ToAwkt(true);
+static void MgGeosErrorHandler(const char *fmt, ...)
+{
+
+}
- std::unique_ptr<Geometry> g1(r.Read(wktGeom1));
- std::unique_ptr<Geometry> g2(r.Read(wktGeom2));
+static void MgGeosWarningHandler(const char *fmt, ...)
+{
- contains = g1->contains(g2.get());
+}
- MG_GEOMETRY_CATCH_AND_THROW(L"MgGeosUtil.Contains")
+static GEOSGeometry* GeometricEntityToGeos(GEOSContextHandle_t hCtx, MgGeometricEntity* geom)
+{
+ STRING wktGeom = MgGeosUtil::ToAwkt(geom);
+ std::string wkt = MgUtil::WideCharToMultiByte(wktGeom);
+ return GEOSGeomFromWKT_r(hCtx, wkt.c_str());
+}
- return contains;
+static GEOSGeometry* GeometryToGeos(GEOSContextHandle_t hCtx, MgGeometry* geom)
+{
+ Ptr<MgGeometry> tGeom = MgSpatialUtility::TesselateCurve(geom);
+ return GeometricEntityToGeos(hCtx, tGeom);
}
-bool MgGeosUtil::Intersects(MgGeometry* geom1, MgGeometry* geom2)
+typedef char(*geos_geom_bool_property)(GEOSContextHandle_t, const GEOSGeometry*);
+typedef int(*geos_geom_double_property)(GEOSContextHandle_t, const GEOSGeometry*, double*);
+typedef GEOSGeometry*(*geos_unary_geometry_operator)(GEOSContextHandle_t, const GEOSGeometry*);
+typedef GEOSGeometry*(*geos_binary_geometry_operator)(GEOSContextHandle_t, const GEOSGeometry*, const GEOSGeometry*);
+typedef char(*geos_binary_geometry_condition)(GEOSContextHandle_t, const GEOSGeometry*, const GEOSGeometry*);
+
+static bool MgGeosBoolProperty(MgGeometricEntity* geom, geos_geom_bool_property op)
{
- bool intersects = false;
+ bool bResult = false;
+ GEOSGeometry* hGeom = NULL;
+ GEOSContextHandle_t hCtx = NULL;
+
MG_GEOMETRY_TRY()
- GeosWktReader r;
+ hCtx = initGEOS_r(MgGeosWarningHandler, MgGeosErrorHandler);
- Ptr<MgGeometry> tGeom1 = MgSpatialUtility::TesselateCurve(geom1);
- Ptr<MgGeometry> tGeom2 = MgSpatialUtility::TesselateCurve(geom2);
+ hGeom = GeometricEntityToGeos(hCtx, geom);
- STRING wktGeom1 = tGeom1->ToAwkt(true);
- STRING wktGeom2 = tGeom2->ToAwkt(true);
+ if (NULL != hGeom)
+ {
+ bResult = op(hCtx, hGeom);
+ }
- std::unique_ptr<Geometry> g1(r.Read(wktGeom1));
- std::unique_ptr<Geometry> g2(r.Read(wktGeom2));
+ MG_GEOMETRY_CATCH(L"MgGeosBoolProperty")
- intersects = g1->intersects(g2.get());
+ GEOSGeom_destroy_r(hCtx, hGeom);
+ if (NULL != hCtx)
+ {
+ finishGEOS_r(hCtx);
+ }
- MG_GEOMETRY_CATCH_AND_THROW(L"MgGeosUtil.Intersects")
+ MG_GEOMETRY_THROW()
- return intersects;
+ return bResult;
}
-bool MgGeosUtil::Crosses(MgGeometry* geom1, MgGeometry* geom2)
+static double MgGeosDoubleProperty(MgGeometricEntity* geom, geos_geom_double_property op)
{
- bool crosses = false;
+ double dResult = 0.0;
+ GEOSGeometry* hGeom = NULL;
+ GEOSContextHandle_t hCtx = NULL;
+
MG_GEOMETRY_TRY()
- GeosWktReader r;
+ hCtx = initGEOS_r(MgGeosWarningHandler, MgGeosErrorHandler);
- Ptr<MgGeometry> tGeom1 = MgSpatialUtility::TesselateCurve(geom1);
- Ptr<MgGeometry> tGeom2 = MgSpatialUtility::TesselateCurve(geom2);
+ hGeom = GeometricEntityToGeos(hCtx, geom);
- STRING wktGeom1 = tGeom1->ToAwkt(true);
- STRING wktGeom2 = tGeom2->ToAwkt(true);
+ if (NULL != hGeom)
+ {
+ op(hCtx, hGeom, &dResult);
+ }
- std::unique_ptr<Geometry> g1(r.Read(wktGeom1));
- std::unique_ptr<Geometry> g2(r.Read(wktGeom2));
+ MG_GEOMETRY_CATCH(L"MgGeosDoubleProperty")
- crosses = g1->crosses(g2.get());
+ GEOSGeom_destroy_r(hCtx, hGeom);
+ if (NULL != hCtx)
+ {
+ finishGEOS_r(hCtx);
+ }
- MG_GEOMETRY_CATCH_AND_THROW(L"MgGeosUtil.Crosses")
+ MG_GEOMETRY_THROW()
- return crosses;
+ return dResult;
}
-bool MgGeosUtil::Disjoint(MgGeometry* geom1, MgGeometry* geom2)
+static bool MgGeosBinaryCondition(MgGeometry* geom1, MgGeometry* geom2, geos_binary_geometry_condition op)
{
- bool disjoint = false;
+ bool bResult = false;
+ GEOSGeometry* hGeom1 = NULL;
+ GEOSGeometry* hGeom2 = NULL;
+ GEOSContextHandle_t hCtx = NULL;
+
MG_GEOMETRY_TRY()
- GeosWktReader r;
+ hCtx = initGEOS_r(MgGeosWarningHandler, MgGeosErrorHandler);
- Ptr<MgGeometry> tGeom1 = MgSpatialUtility::TesselateCurve(geom1);
- Ptr<MgGeometry> tGeom2 = MgSpatialUtility::TesselateCurve(geom2);
+ hGeom1 = GeometryToGeos(hCtx, geom1);
+ hGeom2 = GeometryToGeos(hCtx, geom2);
- STRING wktGeom1 = tGeom1->ToAwkt(true);
- STRING wktGeom2 = tGeom2->ToAwkt(true);
+ if (NULL != hGeom1 && NULL != hGeom2)
+ {
+ bResult = op(hCtx, hGeom1, hGeom2);
+ }
- std::unique_ptr<Geometry> g1(r.Read(wktGeom1));
- std::unique_ptr<Geometry> g2(r.Read(wktGeom2));
+ MG_GEOMETRY_CATCH(L"MgGeosBinaryCondition")
- disjoint = g1->disjoint(g2.get());
+ GEOSGeom_destroy_r(hCtx, hGeom1);
+ GEOSGeom_destroy_r(hCtx, hGeom2);
+ if (NULL != hCtx)
+ {
+ finishGEOS_r(hCtx);
+ }
- MG_GEOMETRY_CATCH_AND_THROW(L"MgGeosUtil.Disjoint")
+ MG_GEOMETRY_THROW()
- return disjoint;
+ return bResult;
}
-bool MgGeosUtil::Equals(MgGeometry* geom1, MgGeometry* geom2)
+static MgGeometry* MgGeosBinaryOperator(MgGeometry* geom1, MgGeometry* geom2, geos_binary_geometry_operator op, bool emptyIsNull)
{
- bool equals = false;
+ Ptr<MgGeometry> geom;
+ GEOSGeometry* hGeom1 = NULL;
+ GEOSGeometry* hGeom2 = NULL;
+ GEOSGeometry* hResult = NULL;
+ GEOSContextHandle_t hCtx = NULL;
+
MG_GEOMETRY_TRY()
- GeosWktReader r;
+ hCtx = initGEOS_r(MgGeosWarningHandler, MgGeosErrorHandler);
- Ptr<MgGeometry> tGeom1 = MgSpatialUtility::TesselateCurve(geom1);
- Ptr<MgGeometry> tGeom2 = MgSpatialUtility::TesselateCurve(geom2);
+ hGeom1 = GeometryToGeos(hCtx, geom1);
+ hGeom2 = GeometryToGeos(hCtx, geom2);
- STRING wktGeom1 = tGeom1->ToAwkt(true);
- STRING wktGeom2 = tGeom2->ToAwkt(true);
+ if (NULL != hGeom1 && NULL != hGeom2)
+ {
+ hResult = op(hCtx, hGeom1, hGeom2);
+ if (NULL != hResult)
+ {
+ char* szWkt = GEOSGeomToWKT_r(hCtx, hResult);
+ std::string mbWkt(szWkt);
+ GEOSFree_r(hCtx, szWkt);
- std::unique_ptr<Geometry> g1(r.Read(wktGeom1));
- std::unique_ptr<Geometry> g2(r.Read(wktGeom2));
+ bool isValid = true;
+ if (emptyIsNull)
+ {
+ isValid = mbWkt.find("EMPTY", 0) == std::string::npos;
+ }
- equals = g1->equals(g2.get());
+ if (isValid)
+ {
+ STRING wkt;
+ MgUtil::MultiByteToWideChar(mbWkt, wkt);
- MG_GEOMETRY_CATCH_AND_THROW(L"MgGeosUtil.Equals")
+ MgWktReaderWriter wktRw;
+ geom = wktRw.Read(wkt);
+ }
+ }
+ }
- return equals;
+ MG_GEOMETRY_CATCH(L"MgGeosBinaryOperator")
+
+ GEOSGeom_destroy_r(hCtx, hGeom1);
+ GEOSGeom_destroy_r(hCtx, hGeom2);
+ GEOSGeom_destroy_r(hCtx, hResult);
+ if (NULL != hCtx)
+ {
+ finishGEOS_r(hCtx);
+ }
+
+ MG_GEOMETRY_THROW()
+
+ return SAFE_ADDREF((MgGeometry*)geom);
}
-bool MgGeosUtil::Overlaps(MgGeometry* geom1, MgGeometry* geom2)
+static MgGeometry* MgGeosUnaryOperator(MgGeometry* geom, geos_unary_geometry_operator op, bool emptyIsNull)
{
- bool overlaps = false;
+ Ptr<MgGeometry> result;
+ GEOSGeometry* hGeom = NULL;
+ GEOSGeometry* hResult = NULL;
+ GEOSContextHandle_t hCtx = NULL;
+
MG_GEOMETRY_TRY()
- GeosWktReader r;
+ hCtx = initGEOS_r(MgGeosWarningHandler, MgGeosErrorHandler);
- Ptr<MgGeometry> tGeom1 = MgSpatialUtility::TesselateCurve(geom1);
- Ptr<MgGeometry> tGeom2 = MgSpatialUtility::TesselateCurve(geom2);
+ hGeom = GeometryToGeos(hCtx, geom);
- STRING wktGeom1 = tGeom1->ToAwkt(true);
- STRING wktGeom2 = tGeom2->ToAwkt(true);
+ if (NULL != hGeom)
+ {
+ hResult = op(hCtx, hGeom);
+ if (NULL != hResult)
+ {
+ char* szWkt = GEOSGeomToWKT_r(hCtx, hResult);
+ std::string mbWkt(szWkt);
+ GEOSFree_r(hCtx, szWkt);
+
+ bool isValid = true;
+ if (emptyIsNull)
+ {
+ isValid = mbWkt.find("EMPTY", 0) == std::string::npos;
+ }
- std::unique_ptr<Geometry> g1(r.Read(wktGeom1));
- std::unique_ptr<Geometry> g2(r.Read(wktGeom2));
+ if (isValid)
+ {
+ STRING wkt;
+ MgUtil::MultiByteToWideChar(mbWkt, wkt);
- overlaps = g1->overlaps(g2.get());
- MG_GEOMETRY_CATCH_AND_THROW(L"MgGeosUtil.Overlaps")
+ MgWktReaderWriter wktRw;
+ result = wktRw.Read(wkt);
+ }
+ }
+ }
- return overlaps;
+ MG_GEOMETRY_CATCH(L"MgGeosUnaryOperator")
+
+ GEOSGeom_destroy_r(hCtx, hGeom);
+ GEOSGeom_destroy_r(hCtx, hResult);
+ if (NULL != hCtx)
+ {
+ finishGEOS_r(hCtx);
+ }
+
+ MG_GEOMETRY_THROW()
+
+ return SAFE_ADDREF((MgGeometry*)result);
}
-bool MgGeosUtil::Touches(MgGeometry* geom1, MgGeometry* geom2)
+bool MgGeosUtil::Contains(MgGeometry* geom1, MgGeometry* geom2)
{
- bool touches = false;
+ bool bResult = false;
MG_GEOMETRY_TRY()
- GeosWktReader r;
+ bResult = MgGeosBinaryCondition(geom1, geom2, GEOSContains_r);
- Ptr<MgGeometry> tGeom1 = MgSpatialUtility::TesselateCurve(geom1);
- Ptr<MgGeometry> tGeom2 = MgSpatialUtility::TesselateCurve(geom2);
+ MG_GEOMETRY_CATCH_AND_THROW(L"MgGeosUtil.Contains")
- STRING wktGeom1 = tGeom1->ToAwkt(true);
- STRING wktGeom2 = tGeom2->ToAwkt(true);
+ return bResult;
+}
- std::unique_ptr<Geometry> g1(r.Read(wktGeom1));
- std::unique_ptr<Geometry> g2(r.Read(wktGeom2));
+bool MgGeosUtil::Intersects(MgGeometry* geom1, MgGeometry* geom2)
+{
+ bool bResult = false;
- touches = g1->touches(g2.get());
+ MG_GEOMETRY_TRY()
- MG_GEOMETRY_CATCH_AND_THROW(L"MgGeosUtil.Touches")
+ bResult = MgGeosBinaryCondition(geom1, geom2, GEOSIntersects_r);
- return touches;
+ MG_GEOMETRY_CATCH_AND_THROW(L"MgGeosUtil.Intersects")
+
+ return bResult;
}
-bool MgGeosUtil::Within(MgGeometry* geom1, MgGeometry* geom2)
+bool MgGeosUtil::Crosses(MgGeometry* geom1, MgGeometry* geom2)
{
- bool within = false;
+ bool bResult = false;
MG_GEOMETRY_TRY()
- GeosWktReader r;
+ bResult = MgGeosBinaryCondition(geom1, geom2, GEOSCrosses_r);
- Ptr<MgGeometry> tGeom1 = MgSpatialUtility::TesselateCurve(geom1);
- Ptr<MgGeometry> tGeom2 = MgSpatialUtility::TesselateCurve(geom2);
+ MG_GEOMETRY_CATCH_AND_THROW(L"MgGeosUtil.Crosses")
- STRING wktGeom1 = tGeom1->ToAwkt(true);
- STRING wktGeom2 = tGeom2->ToAwkt(true);
+ return bResult;
+}
- std::unique_ptr<Geometry> g1(r.Read(wktGeom1));
- std::unique_ptr<Geometry> g2(r.Read(wktGeom2));
+bool MgGeosUtil::Disjoint(MgGeometry* geom1, MgGeometry* geom2)
+{
+ bool bResult = false;
- within = g1->within(g2.get());
+ MG_GEOMETRY_TRY()
- MG_GEOMETRY_CATCH_AND_THROW(L"MgGeosUtil.Within")
+ bResult = MgGeosBinaryCondition(geom1, geom2, GEOSDisjoint_r);
- return within;
+ MG_GEOMETRY_CATCH_AND_THROW(L"MgGeosUtil.Intersects")
+
+ return bResult;
}
-MgGeometry* MgGeosUtil::Boundary(MgGeometry* geom1)
+bool MgGeosUtil::Equals(MgGeometry* geom1, MgGeometry* geom2)
{
- Ptr<MgGeometry> bndGeom;
+ bool bResult = false;
MG_GEOMETRY_TRY()
- GeosWktReader r;
+ bResult = MgGeosBinaryCondition(geom1, geom2, GEOSIntersects_r);
- Ptr<MgGeometry> tGeom1 = MgSpatialUtility::TesselateCurve(geom1);
- STRING wktGeom1 = tGeom1->ToAwkt(true);
+ MG_GEOMETRY_CATCH_AND_THROW(L"MgGeosUtil.Equals")
- std::unique_ptr<Geometry> g1(r.Read(wktGeom1));
- std::unique_ptr<Geometry> g3(g1->getBoundary());
+ return bResult;
+}
- WKTWriter writer;
- string bndWkt = writer.write(g3.get());
+bool MgGeosUtil::Overlaps(MgGeometry* geom1, MgGeometry* geom2)
+{
+ bool bResult = false;
- if (bndWkt.find("EMPTY", 0) == string::npos)
- {
- MgWktReaderWriter rdrWrt;
- bndGeom = rdrWrt.Read(MgUtil::MultiByteToWideChar(bndWkt));
- }
+ MG_GEOMETRY_TRY()
- MG_GEOMETRY_CATCH_AND_THROW(L"MgGeosUtil.Boundary")
+ bResult = MgGeosBinaryCondition(geom1, geom2, GEOSIntersects_r);
- return SAFE_ADDREF((MgGeometry*)bndGeom);
+ MG_GEOMETRY_CATCH_AND_THROW(L"MgGeosUtil.Overlaps")
+
+ return bResult;
}
-MgGeometry* MgGeosUtil::ConvexHull(MgGeometry* geom1)
+bool MgGeosUtil::Touches(MgGeometry* geom1, MgGeometry* geom2)
{
- Ptr<MgGeometry> convexHull;
+ bool bResult = false;
MG_GEOMETRY_TRY()
- GeosWktReader r;
+ bResult = MgGeosBinaryCondition(geom1, geom2, GEOSTouches_r);
- Ptr<MgGeometry> tGeom1 = MgSpatialUtility::TesselateCurve(geom1);
- STRING wktGeom1 = tGeom1->ToAwkt(true);
+ MG_GEOMETRY_CATCH_AND_THROW(L"MgGeosUtil.Touches")
- std::unique_ptr<Geometry> g1(r.Read(wktGeom1));
- std::unique_ptr<Geometry> g3(g1->convexHull());
+ return bResult;
+}
- WKTWriter writer;
- string convexHullWkt = writer.write(g3.get());
+bool MgGeosUtil::Within(MgGeometry* geom1, MgGeometry* geom2)
+{
+ bool bResult = false;
- if (convexHullWkt.find("EMPTY", 0) == string::npos)
- {
- MgWktReaderWriter rdrWrt;
- convexHull = rdrWrt.Read(MgUtil::MultiByteToWideChar(convexHullWkt));
- }
+ MG_GEOMETRY_TRY()
- MG_GEOMETRY_CATCH_AND_THROW(L"MgGeosUtil.ConvexHull")
+ bResult = MgGeosBinaryCondition(geom1, geom2, GEOSWithin_r);
- return SAFE_ADDREF((MgGeometry*)convexHull);
+ MG_GEOMETRY_CATCH_AND_THROW(L"MgGeosUtil.Within")
+
+ return bResult;
}
-MgGeometry* MgGeosUtil::Difference(MgGeometry* geom1, MgGeometry* geom2)
+MgGeometry* MgGeosUtil::Boundary(MgGeometry* geom1)
{
- Ptr<MgGeometry> difference;
+ Ptr<MgGeometry> result;
MG_GEOMETRY_TRY()
- GeosWktReader r;
+ result = MgGeosUnaryOperator(geom1, GEOSBoundary_r, true);
- Ptr<MgGeometry> tGeom1 = MgSpatialUtility::TesselateCurve(geom1);
- Ptr<MgGeometry> tGeom2 = MgSpatialUtility::TesselateCurve(geom2);
+ MG_GEOMETRY_CATCH_AND_THROW(L"MgGeosUtil.Boundary")
- STRING wktGeom1 = tGeom1->ToAwkt(true);
- STRING wktGeom2 = tGeom2->ToAwkt(true);
+ return SAFE_ADDREF((MgGeometry*)result);
+}
- std::unique_ptr<Geometry> g1(r.Read(wktGeom1));
- std::unique_ptr<Geometry> g2(r.Read(wktGeom2));
- std::unique_ptr<Geometry> g3(g1->difference(g2.get()));
+MgGeometry* MgGeosUtil::ConvexHull(MgGeometry* geom1)
+{
+ Ptr<MgGeometry> result;
- WKTWriter writer;
- string differenceWkt = writer.write(g3.get());
+ MG_GEOMETRY_TRY()
- if (differenceWkt.find("EMPTY", 0) == string::npos)
- {
- MgWktReaderWriter rdrWrt;
- difference = rdrWrt.Read(MgUtil::MultiByteToWideChar(differenceWkt));
- }
+ result = MgGeosUnaryOperator(geom1, GEOSConvexHull_r, true);
- MG_GEOMETRY_CATCH_AND_THROW(L"MgGeosUtil.Difference")
+ MG_GEOMETRY_CATCH_AND_THROW(L"MgGeosUtil.ConvexHull")
- return SAFE_ADDREF((MgGeometry*)difference);
+ return SAFE_ADDREF((MgGeometry*)result);
}
-
-double MgGeosUtil::Distance(MgGeometry* geom1, MgGeometry* geom2)
+MgGeometry* MgGeosUtil::Difference(MgGeometry* geom1, MgGeometry* geom2)
{
- double distance = 0.0;
+ Ptr<MgGeometry> result;
MG_GEOMETRY_TRY()
- GeosWktReader r;
+ result = MgGeosBinaryOperator(geom1, geom2, GEOSDifference_r, true);
- Ptr<MgGeometry> tGeom1 = MgSpatialUtility::TesselateCurve(geom1);
- Ptr<MgGeometry> tGeom2 = MgSpatialUtility::TesselateCurve(geom2);
+ MG_GEOMETRY_CATCH_AND_THROW(L"MgGeosUtil.Difference")
- STRING wktGeom1 = tGeom1->ToAwkt(true);
- STRING wktGeom2 = tGeom2->ToAwkt(true);
+ return SAFE_ADDREF((MgGeometry*)result);
+}
- std::unique_ptr<Geometry> g1(r.Read(wktGeom1));
- std::unique_ptr<Geometry> g2(r.Read(wktGeom2));
- distance = g1->distance(g2.get());
+double MgGeosUtil::Distance(MgGeometry* geom1, MgGeometry* geom2)
+{
+ double dResult = false;
- MG_GEOMETRY_CATCH_AND_THROW(L"MgGeosUtil.Distance")
+ GEOSGeometry* hGeom1 = NULL;
+ GEOSGeometry* hGeom2 = NULL;
+ GEOSContextHandle_t hCtx = NULL;
- return distance;
-}
-
-MgGeometry* MgGeosUtil::Intersection(MgGeometry* geom1, MgGeometry* geom2)
-{
- Ptr<MgGeometry> intersection;
-
MG_GEOMETRY_TRY()
- GeosWktReader r;
+ hCtx = initGEOS_r(MgGeosWarningHandler, MgGeosErrorHandler);
- Ptr<MgGeometry> tGeom1 = MgSpatialUtility::TesselateCurve(geom1);
- Ptr<MgGeometry> tGeom2 = MgSpatialUtility::TesselateCurve(geom2);
+ hGeom1 = GeometryToGeos(hCtx, geom1);
+ hGeom2 = GeometryToGeos(hCtx, geom2);
- STRING wktGeom1 = tGeom1->ToAwkt(true);
- STRING wktGeom2 = tGeom2->ToAwkt(true);
+ if (NULL != hGeom1 && NULL != hGeom2)
+ {
+ GEOSDistance_r(hCtx, hGeom1, hGeom2, &dResult);
+ }
- std::unique_ptr<Geometry> g1(r.Read(wktGeom1));
- std::unique_ptr<Geometry> g2(r.Read(wktGeom2));
- std::unique_ptr<Geometry> g3(g1->intersection(g2.get()));
+ MG_GEOMETRY_CATCH(L"MgGeosUtil.Distance")
- WKTWriter writer;
- string intersectionWkt = writer.write(g3.get());
-
- if (intersectionWkt.find("EMPTY", 0) == string::npos)
+ GEOSGeom_destroy_r(hCtx, hGeom1);
+ GEOSGeom_destroy_r(hCtx, hGeom2);
+ if (NULL != hCtx)
{
- MgWktReaderWriter rdrWrt;
- intersection = rdrWrt.Read(MgUtil::MultiByteToWideChar(intersectionWkt));
+ finishGEOS_r(hCtx);
}
- MG_GEOMETRY_CATCH_AND_THROW(L"MgGeosUtil.Intersection")
+ MG_GEOMETRY_THROW()
- return SAFE_ADDREF((MgGeometry*)intersection);
+ return dResult;
}
-MgGeometry* MgGeosUtil::SymetricDifference(MgGeometry* geom1, MgGeometry* geom2)
+MgGeometry* MgGeosUtil::Intersection(MgGeometry* geom1, MgGeometry* geom2)
{
- Ptr<MgGeometry> symetricDifference;
+ Ptr<MgGeometry> result;
MG_GEOMETRY_TRY()
- GeosWktReader r;
+ result = MgGeosBinaryOperator(geom1, geom2, GEOSIntersection_r, true);
- Ptr<MgGeometry> tGeom1 = MgSpatialUtility::TesselateCurve(geom1);
- Ptr<MgGeometry> tGeom2 = MgSpatialUtility::TesselateCurve(geom2);
+ MG_GEOMETRY_CATCH_AND_THROW(L"MgGeosUtil.Intersection")
- STRING wktGeom1 = tGeom1->ToAwkt(true);
- STRING wktGeom2 = tGeom2->ToAwkt(true);
+ return SAFE_ADDREF((MgGeometry*)result);
+}
- std::unique_ptr<Geometry> g1(r.Read(wktGeom1));
- std::unique_ptr<Geometry> g2(r.Read(wktGeom2));
- std::unique_ptr<Geometry> g3(g1->symDifference(g2.get()));
+MgGeometry* MgGeosUtil::SymetricDifference(MgGeometry* geom1, MgGeometry* geom2)
+{
+ Ptr<MgGeometry> result;
- WKTWriter writer;
- string symetricDifferenceWkt = writer.write(g3.get());
+ MG_GEOMETRY_TRY()
- if (symetricDifferenceWkt.find("EMPTY", 0) == string::npos)
- {
- MgWktReaderWriter rdrWrt;
- symetricDifference = rdrWrt.Read(MgUtil::MultiByteToWideChar(symetricDifferenceWkt));
- }
+ result = MgGeosBinaryOperator(geom1, geom2, GEOSSymDifference_r, true);
MG_GEOMETRY_CATCH_AND_THROW(L"MgGeosUtil.SymetricDifference")
- return SAFE_ADDREF((MgGeometry*)symetricDifference);
+ return SAFE_ADDREF((MgGeometry*)result);
}
MgGeometry* MgGeosUtil::Union(MgGeometry* geom1, MgGeometry* geom2)
{
- Ptr<MgGeometry> unionGeom;
+ Ptr<MgGeometry> result;
MG_GEOMETRY_TRY()
- GeosWktReader r;
+ result = MgGeosBinaryOperator(geom1, geom2, GEOSUnion_r, true);
- Ptr<MgGeometry> tGeom1 = MgSpatialUtility::TesselateCurve(geom1);
- Ptr<MgGeometry> tGeom2 = MgSpatialUtility::TesselateCurve(geom2);
-
- STRING wktGeom1 = tGeom1->ToAwkt(true);
- STRING wktGeom2 = tGeom2->ToAwkt(true);
-
- std::unique_ptr<Geometry> g1(r.Read(wktGeom1));
- std::unique_ptr<Geometry> g2(r.Read(wktGeom2));
- std::unique_ptr<Geometry> g3(g1->Union(g2.get()));
-
- WKTWriter writer;
- string unionGeomWkt = writer.write(g3.get());
-
- if (unionGeomWkt.find("EMPTY", 0) == string::npos)
- {
- MgWktReaderWriter rdrWrt;
- unionGeom = rdrWrt.Read(MgUtil::MultiByteToWideChar(unionGeomWkt));
- }
-
MG_GEOMETRY_CATCH_AND_THROW(L"MgGeosUtil.Union")
- return SAFE_ADDREF((MgGeometry*)unionGeom);
+ return SAFE_ADDREF((MgGeometry*)result);
}
bool MgGeosUtil::IsValid(MgGeometricEntity* geom1)
{
- bool isValid = false;
+ bool bResult = false;
MG_GEOMETRY_TRY()
- GeosWktReader r;
+ bResult = MgGeosBoolProperty(geom1, GEOSisValid_r);
- STRING wktGeom1 = ToAwkt(geom1);
-
- std::unique_ptr<Geometry> g1(r.Read(wktGeom1));
- isValid = g1->isValid();
-
MG_GEOMETRY_CATCH_AND_THROW(L"MgGeosUtil.IsValid")
- return isValid;
+ return bResult;
}
bool MgGeosUtil::IsSimple(MgGeometricEntity* geom1)
{
- bool isSimple = false;
+ bool bResult = false;
MG_GEOMETRY_TRY()
- GeosWktReader r;
+ bResult = MgGeosBoolProperty(geom1, GEOSisSimple_r);
- STRING wktGeom1 = ToAwkt(geom1);
-
- std::unique_ptr<Geometry> g1(r.Read(wktGeom1));
- isSimple = g1->isSimple();
-
MG_GEOMETRY_CATCH_AND_THROW(L"MgGeosUtil.IsSimple")
- return isSimple;
+ return bResult;
}
bool MgGeosUtil::IsEmpty(MgGeometricEntity* geom1)
{
- bool isEmpty = false;
+ bool bResult = false;
MG_GEOMETRY_TRY()
- GeosWktReader r;
+ bResult = MgGeosBoolProperty(geom1, GEOSisEmpty_r);
- STRING wktGeom1 = ToAwkt(geom1);
-
- std::unique_ptr<Geometry> g1(r.Read(wktGeom1));
- isEmpty = g1->isEmpty();
-
MG_GEOMETRY_CATCH_AND_THROW(L"MgGeosUtil.IsEmpty")
- return isEmpty;
+ return bResult;
}
bool MgGeosUtil::IsClosed(MgGeometricEntity* geom1)
{
- bool isClosed = false;
+ bool bResult = false;
MG_GEOMETRY_TRY()
- GeosWktReader r;
+ bResult = MgGeosBoolProperty(geom1, GEOSisClosed_r);
- STRING wktGeom1 = ToAwkt(geom1);
-
- std::unique_ptr<Geometry> g1(r.Read(wktGeom1));
- //isClosed = g1->isClosed();
-
MG_GEOMETRY_CATCH_AND_THROW(L"MgGeosUtil.IsClosed")
- return isClosed;
+ return bResult;
}
double MgGeosUtil::Area(MgGeometricEntity* geom1)
{
- double area = 0.0;
+ bool dResult = 0.0;
MG_GEOMETRY_TRY()
- GeosWktReader r;
+ dResult = MgGeosDoubleProperty(geom1, GEOSArea_r);
- STRING wktGeom1 = ToAwkt(geom1);
-
- std::unique_ptr<Geometry> g1(r.Read(wktGeom1));
- area = g1->getArea();
-
MG_GEOMETRY_CATCH_AND_THROW(L"MgGeosUtil.Area")
- return area;
+ return dResult;
}
double MgGeosUtil::Length(MgGeometricEntity* geom1)
{
- double length = 0.0;
+ bool dResult = 0.0;
MG_GEOMETRY_TRY()
- GeosWktReader r;
+ dResult = MgGeosDoubleProperty(geom1, GEOSLength_r);
- STRING wktGeom1 = ToAwkt(geom1);
-
- std::unique_ptr<Geometry> g1(r.Read(wktGeom1));
- length = g1->getLength();
-
MG_GEOMETRY_CATCH_AND_THROW(L"MgGeosUtil.Length")
- return length;
+ return dResult;
}
MgPoint* MgGeosUtil::Centroid(MgGeometricEntity* geom1)
{
- Ptr<MgPoint> point;
+ Ptr<MgPoint> geom;
+ GEOSGeometry* hGeom = NULL;
+ GEOSGeometry* hResult = NULL;
+ GEOSContextHandle_t hCtx = NULL;
+
MG_GEOMETRY_TRY()
- GeosWktReader r;
+ hCtx = initGEOS_r(MgGeosWarningHandler, MgGeosErrorHandler);
- STRING wktGeom1 = ToAwkt(geom1);
+ hGeom = GeometricEntityToGeos(hCtx, geom);
- std::unique_ptr<Geometry> g1(r.Read(wktGeom1));
- std::unique_ptr<Point> g2(g1->getCentroid());
+ if (NULL != hGeom)
+ {
+ hResult = GEOSGetCentroid_r(hCtx, hGeom);
+ if (NULL != hResult)
+ {
+ double x = std::numeric_limits<double>::quiet_NaN();
+ double y = std::numeric_limits<double>::quiet_NaN();
+ GEOSGeomGetX_r(hCtx, hResult, &x);
+ GEOSGeomGetY_r(hCtx, hResult, &y);
- double x = g2->getX();
- double y = g2->getY();
+ MgGeometryFactory geomFactory;
+ Ptr<MgCoordinate> coord = geomFactory.CreateCoordinateXY(x, y);
+ geom = geomFactory.CreatePoint(coord);
+ }
+ }
- MgGeometryFactory geomFactory;
- Ptr<MgCoordinate> coord = geomFactory.CreateCoordinateXY(x,y);
- point = geomFactory.CreatePoint(coord);
+ MG_GEOMETRY_CATCH(L"MgGeosUnaryOperator")
- MG_GEOMETRY_CATCH_AND_THROW(L"MgGeosUtil.Centroid")
+ GEOSGeom_destroy_r(hCtx, hGeom);
+ GEOSGeom_destroy_r(hCtx, hResult);
+ if (NULL != hCtx)
+ {
+ finishGEOS_r(hCtx);
+ }
- return SAFE_ADDREF((MgPoint*)point);
+ MG_GEOMETRY_THROW()
+
+ return SAFE_ADDREF((MgPoint*)geom);
}
MgPoint* MgGeosUtil::GetPointInRegion(MgGeometry* geom1)
{
- Ptr<MgPoint> point;
+ Ptr<MgPoint> geom;
MG_GEOMETRY_TRY()
- GeosWktReader r;
+ INT32 dim = geom1->GetDimension();
+ if (MgGeometricDimension::Point == dim)
+ {
+ MgGeomInteriorPointPoint intPt(geom1);
+ geom = intPt.GetInteriorPoint();
+ }
+ else if (MgGeometricDimension::Curve == dim)
+ {
+ MgGeomInteriorPointLine intPt(geom1);
+ geom = intPt.GetInteriorPoint();
+ }
+ else if (MgGeometricDimension::Region == dim)
+ {
+ MgGeomInteriorPointArea intPt(geom1);
+ geom = intPt.GetInteriorPoint();
+ }
- STRING wktGeom1 = ToAwkt(geom1);
+ MG_GEOMETRY_CATCH_AND_THROW(L"MgGeosUtil.GetPointInRegion")
- std::unique_ptr<Geometry> g1(r.Read(wktGeom1));
- std::unique_ptr<Point> g2(g1->getInteriorPoint());
-
- double x = g2->getX();
- double y = g2->getY();
-
- MgGeometryFactory geomFactory;
- Ptr<MgCoordinate> coord = geomFactory.CreateCoordinateXY(x, y);
- point = geomFactory.CreatePoint(coord);
-
- MG_GEOMETRY_CATCH_AND_THROW(L"MgGeosUtil.GetInteriorPoint")
-
- return SAFE_ADDREF((MgPoint*)point);
+ return SAFE_ADDREF((MgPoint*)geom);
}
MgPoint* MgGeosUtil::GetPointInRing(MgGeometryComponent* geom1)
{
- Ptr<MgPoint> point;
+ Ptr<MgPoint> geom;
MG_GEOMETRY_TRY()
- GeosWktReader r;
+ STRING wkt = geom1->ToAwkt(true);
+ MgWktReaderWriter wktRw;
+ Ptr<MgGeometry> geom2 = wktRw.Read(wkt);
- STRING wktGeom1 = ToAwkt(geom1);
+ geom = GetPointInRegion(geom2);
- std::unique_ptr<Geometry> g1(r.Read(wktGeom1));
- std::unique_ptr<Point> g2(g1->getInteriorPoint());
+ MG_GEOMETRY_CATCH_AND_THROW(L"MgGeosUtil.GetPointInRing")
- double x = g2->getX();
- double y = g2->getY();
-
- MgGeometryFactory geomFactory;
- Ptr<MgCoordinate> coord = geomFactory.CreateCoordinateXY(x,y);
- point = geomFactory.CreatePoint(coord);
-
- MG_GEOMETRY_CATCH_AND_THROW(L"MgGeosUtil.GetInteriorPoint")
-
- return SAFE_ADDREF((MgPoint*)point);
+ return SAFE_ADDREF((MgPoint*)geom);
}
STRING MgGeosUtil::ToAwkt(MgGeometricEntity* geom1)
@@ -705,3 +892,60 @@
}
return wktStr;
}
+
+MgGeometry* MgGeosUtil::Simplify(MgGeometry* geom, double tolerance, INT32 algorithm)
+{
+ Ptr<MgGeometry> simplified;
+
+ GEOSGeometry* hGeom = NULL;
+ GEOSGeometry* hResult = NULL;
+ GEOSContextHandle_t hCtx = NULL;
+
+ MG_GEOMETRY_TRY()
+
+ CHECKARGUMENTNULL(geom, L"MgGeosUtil.Simplify");
+ if (algorithm != MgGeometrySimplificationAlgorithmType::DouglasPeucker &&
+ algorithm != MgGeometrySimplificationAlgorithmType::TopologyPreserving)
+ {
+ throw new MgInvalidArgumentException(L"MgGeosUtil.Simplify", __LINE__, __WFILE__, NULL, L"MgInvalidGeometrySimplficationAlgorithm", NULL);
+ }
+
+ hCtx = initGEOS_r(MgGeosWarningHandler, MgGeosErrorHandler);
+ hGeom = GeometryToGeos(hCtx, geom);
+
+ switch (algorithm)
+ {
+ case MgGeometrySimplificationAlgorithmType::DouglasPeucker:
+ hResult = GEOSSimplify_r(hCtx, hGeom, tolerance);
+ break;
+ case MgGeometrySimplificationAlgorithmType::TopologyPreserving:
+ hResult = GEOSTopologyPreserveSimplify_r(hCtx, hGeom, tolerance);
+ break;
+ }
+
+ if (NULL != hResult)
+ {
+ char* szWkt = GEOSGeomToWKT_r(hCtx, hResult);
+ std::string mbSimpWkt(szWkt);
+ GEOSFree_r(hCtx, szWkt);
+
+ if (mbSimpWkt.find("EMPTY", 0) == string::npos)
+ {
+ MgWktReaderWriter rdrWrt;
+ simplified = rdrWrt.Read(MgUtil::MultiByteToWideChar(mbSimpWkt));
+ }
+ }
+
+ MG_GEOMETRY_CATCH(L"MgGeosUtil.Simplify")
+
+ GEOSGeom_destroy_r(hCtx, hGeom);
+ GEOSGeom_destroy_r(hCtx, hResult);
+ if (NULL != hCtx)
+ {
+ finishGEOS_r(hCtx);
+ }
+
+ MG_GEOMETRY_THROW()
+
+ return simplified.Detach();
+}
\ No newline at end of file
Modified: sandbox/jng/geos_c/Common/Geometry/GeosUtil.h
===================================================================
--- sandbox/jng/geos_c/Common/Geometry/GeosUtil.h 2020-08-04 14:22:55 UTC (rev 9704)
+++ sandbox/jng/geos_c/Common/Geometry/GeosUtil.h 2020-08-04 14:32:16 UTC (rev 9705)
@@ -27,6 +27,7 @@
class MgGeosUtil
{
public:
+ static MgGeometry* Simplify(MgGeometry* geom, double tolerance, INT32 algorithm);
static bool Contains(MgGeometry* geom1, MgGeometry* geom2);
static bool Intersects(MgGeometry* geom1, MgGeometry* geom2);
static bool Crosses(MgGeometry* geom1, MgGeometry* geom2);
@@ -51,9 +52,12 @@
static MgPoint* Centroid(MgGeometricEntity* geom1);
static MgPoint* GetPointInRegion(MgGeometry* geom1);
static MgPoint* GetPointInRing(MgGeometryComponent* geom1);
-private:
static STRING ToAwkt(MgGeometricEntity* geom1);
};
+
+static void MgGeosErrorHandler(const char *fmt, ...);
+static void MgGeosWarningHandler(const char *fmt, ...);
+
/// \endcond
#endif
Modified: sandbox/jng/geos_c/Common/Geometry/PreparedGeometry.cpp
===================================================================
--- sandbox/jng/geos_c/Common/Geometry/PreparedGeometry.cpp 2020-08-04 14:22:55 UTC (rev 9704)
+++ sandbox/jng/geos_c/Common/Geometry/PreparedGeometry.cpp 2020-08-04 14:32:16 UTC (rev 9705)
@@ -16,67 +16,97 @@
//
#include "GeometryCommon.h"
-#include "GeosInclude.h"
-#include <geos/geom/prep/PreparedGeometry.h>
-#include <geos/geom/prep/PreparedGeometryFactory.h>
+#include "GeosUtil.h"
-using namespace geos::geom::prep;
-
class MgPreparedGeometry::PreparedGeometryImpl
{
public:
-// GEOS 3.6.0 onwards changes the C++ API around GeometryFactory
-#if (GEOS_VERSION_MAJOR == 3) && (GEOS_VERSION_MINOR >= 6)
PreparedGeometryImpl()
- : m_pg(NULL),
- m_pm(new PrecisionModel()),
- m_geom(nullptr)
+ : m_pg(NULL), m_hCtx(NULL)
{
- m_gf = GeometryFactory::create(m_pm.get(), 10);
+ m_hCtx = initGEOS_r(MgGeosWarningHandler, MgGeosErrorHandler);
}
-#else
- PreparedGeometryImpl()
- : m_pg(NULL),
- m_pm(new PrecisionModel()),
- m_gf(nullptr),
- m_geom(nullptr)
+ ~PreparedGeometryImpl()
{
- m_gf.reset(new GeometryFactory(m_pm.get(), 10));
+ GEOSPreparedGeom_destroy_r(m_hCtx, m_pg);
+ if (NULL != m_hCtx)
+ {
+ finishGEOS_r(m_hCtx);
+ }
}
-#endif
- ~PreparedGeometryImpl()
+ void Prepare(MgGeometry* geom)
{
- PreparedGeometryFactory::destroy(m_pg);
+ GEOSGeometry* g = GeometryToGeos(geom);
+ m_pg = GEOSPrepare(g);
+ GEOSGeom_destroy_r(m_hCtx, g);
}
- Geometry* Convert(MgGeometry* geom)
+ bool Contains(MgGeometry * geom)
{
- WKTReader r(m_gf.get());
- Ptr<MgGeometry> tGeom = MgSpatialUtility::TesselateCurve(geom);
- STRING wktGeom = tGeom->ToAwkt(true);
-
- return r.read(MgUtil::WideCharToMultiByte(wktGeom));
+ bool bResult = false;
+ GEOSGeometry* g = GeometryToGeos(geom);
+ bResult = GEOSPreparedContains(m_pg, g);
+ GEOSGeom_destroy_r(m_hCtx, g);
+ return bResult;
}
- void Prepare(MgGeometry* geom)
+ bool Crosses(MgGeometry * geom)
{
- WKTReader r(m_gf.get());
+ bool bResult = false;
+ GEOSGeometry* g = GeometryToGeos(geom);
+ bResult = GEOSPreparedCrosses(m_pg, g);
+ GEOSGeom_destroy_r(m_hCtx, g);
+ return bResult;
+ }
+ bool Disjoint(MgGeometry * geom)
+ {
+ bool bResult = false;
+ GEOSGeometry* g = GeometryToGeos(geom);
+ bResult = GEOSPreparedDisjoint(m_pg, g);
+ GEOSGeom_destroy_r(m_hCtx, g);
+ return bResult;
+ }
+ bool Intersects(MgGeometry * geom)
+ {
+ bool bResult = false;
+ GEOSGeometry* g = GeometryToGeos(geom);
+ bResult = GEOSPreparedIntersects(m_pg, g);
+ GEOSGeom_destroy_r(m_hCtx, g);
+ return bResult;
+ }
+ bool Overlaps(MgGeometry * geom)
+ {
+ bool bResult = false;
+ GEOSGeometry* g = GeometryToGeos(geom);
+ bResult = GEOSPreparedOverlaps(m_pg, g);
+ GEOSGeom_destroy_r(m_hCtx, g);
+ return bResult;
+ }
+ bool Touches(MgGeometry * geom)
+ {
+ bool bResult = false;
+ GEOSGeometry* g = GeometryToGeos(geom);
+ bResult = GEOSPreparedTouches(m_pg, g);
+ GEOSGeom_destroy_r(m_hCtx, g);
+ return bResult;
+ }
+ bool Within(MgGeometry * geom)
+ {
+ bool bResult = false;
+ GEOSGeometry* g = GeometryToGeos(geom);
+ bResult = GEOSPreparedWithin(m_pg, g);
+ GEOSGeom_destroy_r(m_hCtx, g);
+ return bResult;
+ }
+private:
+ const GEOSPreparedGeometry* m_pg;
+ GEOSContextHandle_t m_hCtx;
+
+ GEOSGeometry* GeometryToGeos(MgGeometry* geom)
+ {
Ptr<MgGeometry> tGeom = MgSpatialUtility::TesselateCurve(geom);
- STRING wktGeom = tGeom->ToAwkt(true);
-
- m_geom.reset(r.read(MgUtil::WideCharToMultiByte(wktGeom)));
- m_pg = PreparedGeometryFactory::prepare(m_geom.get());
+ STRING wktGeom = MgGeosUtil::ToAwkt(geom);
+ std::string wkt = MgUtil::WideCharToMultiByte(wktGeom);
+ return GEOSGeomFromWKT_r(m_hCtx, wkt.c_str());
}
-
- const PreparedGeometry* m_pg;
-
-private:
- std::unique_ptr<Geometry> m_geom;
- std::unique_ptr<PrecisionModel> m_pm;
-// GEOS 3.6.0 onwards changes the C++ API around GeometryFactory
-#if (GEOS_VERSION_MAJOR == 3) && (GEOS_VERSION_MINOR >= 6)
- GeometryFactory::unique_ptr m_gf;
-#else
- std::unique_ptr<GeometryFactory> m_gf;
-#endif
};
MgPreparedGeometry* MgPreparedGeometry::Create(MgGeometry* geom)
@@ -108,44 +138,37 @@
bool MgPreparedGeometry::Contains(MgGeometry * other)
{
- std::unique_ptr<Geometry> gOther(d_ptr->Convert(other));
- return d_ptr->m_pg->contains(gOther.get());
+ return d_ptr->Contains(other);
}
bool MgPreparedGeometry::Crosses(MgGeometry * other)
{
- std::unique_ptr<Geometry> gOther(d_ptr->Convert(other));
- return d_ptr->m_pg->crosses(gOther.get());
+ return d_ptr->Crosses(other);
}
bool MgPreparedGeometry::Disjoint(MgGeometry * other)
{
- std::unique_ptr<Geometry> gOther(d_ptr->Convert(other));
- return d_ptr->m_pg->disjoint(gOther.get());
+ return d_ptr->Disjoint(other);
}
bool MgPreparedGeometry::Intersects(MgGeometry * other)
{
- std::unique_ptr<Geometry> gOther(d_ptr->Convert(other));
- return d_ptr->m_pg->intersects(gOther.get());
+ return d_ptr->Intersects(other);
}
bool MgPreparedGeometry::Overlaps(MgGeometry * other)
{
- std::unique_ptr<Geometry> gOther(d_ptr->Convert(other));
- return d_ptr->m_pg->overlaps(gOther.get());
+ return d_ptr->Overlaps(other);
}
bool MgPreparedGeometry::Touches(MgGeometry * other)
{
- std::unique_ptr<Geometry> gOther(d_ptr->Convert(other));
- return d_ptr->m_pg->touches(gOther.get());
+ return d_ptr->Touches(other);
}
bool MgPreparedGeometry::Within(MgGeometry * other)
{
- std::unique_ptr<Geometry> gOther(d_ptr->Convert(other));
- return d_ptr->m_pg->within(gOther.get());
+ return d_ptr->Within(other);
}
INT32 MgPreparedGeometry::GetClassId()
Modified: sandbox/jng/geos_c/Oem/geos/VisualStudio/GEOS.sln
===================================================================
--- sandbox/jng/geos_c/Oem/geos/VisualStudio/GEOS.sln 2020-08-04 14:22:55 UTC (rev 9704)
+++ sandbox/jng/geos_c/Oem/geos/VisualStudio/GEOS.sln 2020-08-04 14:32:16 UTC (rev 9705)
@@ -1,37 +1,40 @@
Microsoft Visual Studio Solution File, Format Version 12.00
-# Visual Studio Express 2012 for Windows Desktop
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "GEOS", "GEOS.vcxproj", "{0B9205CD-90A4-42B6-B61E-BF6DB5BC3F63}"
+# Visual Studio 15
+VisualStudioVersion = 15.0.28307.329
+MinimumVisualStudioVersion = 10.0.40219.1
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "GEOS", "GEOS.vcxproj", "{1B9196BF-C194-47BC-846A-D9BBB134F2B3}"
EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "geos_c", "geos_c.vcxproj", "{C6C92B81-FF14-37DA-9509-2B33818500D4}"
+EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Win32 = Debug|Win32
Debug|x64 = Debug|x64
- MinSizeRel|Win32 = MinSizeRel|Win32
- MinSizeRel|x64 = MinSizeRel|x64
Release|Win32 = Release|Win32
Release|x64 = Release|x64
- RelWithDebInfo|Win32 = RelWithDebInfo|Win32
- RelWithDebInfo|x64 = RelWithDebInfo|x64
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
- {0B9205CD-90A4-42B6-B61E-BF6DB5BC3F63}.Debug|Win32.ActiveCfg = Debug|Win32
- {0B9205CD-90A4-42B6-B61E-BF6DB5BC3F63}.Debug|Win32.Build.0 = Debug|Win32
- {0B9205CD-90A4-42B6-B61E-BF6DB5BC3F63}.Debug|x64.ActiveCfg = Debug|x64
- {0B9205CD-90A4-42B6-B61E-BF6DB5BC3F63}.Debug|x64.Build.0 = Debug|x64
- {0B9205CD-90A4-42B6-B61E-BF6DB5BC3F63}.MinSizeRel|Win32.ActiveCfg = MinSizeRel|Win32
- {0B9205CD-90A4-42B6-B61E-BF6DB5BC3F63}.MinSizeRel|Win32.Build.0 = MinSizeRel|Win32
- {0B9205CD-90A4-42B6-B61E-BF6DB5BC3F63}.MinSizeRel|x64.ActiveCfg = MinSizeRel|x64
- {0B9205CD-90A4-42B6-B61E-BF6DB5BC3F63}.MinSizeRel|x64.Build.0 = MinSizeRel|x64
- {0B9205CD-90A4-42B6-B61E-BF6DB5BC3F63}.Release|Win32.ActiveCfg = Release|Win32
- {0B9205CD-90A4-42B6-B61E-BF6DB5BC3F63}.Release|Win32.Build.0 = Release|Win32
- {0B9205CD-90A4-42B6-B61E-BF6DB5BC3F63}.Release|x64.ActiveCfg = Release|x64
- {0B9205CD-90A4-42B6-B61E-BF6DB5BC3F63}.Release|x64.Build.0 = Release|x64
- {0B9205CD-90A4-42B6-B61E-BF6DB5BC3F63}.RelWithDebInfo|Win32.ActiveCfg = RelWithDebInfo|Win32
- {0B9205CD-90A4-42B6-B61E-BF6DB5BC3F63}.RelWithDebInfo|Win32.Build.0 = RelWithDebInfo|Win32
- {0B9205CD-90A4-42B6-B61E-BF6DB5BC3F63}.RelWithDebInfo|x64.ActiveCfg = RelWithDebInfo|x64
- {0B9205CD-90A4-42B6-B61E-BF6DB5BC3F63}.RelWithDebInfo|x64.Build.0 = RelWithDebInfo|x64
+ {1B9196BF-C194-47BC-846A-D9BBB134F2B3}.Debug|Win32.ActiveCfg = Debug|Win32
+ {1B9196BF-C194-47BC-846A-D9BBB134F2B3}.Debug|Win32.Build.0 = Debug|Win32
+ {1B9196BF-C194-47BC-846A-D9BBB134F2B3}.Debug|x64.ActiveCfg = Debug|x64
+ {1B9196BF-C194-47BC-846A-D9BBB134F2B3}.Debug|x64.Build.0 = Debug|x64
+ {1B9196BF-C194-47BC-846A-D9BBB134F2B3}.Release|Win32.ActiveCfg = Release|Win32
+ {1B9196BF-C194-47BC-846A-D9BBB134F2B3}.Release|Win32.Build.0 = Release|Win32
+ {1B9196BF-C194-47BC-846A-D9BBB134F2B3}.Release|x64.ActiveCfg = Release|x64
+ {1B9196BF-C194-47BC-846A-D9BBB134F2B3}.Release|x64.Build.0 = Release|x64
+ {C6C92B81-FF14-37DA-9509-2B33818500D4}.Debug|Win32.ActiveCfg = Debug|Win32
+ {C6C92B81-FF14-37DA-9509-2B33818500D4}.Debug|Win32.Build.0 = Debug|Win32
+ {C6C92B81-FF14-37DA-9509-2B33818500D4}.Debug|x64.ActiveCfg = Debug|x64
+ {C6C92B81-FF14-37DA-9509-2B33818500D4}.Debug|x64.Build.0 = Debug|x64
+ {C6C92B81-FF14-37DA-9509-2B33818500D4}.Release|Win32.ActiveCfg = Release|Win32
+ {C6C92B81-FF14-37DA-9509-2B33818500D4}.Release|Win32.Build.0 = Release|Win32
+ {C6C92B81-FF14-37DA-9509-2B33818500D4}.Release|x64.ActiveCfg = Release|x64
+ {C6C92B81-FF14-37DA-9509-2B33818500D4}.Release|x64.Build.0 = Release|x64
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
+ GlobalSection(ExtensibilityGlobals) = postSolution
+ SolutionGuid = {7AC8B52C-6A92-4418-9CAB-D1DEC3BCCFC6}
+ EndGlobalSection
EndGlobal
Modified: sandbox/jng/geos_c/Oem/geos/VisualStudio/GEOS.vcxproj
===================================================================
--- sandbox/jng/geos_c/Oem/geos/VisualStudio/GEOS.vcxproj 2020-08-04 14:22:55 UTC (rev 9704)
+++ sandbox/jng/geos_c/Oem/geos/VisualStudio/GEOS.vcxproj 2020-08-04 14:32:16 UTC (rev 9705)
@@ -9,30 +9,14 @@
<Configuration>Debug</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
- <ProjectConfiguration Include="MinSizeRel|x64">
- <Configuration>MinSizeRel</Configuration>
- <Platform>x64</Platform>
- </ProjectConfiguration>
<ProjectConfiguration Include="Release|Win32">
<Configuration>Release</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
- <ProjectConfiguration Include="MinSizeRel|Win32">
- <Configuration>MinSizeRel</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
<ProjectConfiguration Include="Release|x64">
<Configuration>Release</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
- <ProjectConfiguration Include="RelWithDebInfo|Win32">
- <Configuration>RelWithDebInfo</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="RelWithDebInfo|x64">
- <Configuration>RelWithDebInfo</Configuration>
- <Platform>x64</Platform>
- </ProjectConfiguration>
</ItemGroup>
<PropertyGroup Label="Globals">
<ProjectGUID>{1B9196BF-C194-47BC-846A-D9BBB134F2B3}</ProjectGUID>
@@ -65,30 +49,6 @@
<CharacterSet>MultiByte</CharacterSet>
<PlatformToolset>v140</PlatformToolset>
</PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='MinSizeRel|Win32'" Label="Configuration">
- <ConfigurationType>DynamicLibrary</ConfigurationType>
- <UseOfMfc>false</UseOfMfc>
- <CharacterSet>MultiByte</CharacterSet>
- <PlatformToolset>v140</PlatformToolset>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='MinSizeRel|x64'" Label="Configuration">
- <ConfigurationType>DynamicLibrary</ConfigurationType>
- <UseOfMfc>false</UseOfMfc>
- <CharacterSet>MultiByte</CharacterSet>
- <PlatformToolset>v140</PlatformToolset>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='RelWithDebInfo|Win32'" Label="Configuration">
- <ConfigurationType>DynamicLibrary</ConfigurationType>
- <UseOfMfc>false</UseOfMfc>
- <CharacterSet>MultiByte</CharacterSet>
- <PlatformToolset>v140</PlatformToolset>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='RelWithDebInfo|x64'" Label="Configuration">
- <ConfigurationType>DynamicLibrary</ConfigurationType>
- <UseOfMfc>false</UseOfMfc>
- <CharacterSet>MultiByte</CharacterSet>
- <PlatformToolset>v140</PlatformToolset>
- </PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
</ImportGroup>
@@ -139,18 +99,10 @@
<GenerateManifest Condition="'$(Configuration)|$(Platform)'=='RelWithDebInfo|Win32'">true</GenerateManifest>
<GenerateManifest Condition="'$(Configuration)|$(Platform)'=='RelWithDebInfo|x64'">true</GenerateManifest>
</PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='RelWithDebInfo|x64'">
- <OutDir>.\$(Configuration)64\</OutDir>
- <IntDir>.\$(Configuration)64\</IntDir>
- </PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<OutDir>.\$(Configuration)64\</OutDir>
<IntDir>.\$(Configuration)64\</IntDir>
</PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='MinSizeRel|x64'">
- <OutDir>.\$(Configuration)64\</OutDir>
- <IntDir>.\$(Configuration)64\</IntDir>
- </PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<OutDir>.\$(Configuration)64\</OutDir>
<IntDir>.\$(Configuration)64\</IntDir>
@@ -341,184 +293,6 @@
<LinkLibraryDependencies>false</LinkLibraryDependencies>
</ProjectReference>
</ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='MinSizeRel|Win32'">
- <ClCompile>
- <AdditionalIncludeDirectories>..\include;..\capi;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <AssemblerListingLocation>MinSizeRel/</AssemblerListingLocation>
- <CompileAs>CompileAsCpp</CompileAs>
- <ExceptionHandling>Sync</ExceptionHandling>
- <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
- <MultiProcessorCompilation>true</MultiProcessorCompilation>
- <Optimization>MinSpace</Optimization>
- <PrecompiledHeader>NotUsing</PrecompiledHeader>
- <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
- <RuntimeTypeInfo>true</RuntimeTypeInfo>
- <WarningLevel>Level4</WarningLevel>
- <DebugInformationFormat>
- </DebugInformationFormat>
- <PreprocessorDefinitions>WIN32;_WINDOWS;NDEBUG;_SCL_SECURE_NO_WARNINGS;_CRT_SECURE_NO_WARNINGS;NOMINMAX;GEOS_INLINE;CMAKE_INTDIR="MinSizeRel";GEOS_DLL_EXPORT;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <ObjectFileName>$(IntDir)</ObjectFileName>
- </ClCompile>
- <ResourceCompile>
- <PreprocessorDefinitions>WIN32;_WINDOWS;NDEBUG;_SCL_SECURE_NO_WARNINGS;_CRT_SECURE_NO_WARNINGS;NOMINMAX;GEOS_INLINE;CMAKE_INTDIR=\"MinSizeRel\";GEOS_DLL_EXPORT;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <AdditionalIncludeDirectories>..\include;..\capi;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- </ResourceCompile>
- <Midl>
- <AdditionalIncludeDirectories>..\include;..\capi;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <OutputDirectory>$(IntDir)</OutputDirectory>
- <HeaderFileName>%(Filename).h</HeaderFileName>
- <TypeLibraryName>%(Filename).tlb</TypeLibraryName>
- <InterfaceIdentifierFileName>%(Filename)_i.c</InterfaceIdentifierFileName>
- <ProxyFileName>%(Filename)_p.c</ProxyFileName>
- </Midl>
- <Link>
- <AdditionalOptions> /machine:X86 %(AdditionalOptions)</AdditionalOptions>
- <AdditionalDependencies>kernel32.lib;user32.lib;gdi32.lib;winspool.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;comdlg32.lib;advapi32.lib</AdditionalDependencies>
- <AdditionalLibraryDirectories>%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
- <GenerateDebugInformation>false</GenerateDebugInformation>
- <ImportLibrary>$(OutDir)$(TargetName).lib</ImportLibrary>
- <ProgramDataBaseFile>$(OutDir)$(TargetName).pdb</ProgramDataBaseFile>
- <SubSystem>Console</SubSystem>
- <Version>
- </Version>
- </Link>
- <ProjectReference>
- <LinkLibraryDependencies>false</LinkLibraryDependencies>
- </ProjectReference>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='MinSizeRel|x64'">
- <ClCompile>
- <AdditionalIncludeDirectories>..\include;..\capi;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <AssemblerListingLocation>MinSizeRel/</AssemblerListingLocation>
- <CompileAs>CompileAsCpp</CompileAs>
- <ExceptionHandling>Sync</ExceptionHandling>
- <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
- <MultiProcessorCompilation>true</MultiProcessorCompilation>
- <Optimization>MinSpace</Optimization>
- <PrecompiledHeader>NotUsing</PrecompiledHeader>
- <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
- <RuntimeTypeInfo>true</RuntimeTypeInfo>
- <WarningLevel>Level4</WarningLevel>
- <DebugInformationFormat>
- </DebugInformationFormat>
- <PreprocessorDefinitions>WIN32;_WINDOWS;NDEBUG;_SCL_SECURE_NO_WARNINGS;_CRT_SECURE_NO_WARNINGS;NOMINMAX;GEOS_INLINE;CMAKE_INTDIR="MinSizeRel";GEOS_DLL_EXPORT;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <ObjectFileName>$(IntDir)</ObjectFileName>
- </ClCompile>
- <ResourceCompile>
- <PreprocessorDefinitions>WIN32;_WINDOWS;NDEBUG;_SCL_SECURE_NO_WARNINGS;_CRT_SECURE_NO_WARNINGS;NOMINMAX;GEOS_INLINE;CMAKE_INTDIR=\"MinSizeRel\";GEOS_DLL_EXPORT;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <AdditionalIncludeDirectories>..\include;..\capi;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- </ResourceCompile>
- <Midl>
- <AdditionalIncludeDirectories>..\include;..\capi;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <OutputDirectory>$(IntDir)</OutputDirectory>
- <HeaderFileName>%(Filename).h</HeaderFileName>
- <TypeLibraryName>%(Filename).tlb</TypeLibraryName>
- <InterfaceIdentifierFileName>%(Filename)_i.c</InterfaceIdentifierFileName>
- <ProxyFileName>%(Filename)_p.c</ProxyFileName>
- </Midl>
- <Link>
- <AdditionalOptions> /machine:X64 %(AdditionalOptions)</AdditionalOptions>
- <AdditionalDependencies>kernel32.lib;user32.lib;gdi32.lib;winspool.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;comdlg32.lib;advapi32.lib</AdditionalDependencies>
- <AdditionalLibraryDirectories>%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
- <GenerateDebugInformation>false</GenerateDebugInformation>
- <ImportLibrary>$(OutDir)$(TargetName).lib</ImportLibrary>
- <ProgramDataBaseFile>$(OutDir)$(TargetName).pdb</ProgramDataBaseFile>
- <SubSystem>Console</SubSystem>
- <Version>
- </Version>
- </Link>
- <ProjectReference>
- <LinkLibraryDependencies>false</LinkLibraryDependencies>
- </ProjectReference>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='RelWithDebInfo|Win32'">
- <ClCompile>
- <AdditionalIncludeDirectories>..\include;..\capi;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <AssemblerListingLocation>RelWithDebInfo/</AssemblerListingLocation>
- <CompileAs>CompileAsCpp</CompileAs>
- <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
- <ExceptionHandling>Sync</ExceptionHandling>
- <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
- <MultiProcessorCompilation>true</MultiProcessorCompilation>
- <Optimization>MaxSpeed</Optimization>
- <PrecompiledHeader>NotUsing</PrecompiledHeader>
- <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
- <RuntimeTypeInfo>true</RuntimeTypeInfo>
- <WarningLevel>Level4</WarningLevel>
- <PreprocessorDefinitions>WIN32;_WINDOWS;NDEBUG;_SCL_SECURE_NO_WARNINGS;_CRT_SECURE_NO_WARNINGS;NOMINMAX;GEOS_INLINE;CMAKE_INTDIR="RelWithDebInfo";GEOS_DLL_EXPORT;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <ObjectFileName>$(IntDir)</ObjectFileName>
- </ClCompile>
- <ResourceCompile>
- <PreprocessorDefinitions>WIN32;_WINDOWS;NDEBUG;_SCL_SECURE_NO_WARNINGS;_CRT_SECURE_NO_WARNINGS;NOMINMAX;GEOS_INLINE;CMAKE_INTDIR=\"RelWithDebInfo\";GEOS_DLL_EXPORT;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <AdditionalIncludeDirectories>..\include;..\capi;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- </ResourceCompile>
- <Midl>
- <AdditionalIncludeDirectories>..\include;..\capi;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <OutputDirectory>$(IntDir)</OutputDirectory>
- <HeaderFileName>%(Filename).h</HeaderFileName>
- <TypeLibraryName>%(Filename).tlb</TypeLibraryName>
- <InterfaceIdentifierFileName>%(Filename)_i.c</InterfaceIdentifierFileName>
- <ProxyFileName>%(Filename)_p.c</ProxyFileName>
- </Midl>
- <Link>
- <AdditionalOptions> /machine:X86 /debug %(AdditionalOptions)</AdditionalOptions>
- <AdditionalDependencies>kernel32.lib;user32.lib;gdi32.lib;winspool.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;comdlg32.lib;advapi32.lib</AdditionalDependencies>
- <AdditionalLibraryDirectories>%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <ImportLibrary>$(OutDir)$(TargetName).lib</ImportLibrary>
- <ProgramDataBaseFile>$(OutDir)$(TargetName).pdb</ProgramDataBaseFile>
- <SubSystem>Console</SubSystem>
- <Version>
- </Version>
- </Link>
- <ProjectReference>
- <LinkLibraryDependencies>false</LinkLibraryDependencies>
- </ProjectReference>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='RelWithDebInfo|x64'">
- <ClCompile>
- <AdditionalIncludeDirectories>..\include;..\capi;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <AssemblerListingLocation>RelWithDebInfo/</AssemblerListingLocation>
- <CompileAs>CompileAsCpp</CompileAs>
- <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
- <ExceptionHandling>Sync</ExceptionHandling>
- <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
- <MultiProcessorCompilation>true</MultiProcessorCompilation>
- <Optimization>MaxSpeed</Optimization>
- <PrecompiledHeader>NotUsing</PrecompiledHeader>
- <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
- <RuntimeTypeInfo>true</RuntimeTypeInfo>
- <WarningLevel>Level4</WarningLevel>
- <PreprocessorDefinitions>WIN32;_WINDOWS;NDEBUG;_SCL_SECURE_NO_WARNINGS;_CRT_SECURE_NO_WARNINGS;NOMINMAX;GEOS_INLINE;CMAKE_INTDIR="RelWithDebInfo";GEOS_DLL_EXPORT;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <ObjectFileName>$(IntDir)</ObjectFileName>
- </ClCompile>
- <ResourceCompile>
- <PreprocessorDefinitions>WIN32;_WINDOWS;NDEBUG;_SCL_SECURE_NO_WARNINGS;_CRT_SECURE_NO_WARNINGS;NOMINMAX;GEOS_INLINE;CMAKE_INTDIR=\"RelWithDebInfo\";GEOS_DLL_EXPORT;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <AdditionalIncludeDirectories>..\include;..\capi;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- </ResourceCompile>
- <Midl>
- <AdditionalIncludeDirectories>..\include;..\capi;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <OutputDirectory>$(IntDir)</OutputDirectory>
- <HeaderFileName>%(Filename).h</HeaderFileName>
- <TypeLibraryName>%(Filename).tlb</TypeLibraryName>
- <InterfaceIdentifierFileName>%(Filename)_i.c</InterfaceIdentifierFileName>
- <ProxyFileName>%(Filename)_p.c</ProxyFileName>
- </Midl>
- <Link>
- <AdditionalOptions> /machine:X64 /debug %(AdditionalOptions)</AdditionalOptions>
- <AdditionalDependencies>kernel32.lib;user32.lib;gdi32.lib;winspool.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;comdlg32.lib;advapi32.lib</AdditionalDependencies>
- <AdditionalLibraryDirectories>%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <ImportLibrary>$(OutDir)$(TargetName).lib</ImportLibrary>
- <ProgramDataBaseFile>$(OutDir)$(TargetName).pdb</ProgramDataBaseFile>
- <SubSystem>Console</SubSystem>
- <Version>
- </Version>
- </Link>
- <ProjectReference>
- <LinkLibraryDependencies>false</LinkLibraryDependencies>
- </ProjectReference>
- </ItemDefinitionGroup>
<ItemGroup>
<ClInclude Include="..\include\geos\algorithm\Angle.h" />
<ClInclude Include="..\include\geos\algorithm\BoundaryNodeRule.h" />
Copied: sandbox/jng/geos_c/Oem/geos/VisualStudio/geos_c.vcxproj (from rev 9704, sandbox/jng/use_geos_c_api/Oem/geos/VisualStudio/geos_c.vcxproj)
===================================================================
--- sandbox/jng/geos_c/Oem/geos/VisualStudio/geos_c.vcxproj (rev 0)
+++ sandbox/jng/geos_c/Oem/geos/VisualStudio/geos_c.vcxproj 2020-08-04 14:32:16 UTC (rev 9705)
@@ -0,0 +1,309 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<Project DefaultTargets="Build" ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ItemGroup Label="ProjectConfigurations">
+ <ProjectConfiguration Include="Debug|Win32">
+ <Configuration>Debug</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Debug|x64">
+ <Configuration>Debug</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release|Win32">
+ <Configuration>Release</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release|x64">
+ <Configuration>Release</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ </ItemGroup>
+ <PropertyGroup Label="Globals">
+ <ProjectGuid>{C6C92B81-FF14-37DA-9509-2B33818500D4}</ProjectGuid>
+ <Keyword>Win32Proj</Keyword>
+ <Platform>Win32</Platform>
+ <ProjectName>geos_c</ProjectName>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
+ <ConfigurationType>DynamicLibrary</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>v140</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
+ <ConfigurationType>DynamicLibrary</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>v140</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
+ <ConfigurationType>DynamicLibrary</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>v140</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
+ <ConfigurationType>DynamicLibrary</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>v140</PlatformToolset>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+ <ImportGroup Label="ExtensionSettings">
+ </ImportGroup>
+ <ImportGroup Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <PropertyGroup Label="UserMacros" />
+ <PropertyGroup>
+ <_ProjectFileVersion>10.0.20506.1</_ProjectFileVersion>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">.\$(Configuration)\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">.\$(Configuration)\</IntDir>
+ <TargetName Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(ProjectName)d</TargetName>
+ <TargetName Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(ProjectName)d</TargetName>
+ <TargetExt Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">.dll</TargetExt>
+ <TargetExt Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">.dll</TargetExt>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</LinkIncremental>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</LinkIncremental>
+ <GenerateManifest Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</GenerateManifest>
+ <GenerateManifest Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</GenerateManifest>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">.\$(Configuration)\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">.\$(Configuration)\</IntDir>
+ <TargetName Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(ProjectName)</TargetName>
+ <TargetName Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(ProjectName)</TargetName>
+ <TargetExt Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">.dll</TargetExt>
+ <TargetExt Condition="'$(Configuration)|$(Platform)'=='Release|x64'">.dll</TargetExt>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|x64'">false</LinkIncremental>
+ <GenerateManifest Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</GenerateManifest>
+ <GenerateManifest Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</GenerateManifest>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='MinSizeRel|Win32'">.\$(Configuration)\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='MinSizeRel|Win32'">.\$(Configuration)\</IntDir>
+ <TargetName Condition="'$(Configuration)|$(Platform)'=='MinSizeRel|Win32'">$(ProjectName)</TargetName>
+ <TargetName Condition="'$(Configuration)|$(Platform)'=='MinSizeRel|x64'">$(ProjectName)</TargetName>
+ <TargetExt Condition="'$(Configuration)|$(Platform)'=='MinSizeRel|Win32'">.dll</TargetExt>
+ <TargetExt Condition="'$(Configuration)|$(Platform)'=='MinSizeRel|x64'">.dll</TargetExt>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='MinSizeRel|Win32'">false</LinkIncremental>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='MinSizeRel|x64'">false</LinkIncremental>
+ <GenerateManifest Condition="'$(Configuration)|$(Platform)'=='MinSizeRel|Win32'">true</GenerateManifest>
+ <GenerateManifest Condition="'$(Configuration)|$(Platform)'=='MinSizeRel|x64'">true</GenerateManifest>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='RelWithDebInfo|Win32'">.\$(Configuration)\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='RelWithDebInfo|Win32'">.\$(Configuration)\</IntDir>
+ <TargetName Condition="'$(Configuration)|$(Platform)'=='RelWithDebInfo|Win32'">$(ProjectName)</TargetName>
+ <TargetName Condition="'$(Configuration)|$(Platform)'=='RelWithDebInfo|x64'">$(ProjectName)</TargetName>
+ <TargetExt Condition="'$(Configuration)|$(Platform)'=='RelWithDebInfo|Win32'">.dll</TargetExt>
+ <TargetExt Condition="'$(Configuration)|$(Platform)'=='RelWithDebInfo|x64'">.dll</TargetExt>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='RelWithDebInfo|Win32'">true</LinkIncremental>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='RelWithDebInfo|x64'">true</LinkIncremental>
+ <GenerateManifest Condition="'$(Configuration)|$(Platform)'=='RelWithDebInfo|Win32'">true</GenerateManifest>
+ <GenerateManifest Condition="'$(Configuration)|$(Platform)'=='RelWithDebInfo|x64'">true</GenerateManifest>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
+ <OutDir>.\$(Configuration)64\</OutDir>
+ <IntDir>.\$(Configuration)64\</IntDir>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
+ <OutDir>.\$(Configuration)64\</OutDir>
+ <IntDir>.\$(Configuration)64\</IntDir>
+ </PropertyGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+ <ClCompile>
+ <AdditionalIncludeDirectories>..\include;..\capi;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <AssemblerListingLocation>
+ </AssemblerListingLocation>
+ <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+ <CompileAs>CompileAsCpp</CompileAs>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ <ExceptionHandling>Sync</ExceptionHandling>
+ <InlineFunctionExpansion>Disabled</InlineFunctionExpansion>
+ <MultiProcessorCompilation>true</MultiProcessorCompilation>
+ <Optimization>Disabled</Optimization>
+ <PrecompiledHeader>NotUsing</PrecompiledHeader>
+ <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
+ <RuntimeTypeInfo>true</RuntimeTypeInfo>
+ <WarningLevel>Level4</WarningLevel>
+ <PreprocessorDefinitions>WIN32;_WINDOWS;GEOS_INLINE;GEOS_DLL_EXPORT=1;CMAKE_INTDIR="Debug";geos_c_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <ObjectFileName>$(IntDir)</ObjectFileName>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;GEOS_INLINE;GEOS_DLL_EXPORT=1;CMAKE_INTDIR=\"Debug\";geos_c_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <AdditionalIncludeDirectories>..\include;..\capi;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ </ResourceCompile>
+ <Midl>
+ <AdditionalIncludeDirectories>..\include;..\capi;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <OutputDirectory>$(IntDir)</OutputDirectory>
+ <HeaderFileName>%(Filename).h</HeaderFileName>
+ <TypeLibraryName>%(Filename).tlb</TypeLibraryName>
+ <InterfaceIdentifierFileName>%(Filename)_i.c</InterfaceIdentifierFileName>
+ <ProxyFileName>%(Filename)_p.c</ProxyFileName>
+ </Midl>
+ <Link>
+ <AdditionalOptions> /machine:X86 /debug %(AdditionalOptions)</AdditionalOptions>
+ <AdditionalDependencies>geosd.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;comdlg32.lib;advapi32.lib</AdditionalDependencies>
+ <AdditionalLibraryDirectories>.\Debug;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <ImportLibrary>$(OutDir)$(TargetName).lib</ImportLibrary>
+ <ProgramDataBaseFile>$(OutDir)$(TargetName).pdb</ProgramDataBaseFile>
+ <SubSystem>Console</SubSystem>
+ <Version>
+ </Version>
+ </Link>
+ <ProjectReference>
+ <LinkLibraryDependencies>false</LinkLibraryDependencies>
+ </ProjectReference>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
+ <ClCompile>
+ <AdditionalIncludeDirectories>..\include;..\capi;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <AssemblerListingLocation>
+ </AssemblerListingLocation>
+ <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+ <CompileAs>CompileAsCpp</CompileAs>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ <ExceptionHandling>Sync</ExceptionHandling>
+ <InlineFunctionExpansion>Disabled</InlineFunctionExpansion>
+ <MultiProcessorCompilation>true</MultiProcessorCompilation>
+ <Optimization>Disabled</Optimization>
+ <PrecompiledHeader>NotUsing</PrecompiledHeader>
+ <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
+ <RuntimeTypeInfo>true</RuntimeTypeInfo>
+ <WarningLevel>Level4</WarningLevel>
+ <PreprocessorDefinitions>WIN32;_WINDOWS;GEOS_INLINE;GEOS_DLL_EXPORT=1;CMAKE_INTDIR="Debug";geos_c_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <ObjectFileName>$(IntDir)</ObjectFileName>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;GEOS_INLINE;GEOS_DLL_EXPORT=1;CMAKE_INTDIR=\"Debug\";geos_c_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <AdditionalIncludeDirectories>..\include;..\capi;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ </ResourceCompile>
+ <Midl>
+ <AdditionalIncludeDirectories>..\include;..\capi;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <OutputDirectory>$(IntDir)</OutputDirectory>
+ <HeaderFileName>%(Filename).h</HeaderFileName>
+ <TypeLibraryName>%(Filename).tlb</TypeLibraryName>
+ <InterfaceIdentifierFileName>%(Filename)_i.c</InterfaceIdentifierFileName>
+ <ProxyFileName>%(Filename)_p.c</ProxyFileName>
+ </Midl>
+ <Link>
+ <AdditionalOptions> /machine:X64 /debug %(AdditionalOptions)</AdditionalOptions>
+ <AdditionalDependencies>geosd.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;comdlg32.lib;advapi32.lib</AdditionalDependencies>
+ <AdditionalLibraryDirectories>.\Debug64;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <ImportLibrary>$(OutDir)$(TargetName).lib</ImportLibrary>
+ <ProgramDataBaseFile>$(OutDir)$(TargetName).pdb</ProgramDataBaseFile>
+ <SubSystem>Console</SubSystem>
+ <Version>
+ </Version>
+ </Link>
+ <ProjectReference>
+ <LinkLibraryDependencies>false</LinkLibraryDependencies>
+ </ProjectReference>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+ <ClCompile>
+ <AdditionalIncludeDirectories>..\include;..\capi;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <AssemblerListingLocation>
+ </AssemblerListingLocation>
+ <CompileAs>CompileAsCpp</CompileAs>
+ <ExceptionHandling>Sync</ExceptionHandling>
+ <InlineFunctionExpansion>AnySuitable</InlineFunctionExpansion>
+ <MultiProcessorCompilation>true</MultiProcessorCompilation>
+ <Optimization>MaxSpeed</Optimization>
+ <PrecompiledHeader>NotUsing</PrecompiledHeader>
+ <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+ <RuntimeTypeInfo>true</RuntimeTypeInfo>
+ <WarningLevel>Level4</WarningLevel>
+ <DebugInformationFormat>
+ </DebugInformationFormat>
+ <PreprocessorDefinitions>WIN32;_WINDOWS;NDEBUG;GEOS_INLINE;GEOS_DLL_EXPORT=1;CMAKE_INTDIR="Release";geos_c_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <ObjectFileName>$(IntDir)</ObjectFileName>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>WIN32;_WINDOWS;NDEBUG;GEOS_INLINE;GEOS_DLL_EXPORT=1;CMAKE_INTDIR=\"Release\";geos_c_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <AdditionalIncludeDirectories>..\include;..\capi;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ </ResourceCompile>
+ <Midl>
+ <AdditionalIncludeDirectories>..\include;..\capi;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <OutputDirectory>$(IntDir)</OutputDirectory>
+ <HeaderFileName>%(Filename).h</HeaderFileName>
+ <TypeLibraryName>%(Filename).tlb</TypeLibraryName>
+ <InterfaceIdentifierFileName>%(Filename)_i.c</InterfaceIdentifierFileName>
+ <ProxyFileName>%(Filename)_p.c</ProxyFileName>
+ </Midl>
+ <Link>
+ <AdditionalOptions> /machine:X86 %(AdditionalOptions)</AdditionalOptions>
+ <AdditionalDependencies>geos.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;comdlg32.lib;advapi32.lib</AdditionalDependencies>
+ <AdditionalLibraryDirectories>.\Release;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <ImportLibrary>$(OutDir)$(TargetName).lib</ImportLibrary>
+ <ProgramDataBaseFile>$(OutDir)$(TargetName).pdb</ProgramDataBaseFile>
+ <SubSystem>Console</SubSystem>
+ <Version>
+ </Version>
+ <OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>
+ </Link>
+ <ProjectReference>
+ <LinkLibraryDependencies>false</LinkLibraryDependencies>
+ </ProjectReference>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
+ <ClCompile>
+ <AdditionalIncludeDirectories>..\include;..\capi;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <AssemblerListingLocation>
+ </AssemblerListingLocation>
+ <CompileAs>CompileAsCpp</CompileAs>
+ <ExceptionHandling>Sync</ExceptionHandling>
+ <InlineFunctionExpansion>AnySuitable</InlineFunctionExpansion>
+ <MultiProcessorCompilation>true</MultiProcessorCompilation>
+ <Optimization>MaxSpeed</Optimization>
+ <PrecompiledHeader>NotUsing</PrecompiledHeader>
+ <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+ <RuntimeTypeInfo>true</RuntimeTypeInfo>
+ <WarningLevel>Level4</WarningLevel>
+ <DebugInformationFormat>
+ </DebugInformationFormat>
+ <PreprocessorDefinitions>WIN32;_WINDOWS;NDEBUG;GEOS_INLINE;GEOS_DLL_EXPORT=1;CMAKE_INTDIR="Release";geos_c_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <ObjectFileName>$(IntDir)</ObjectFileName>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>WIN32;_WINDOWS;NDEBUG;GEOS_INLINE;GEOS_DLL_EXPORT=1;CMAKE_INTDIR=\"Release\";geos_c_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <AdditionalIncludeDirectories>..\include;..\capi;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ </ResourceCompile>
+ <Midl>
+ <AdditionalIncludeDirectories>..\include;..\capi;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <OutputDirectory>$(IntDir)</OutputDirectory>
+ <HeaderFileName>%(Filename).h</HeaderFileName>
+ <TypeLibraryName>%(Filename).tlb</TypeLibraryName>
+ <InterfaceIdentifierFileName>%(Filename)_i.c</InterfaceIdentifierFileName>
+ <ProxyFileName>%(Filename)_p.c</ProxyFileName>
+ </Midl>
+ <Link>
+ <AdditionalOptions> /machine:X64 %(AdditionalOptions)</AdditionalOptions>
+ <AdditionalDependencies>geos.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;comdlg32.lib;advapi32.lib</AdditionalDependencies>
+ <AdditionalLibraryDirectories>.\Release64;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <ImportLibrary>$(OutDir)$(TargetName).lib</ImportLibrary>
+ <ProgramDataBaseFile>$(OutDir)$(TargetName).pdb</ProgramDataBaseFile>
+ <SubSystem>Console</SubSystem>
+ <Version>
+ </Version>
+ <OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>
+ </Link>
+ <ProjectReference>
+ <LinkLibraryDependencies>false</LinkLibraryDependencies>
+ </ProjectReference>
+ </ItemDefinitionGroup>
+ <ItemGroup>
+ <ClCompile Include="..\capi\geos_c.cpp" />
+ <ClCompile Include="..\capi\geos_ts_c.cpp" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="geos.vcxproj">
+ <Project>{1B9196BF-C194-47BC-846A-D9BBB134F2B3}</Project>
+ <Name>geos</Name>
+ </ProjectReference>
+ </ItemGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+ <ImportGroup Label="ExtensionTargets">
+ </ImportGroup>
+</Project>
\ No newline at end of file
Modified: sandbox/jng/geos_c/Oem/oem.sln
===================================================================
--- sandbox/jng/geos_c/Oem/oem.sln 2020-08-04 14:22:55 UTC (rev 9704)
+++ sandbox/jng/geos_c/Oem/oem.sln 2020-08-04 14:32:16 UTC (rev 9705)
@@ -91,6 +91,8 @@
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "minizip", "zlib_minizip\win\minizip.vcxproj", "{DB542A13-DE6E-3E82-BA87-7AE2885324B1}"
EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "geos_c", "geos\VisualStudio\geos_c.vcxproj", "{C6C92B81-FF14-37DA-9509-2B33818500D4}"
+EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Win32 = Debug|Win32
@@ -386,6 +388,14 @@
{B601F04C-0D42-4AFC-A092-B31185E2EA8C}.Release|Win32.Build.0 = Release|Win32
{B601F04C-0D42-4AFC-A092-B31185E2EA8C}.Release|x64.ActiveCfg = Release|x64
{B601F04C-0D42-4AFC-A092-B31185E2EA8C}.Release|x64.Build.0 = Release|x64
+ {C6C92B81-FF14-37DA-9509-2B33818500D4}.Debug|Win32.ActiveCfg = Debug|Win32
+ {C6C92B81-FF14-37DA-9509-2B33818500D4}.Debug|Win32.Build.0 = Debug|Win32
+ {C6C92B81-FF14-37DA-9509-2B33818500D4}.Debug|x64.ActiveCfg = Debug|x64
+ {C6C92B81-FF14-37DA-9509-2B33818500D4}.Debug|x64.Build.0 = Debug|x64
+ {C6C92B81-FF14-37DA-9509-2B33818500D4}.Release|Win32.ActiveCfg = Release|Win32
+ {C6C92B81-FF14-37DA-9509-2B33818500D4}.Release|Win32.Build.0 = Release|Win32
+ {C6C92B81-FF14-37DA-9509-2B33818500D4}.Release|x64.ActiveCfg = Release|x64
+ {C6C92B81-FF14-37DA-9509-2B33818500D4}.Release|x64.Build.0 = Release|x64
{DB542A13-DE6E-3E82-BA87-7AE2885324B1}.Debug|Win32.ActiveCfg = Debug|Win32
{DB542A13-DE6E-3E82-BA87-7AE2885324B1}.Debug|Win32.Build.0 = Debug|Win32
{DB542A13-DE6E-3E82-BA87-7AE2885324B1}.Debug|x64.ActiveCfg = Debug|x64
Modified: sandbox/jng/geos_c/Server/src/PostBuild/PostBuild.mak
===================================================================
--- sandbox/jng/geos_c/Server/src/PostBuild/PostBuild.mak 2020-08-04 14:22:55 UTC (rev 9704)
+++ sandbox/jng/geos_c/Server/src/PostBuild/PostBuild.mak 2020-08-04 14:32:16 UTC (rev 9705)
@@ -628,6 +628,12 @@
..\..\bin\release\GEOS.pdb : ..\..\..\Oem\geos\VisualStudio\Release\GEOS.pdb
xcopy /r /d /y ..\..\..\Oem\geos\VisualStudio\Release\GEOS.pdb ..\..\bin\release\
+..\..\bin\release\geos_c.dll : ..\..\..\Oem\geos\VisualStudio\Release\geos_c.dll
+ xcopy /r /d /y ..\..\..\Oem\geos\VisualStudio\Release\geos_c.dll ..\..\bin\release\
+
+..\..\bin\release\geos_c.pdb : ..\..\..\Oem\geos\VisualStudio\Release\geos_c.pdb
+ xcopy /r /d /y ..\..\..\Oem\geos\VisualStudio\Release\geos_c.pdb ..\..\bin\release\
+
..\..\bin\release\libdb48.dll : ..\..\..\Oem\dbxml\bin\release\libdb48.dll
xcopy /r /d /y ..\..\..\Oem\dbxml\bin\release\libdb48.dll ..\..\bin\release\
@@ -712,6 +718,8 @@
..\..\bin\release\gd.pdb \
..\..\bin\release\GEOS.dll \
..\..\bin\release\GEOS.pdb \
+ ..\..\bin\release\geos_c.dll \
+ ..\..\bin\release\geos_c.pdb \
..\..\bin\release\libdb48.dll \
..\..\bin\release\libdb48.pdb \
..\..\bin\release\libdbxml25.dll \
@@ -910,6 +918,12 @@
..\..\bin\release64\GEOS.pdb : ..\..\..\Oem\geos\VisualStudio\Release64\GEOS.pdb
xcopy /r /d /y ..\..\..\Oem\geos\VisualStudio\Release64\GEOS.pdb ..\..\bin\release64\
+..\..\bin\release64\geos_c.dll : ..\..\..\Oem\geos\VisualStudio\Release64\geos_c.dll
+ xcopy /r /d /y ..\..\..\Oem\geos\VisualStudio\Release64\geos_c.dll ..\..\bin\release64\
+
+..\..\bin\release64\geos_c.pdb : ..\..\..\Oem\geos\VisualStudio\Release64\geos_c.pdb
+ xcopy /r /d /y ..\..\..\Oem\geos\VisualStudio\Release64\geos_c.pdb ..\..\bin\release64\
+
..\..\bin\release64\libdb48.dll : ..\..\..\Oem\dbxml\bin64\release\libdb48.dll
xcopy /r /d /y ..\..\..\Oem\dbxml\bin64\release\libdb48.dll ..\..\bin\release64\
@@ -994,6 +1008,8 @@
..\..\bin\release64\gd.pdb \
..\..\bin\release64\GEOS.dll \
..\..\bin\release64\GEOS.pdb \
+ ..\..\bin\release64\geos_c.dll \
+ ..\..\bin\release64\geos_c.pdb \
..\..\bin\release64\libdb48.dll \
..\..\bin\release64\libdb48.pdb \
..\..\bin\release64\libdbxml25.dll \
@@ -1449,6 +1465,8 @@
if EXIST ..\..\bin\release\gd.pdb del /F ..\..\bin\release\gd.pdb
if EXIST ..\..\bin\release\GEOS.dll del /F ..\..\bin\release\GEOS.dll
if EXIST ..\..\bin\release\GEOS.pdb del /F ..\..\bin\release\GEOS.pdb
+ if EXIST ..\..\bin\release\geos_c.dll del /F ..\..\bin\release\geos_c.dll
+ if EXIST ..\..\bin\release\geos_c.pdb del /F ..\..\bin\release\geos_c.pdb
if EXIST ..\..\bin\release\libdb48.dll del /F ..\..\bin\release\libdb48.dll
if EXIST ..\..\bin\release\libdb48.pdb del /F ..\..\bin\release\libdb48.pdb
if EXIST ..\..\bin\release\libdbxml25.dll del /F ..\..\bin\release\libdbxml25.dll
@@ -1597,6 +1615,8 @@
if EXIST ..\..\bin\release64\gd.pdb del /F ..\..\bin\release64\gd.pdb
if EXIST ..\..\bin\release64\GEOS.dll del /F ..\..\bin\release64\GEOS.dll
if EXIST ..\..\bin\release64\GEOS.pdb del /F ..\..\bin\release64\GEOS.pdb
+ if EXIST ..\..\bin\release64\geos_c.dll del /F ..\..\bin\release64\geos_c.dll
+ if EXIST ..\..\bin\release64\geos_c.pdb del /F ..\..\bin\release64\geos_c.pdb
if EXIST ..\..\bin\release64\libdb48.dll del /F ..\..\bin\release64\libdb48.dll
if EXIST ..\..\bin\release64\libdb48.pdb del /F ..\..\bin\release64\libdb48.pdb
if EXIST ..\..\bin\release64\libdbxml25.dll del /F ..\..\bin\release64\libdbxml25.dll
@@ -2338,6 +2358,12 @@
..\..\bin\release(v100)\GEOS.pdb : ..\..\..\Oem\geos\VisualStudio\release(v100)\GEOS.pdb
xcopy /r /d /y ..\..\..\Oem\geos\VisualStudio\release(v100)\GEOS.pdb ..\..\bin\release(v100)\
+..\..\bin\release(v100)\geos_c.dll : ..\..\..\Oem\geos\VisualStudio\release(v100)\geos_c.dll
+ xcopy /r /d /y ..\..\..\Oem\geos\VisualStudio\release(v100)\GEOS.dll ..\..\bin\release(v100)\
+
+..\..\bin\release(v100)\geos_c.pdb : ..\..\..\Oem\geos\VisualStudio\release(v100)\geos_c.pdb
+ xcopy /r /d /y ..\..\..\Oem\geos\VisualStudio\release(v100)\geos_c.pdb ..\..\bin\release(v100)\
+
..\..\bin\release(v100)\libdb48.dll : ..\..\..\Oem\dbxml\bin\release(v100)\libdb48.dll
xcopy /r /d /y ..\..\..\Oem\dbxml\bin\release(v100)\libdb48.dll ..\..\bin\release(v100)\
@@ -2422,6 +2448,8 @@
..\..\bin\release(v100)\gd.pdb \
..\..\bin\release(v100)\GEOS.dll \
..\..\bin\release(v100)\GEOS.pdb \
+ ..\..\bin\release(v100)\geos_c.dll \
+ ..\..\bin\release(v100)\geos_c.pdb \
..\..\bin\release(v100)\libdb48.dll \
..\..\bin\release(v100)\libdb48.pdb \
..\..\bin\release(v100)\libdbxml25.dll \
@@ -2613,6 +2641,12 @@
..\..\bin\release(v100)64\GEOS.pdb : ..\..\..\Oem\geos\VisualStudio\release(v100)64\GEOS.pdb
xcopy /r /d /y ..\..\..\Oem\geos\VisualStudio\release(v100)64\GEOS.pdb ..\..\bin\release(v100)64\
+..\..\bin\release(v100)64\geos_c.dll : ..\..\..\Oem\geos\VisualStudio\release(v100)64\geos_c.dll
+ xcopy /r /d /y ..\..\..\Oem\geos\VisualStudio\release(v100)64\geos_c.dll ..\..\bin\release(v100)64\
+
+..\..\bin\release(v100)64\geos_c.pdb : ..\..\..\Oem\geos\VisualStudio\release(v100)64\geos_c.pdb
+ xcopy /r /d /y ..\..\..\Oem\geos\VisualStudio\release(v100)64\geos_c.pdb ..\..\bin\release(v100)64\
+
..\..\bin\release(v100)64\libdb48.dll : ..\..\..\Oem\dbxml\bin64\release(v100)\libdb48.dll
xcopy /r /d /y ..\..\..\Oem\dbxml\bin64\release(v100)\libdb48.dll ..\..\bin\release(v100)64\
@@ -2697,6 +2731,8 @@
..\..\bin\release(v100)64\gd.pdb \
..\..\bin\release(v100)64\GEOS.dll \
..\..\bin\release(v100)64\GEOS.pdb \
+ ..\..\bin\release(v100)64\geos_c.dll \
+ ..\..\bin\release(v100)64\geos_c.pdb \
..\..\bin\release(v100)64\libdb48.dll \
..\..\bin\release(v100)64\libdb48.pdb \
..\..\bin\release(v100)64\libdbxml25.dll \
@@ -3131,6 +3167,8 @@
if EXIST ..\..\bin\release(v100)\gd.pdb del /F ..\..\bin\release(v100)\gd.pdb
if EXIST ..\..\bin\release(v100)\GEOS.dll del /F ..\..\bin\release(v100)\GEOS.dll
if EXIST ..\..\bin\release(v100)\GEOS.pdb del /F ..\..\bin\release(v100)\GEOS.pdb
+ if EXIST ..\..\bin\release(v100)\geos_c.dll del /F ..\..\bin\release(v100)\geos_c.dll
+ if EXIST ..\..\bin\release(v100)\geos_c.pdb del /F ..\..\bin\release(v100)\geos_c.pdb
if EXIST ..\..\bin\release(v100)\libdb48.dll del /F ..\..\bin\release(v100)\libdb48.dll
if EXIST ..\..\bin\release(v100)\libdb48.pdb del /F ..\..\bin\release(v100)\libdb48.pdb
if EXIST ..\..\bin\release(v100)\libdbxml25.dll del /F ..\..\bin\release(v100)\libdbxml25.dll
@@ -3272,6 +3310,8 @@
if EXIST ..\..\bin\release(v100)64\gd.pdb del /F ..\..\bin\release(v100)64\gd.pdb
if EXIST ..\..\bin\release(v100)64\GEOS.dll del /F ..\..\bin\release(v100)64\GEOS.dll
if EXIST ..\..\bin\release(v100)64\GEOS.pdb del /F ..\..\bin\release(v100)64\GEOS.pdb
+ if EXIST ..\..\bin\release(v100)64\geos_c.dll del /F ..\..\bin\release(v100)64\geos_c.dll
+ if EXIST ..\..\bin\release(v100)64\geos_c.pdb del /F ..\..\bin\release(v100)64\geos_c.pdb
if EXIST ..\..\bin\release(v100)64\libdb48.dll del /F ..\..\bin\release(v100)64\libdb48.dll
if EXIST ..\..\bin\release(v100)64\libdb48.pdb del /F ..\..\bin\release(v100)64\libdb48.pdb
if EXIST ..\..\bin\release(v100)64\libdbxml25.dll del /F ..\..\bin\release(v100)64\libdbxml25.dll
Modified: sandbox/jng/geos_c/UnitTest/WebTier/Java/build.xml
===================================================================
--- sandbox/jng/geos_c/UnitTest/WebTier/Java/build.xml 2020-08-04 14:22:55 UTC (rev 9704)
+++ sandbox/jng/geos_c/UnitTest/WebTier/Java/build.xml 2020-08-04 14:32:16 UTC (rev 9705)
@@ -60,6 +60,7 @@
<include name="**/Mg*.dll" />
<include name="**/ACE.dll" />
<include name="**/GEOS.dll" />
+ <include name="**/geos_c.dll" />
<include name="**/lib_json.dll" />
<include name="**/MapGuideJavaApiEx.dll" />
<include name="**/xerces-c_3_1mg.dll" />
Modified: sandbox/jng/geos_c/Web/src/MapGuideApi/copydlls.bat
===================================================================
--- sandbox/jng/geos_c/Web/src/MapGuideApi/copydlls.bat 2020-08-04 14:22:55 UTC (rev 9704)
+++ sandbox/jng/geos_c/Web/src/MapGuideApi/copydlls.bat 2020-08-04 14:32:16 UTC (rev 9705)
@@ -40,6 +40,9 @@
echo Copying GEOS Release DLL to %WEB_BIN_RELEASE%
xcopy /r /d /y "..\..\..\Oem\geos\VisualStudio\%2\GEOS.dll" %WEB_BIN_RELEASE%
+echo Copying geos_c Release DLL to %WEB_BIN_RELEASE%
+xcopy /r /d /y "..\..\..\Oem\geos\VisualStudio\%2\geos_c.dll" %WEB_BIN_RELEASE%
+
echo Copying JSON Release DLL to %WEB_BIN_RELEASE%
xcopy /r /d /y "..\..\..\Oem\jsoncpp\lib\%2\lib_json.dll" %WEB_BIN_RELEASE%
@@ -80,6 +83,9 @@
echo Copying GEOS Release DLL to %WEB_BIN_RELEASE%64
xcopy /r /d /y "..\..\..\Oem\geos\VisualStudio\%264\GEOS.dll" %WEB_BIN_RELEASE%64
+echo Copying geos_c Release DLL to %WEB_BIN_RELEASE%64
+xcopy /r /d /y "..\..\..\Oem\geos\VisualStudio\%264\geos_c.dll" %WEB_BIN_RELEASE%64
+
echo Copying JSON Release DLL to %WEB_BIN_RELEASE%64
xcopy /r /d /y "..\..\..\Oem\jsoncpp\lib64\%2\lib_json.dll" %WEB_BIN_RELEASE%64
@@ -120,6 +126,9 @@
echo Copying GEOS Debug DLL to %WEB_BIN_DEBUG%
xcopy /r /d /y "..\..\..\Oem\geos\VisualStudio\%2\GEOSd.dll" %WEB_BIN_DEBUG%
+echo Copying geos_c Debug DLL to %WEB_BIN_DEBUG%
+xcopy /r /d /y "..\..\..\Oem\geos\VisualStudio\%2\geos_cd.dll" %WEB_BIN_DEBUG%
+
echo Copying JSON Debug DLL to %WEB_BIN_DEBUG%
xcopy /r /d /y "..\..\..\Oem\jsoncpp\lib\%2\lib_jsond.dll" %WEB_BIN_DEBUG%
@@ -160,6 +169,9 @@
echo Copying GEOS Debug DLL to %WEB_BIN_DEBUG%64
xcopy /r /d /y "..\..\..\Oem\geos\VisualStudio\%264\GEOSd.dll" %WEB_BIN_DEBUG%64
+echo Copying geos_c Debug DLL to %WEB_BIN_DEBUG%64
+xcopy /r /d /y "..\..\..\Oem\geos\VisualStudio\%264\geos_c.dll" %WEB_BIN_DEBUG%64
+
echo Copying JSON Debug DLL to %WEB_BIN_DEBUG%64
xcopy /r /d /y "..\..\..\Oem\jsoncpp\lib64\%2\lib_jsond.dll" %WEB_BIN_DEBUG%64
Modified: sandbox/jng/geos_c/desktop_package_excludes.txt
===================================================================
--- sandbox/jng/geos_c/desktop_package_excludes.txt 2020-08-04 14:22:55 UTC (rev 9704)
+++ sandbox/jng/geos_c/desktop_package_excludes.txt 2020-08-04 14:32:16 UTC (rev 9705)
@@ -7,6 +7,7 @@
FoundationUnmanagedApi.dll
GeometryUnmanagedApi.dll
GEOS.dll
+geos_c.dll
MgFoundation.dll
MgGeometry.dll
MgMdfModel.dll
Modified: sandbox/jng/geos_c/viewer_package_excludes.txt
===================================================================
--- sandbox/jng/geos_c/viewer_package_excludes.txt 2020-08-04 14:22:55 UTC (rev 9704)
+++ sandbox/jng/geos_c/viewer_package_excludes.txt 2020-08-04 14:32:16 UTC (rev 9705)
@@ -22,6 +22,7 @@
FoundationUnmanagedApi.dll
GeometryUnmanagedApi.dll
GEOS.dll
+geos_c.dll
MgFoundation.dll
MgGeometry.dll
MgMdfModel.dll
More information about the mapguide-commits
mailing list