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

git at osgeo.org git at osgeo.org
Tue Jan 29 09:04:38 PST 2019


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

The branch, master has been updated
       via  cb2d5a03c38fcb928397f68c9078b19cd97cece1 (commit)
       via  a582d479fed26f3c17e0e0e49112cb74e039e62c (commit)
      from  525e0b6305f111802b4dbcc2a5b64ee5a238f8d3 (commit)

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

- Log -----------------------------------------------------------------
commit cb2d5a03c38fcb928397f68c9078b19cd97cece1
Author: Paul Ramsey <pramsey at cleverelephant.ca>
Date:   Tue Jan 29 09:03:32 2019 -0800

    convert remaining NAN/INF macros to std::

diff --git a/src/algorithm/CGAlgorithmsDD.cpp b/src/algorithm/CGAlgorithmsDD.cpp
index 30f1c49..8bcf3e9 100644
--- a/src/algorithm/CGAlgorithmsDD.cpp
+++ b/src/algorithm/CGAlgorithmsDD.cpp
@@ -58,7 +58,7 @@ int CGAlgorithmsDD::orientationIndex(const Coordinate& p1,
                                      const Coordinate& p2,
                                      const Coordinate& q)
 {
-    if (ISNAN(q.x) || ISNAN(q.y) || !FINITE(q.x) || !FINITE(q.y)) {
+    if (std::isnan(q.x) || std::isnan(q.y) || !std::isfinite(q.x) || !std::isfinite(q.y)) {
         throw util::IllegalArgumentException("CGAlgorithmsDD::orientationIndex encountered NaN/Inf numbers");
     }
 
@@ -91,8 +91,8 @@ int CGAlgorithmsDD::signOfDet2x2(DD &x1, DD &y1, DD &x2, DD &y2)
 
 int CGAlgorithmsDD::signOfDet2x2(double dx1, double dy1, double dx2, double dy2)
 {
-    if (ISNAN(dx1)   || ISNAN(dy1)   || ISNAN(dx2)   || ISNAN(dy2) ||
-        !FINITE(dx1) || !FINITE(dy1) || !FINITE(dx2) || !FINITE(dy2)) {
+    if (std::isnan(dx1)    ||  std::isnan(dy1)    ||  std::isnan(dx2)    ||  std::isnan(dy2) ||
+       !std::isfinite(dx1) || !std::isfinite(dy1) || !std::isfinite(dx2) || !std::isfinite(dy2)) {
         throw util::IllegalArgumentException("CGAlgorithmsDD::signOfDet2x2 encountered NaN/Inf numbers");
     }
     DD x1(dx1);
diff --git a/src/operation/valid/IsValidOp.cpp b/src/operation/valid/IsValidOp.cpp
index dbcf4eb..73f768e 100644
--- a/src/operation/valid/IsValidOp.cpp
+++ b/src/operation/valid/IsValidOp.cpp
@@ -19,6 +19,8 @@
  *
  **********************************************************************/
 
+#include "IndexedNestedRingTester.h"
+
 #include <geos/export.h>
 #include <geos/constants.h>
 #include <geos/algorithm/CGAlgorithms.h>
@@ -40,7 +42,6 @@
 #include <geos/index/chain/MonotoneChainSelectAction.h>
 #include <geos/operation/valid/ConnectedInteriorTester.h>
 #include <geos/operation/valid/ConsistentAreaTester.h>
-#include <geos/operation/valid/IndexedNestedRingTester.h>
 #include <geos/operation/valid/IsValidOp.h>
 #include <geos/util/UnsupportedOperationException.h>
 
@@ -96,15 +97,9 @@ IsValidOp::isValid()
 bool
 IsValidOp::isValid(const Coordinate &coord)
 {
-<<<<<<< HEAD
-    if (! FINITE(coord.x) ) return false;
-    if (! FINITE(coord.y) ) return false;
+    if (! std::isfinite(coord.x) ) return false;
+    if (! std::isfinite(coord.y) ) return false;
     return true;
-=======
-	if (! std::isfinite(coord.x) ) return false;
-	if (! std::isfinite(coord.y) ) return false;
-	return true;
->>>>>>> Using constants.h and stop using platform.h (closes #925)
 }
 
 /* static public */

commit a582d479fed26f3c17e0e0e49112cb74e039e62c
Author: cvvergara <vicky at georepublic.de>
Date:   Tue Sep 11 11:14:16 2018 -0500

    Using constants.h and stop using platform.h (closes #925)

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 189959a..421862b 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -208,7 +208,7 @@ endif()
 #################################################################################
 # Setup C/C++ library features
 #################################################################################
-
+if (false)
 # check header files
 include(CheckIncludeFiles)
 
@@ -228,6 +228,7 @@ else()
     check_type_size("long long int" HAVE_LONG_LONG_INT_64)
   endif()
 endif()
+endif()
 
 ################################################################################
 # Setup build directories
@@ -251,7 +252,7 @@ include_directories(${PROJECT_SOURCE_DIR}/include)
 # for including build-specific GEOS C API headers
 include_directories(${PROJECT_BINARY_DIR}/capi)
 
-# for including build-specific version.h, platform.h and geos_c.h
+# for including build-specific version.h and geos_c.h
 include_directories(${PROJECT_BINARY_DIR}/include)
 
 # for geos_ts.cpp which does #include "../geos_revision.h" whereas
@@ -284,26 +285,6 @@ add_custom_target(geos_revision
     -D DST=${PROJECT_BINARY_DIR}/geos_revision.h
     -P ${PROJECT_BINARY_DIR}/geos_revision.cmake)
 
-if(EXISTS ${PROJECT_SOURCE_DIR}/include/geos/platform.h)
-  message(STATUS "Disabling existing ${PROJECT_SOURCE_DIR}/include/geos/platform.h")
-
-  if(${CMAKE_MAJOR_VERSION} EQUAL 2 AND ${CMAKE_MINOR_VERSION} EQUAL 6)
-    file(REMOVE ${PROJECT_SOURCE_DIR}/include/geos/platform.h)
-    set(PH_RESULT "removed")
-  else()
-    file(RENAME
-      ${PROJECT_SOURCE_DIR}/include/geos/platform.h
-      ${PROJECT_SOURCE_DIR}/include/geos/platform.h.disabled)
-      set(PH_RESULT "renamed")
-  endif()
-
-  message(STATUS "Disabling existing ${PROJECT_SOURCE_DIR}/include/geos/platform.h - ${PH_RESULT}")
-endif()
-
-message(STATUS "Generating GEOS ${PROJECT_BINARY_DIR}/include/geos/platform.h")
-configure_file(${PROJECT_SOURCE_DIR}/include/geos/platform.h.cmake
-  ${PROJECT_BINARY_DIR}/include/geos/platform.h)
-
 message(STATUS "Generating GEOS ${PROJECT_BINARY_DIR}/include/geos/version.h")
 configure_file(${PROJECT_SOURCE_DIR}/include/geos/version.h.in
   ${PROJECT_BINARY_DIR}/include/geos/version.h @ONLY)
diff --git a/capi/geos_ts_c.cpp b/capi/geos_ts_c.cpp
index a478639..7b69c46 100644
--- a/capi/geos_ts_c.cpp
+++ b/capi/geos_ts_c.cpp
@@ -16,7 +16,6 @@
  *
  ***********************************************************************/
 
-#include <geos/platform.h>  // for FINITE
 #include <geos/geom/Coordinate.h>
 #include <geos/geom/Geometry.h>
 #include <geos/geom/prep/PreparedGeometry.h>
@@ -3914,7 +3913,7 @@ GEOSHasZ_r(GEOSContextHandle_t extHandle, const Geometry *g)
     double az = g->getCoordinate()->z;
     //handle->ERROR_MESSAGE("ZCoord: %g", az);
 
-    return static_cast<char>(FINITE(az));
+    return static_cast<char>(std::isfinite(az));
 }
 
 int
diff --git a/configure.ac b/configure.ac
index 6ded2e3..56c26ac 100644
--- a/configure.ac
+++ b/configure.ac
@@ -43,7 +43,7 @@ AC_MSG_RESULT(["$CAPI_VERSION"])
 
 AM_INIT_AUTOMAKE([geos], [$VERSION], [no-define])
 AM_MAINTAINER_MODE
-AC_CONFIG_HEADERS([include/config.h] [include/geos/platform.h])
+AC_CONFIG_HEADERS([include/config.h])
 AC_PROG_CC
 
 dnl -- JTS_PORT: the version of JTS this release is bound to
diff --git a/doc/example.cpp b/doc/example.cpp
index 32129a0..799ac4a 100644
--- a/doc/example.cpp
+++ b/doc/example.cpp
@@ -48,15 +48,12 @@
 #include <geos/util/IllegalArgumentException.h>
 #include <geos/opLinemerge.h>
 #include <geos/opPolygonize.h>
+#include <geos/constants.h>
 #include <vector>
 #include <sstream>
 #include <iomanip>
 #include <cstdlib> // exit()
 
-#ifndef M_PI
-#define M_PI       3.14159265358979323846
-#endif
-
 // Set to 0 to skip section
 #define GEOMETRIC_SHAPES 1
 #define RELATIONAL_OPERATORS 1
diff --git a/include/CMakeLists.txt b/include/CMakeLists.txt
index 159ea4c..293e5dc 100644
--- a/include/CMakeLists.txt
+++ b/include/CMakeLists.txt
@@ -6,7 +6,7 @@
 #
 # This is free software; you can redistribute and/or modify it under
 # the terms of the GNU Lesser General Public Licence as published
-# by the Free Software Foundation. 
+# by the Free Software Foundation.
 # See the COPYING file for more information.
 #
 #################################################################################
@@ -28,9 +28,6 @@ endif()
 install(FILES geos.h
   DESTINATION ${installdest})
 
-install(FILES ${CMAKE_CURRENT_BINARY_DIR}/geos/platform.h
-  DESTINATION ${installdest})
-
 install(FILES ${CMAKE_CURRENT_BINARY_DIR}/geos/version.h
   DESTINATION ${installdest})
 
@@ -44,10 +41,10 @@ install(DIRECTORY geos/
 # Some post-processing for the framework
 # luckily GEOS uses header subdir already, just need to change case
 if(APPLE AND GEOS_ENABLE_MACOSX_FRAMEWORK)
-  install(CODE 
-    "execute_process(COMMAND find \"$ENV{DESTDIR}${CMAKE_INSTALL_PREFIX}/${installdest}\" -name *.* -print0 
+  install(CODE
+    "execute_process(COMMAND find \"$ENV{DESTDIR}${CMAKE_INSTALL_PREFIX}/${installdest}\" -name *.* -print0
     COMMAND xargs -0 sed -E -i \"\" \"s,# *include[[:space:]]+<geos/,#include <GEOS/,g\")")
-  install(CODE 
+  install(CODE
     "execute_process(COMMAND ln -sfh Versions/Current/Headers \"$ENV{DESTDIR}${CMAKE_INSTALL_PREFIX}/GEOS.framework/Headers\")")
 endif()
 
diff --git a/include/geos/Makefile.am b/include/geos/Makefile.am
index 3a01905..f9fe788 100644
--- a/include/geos/Makefile.am
+++ b/include/geos/Makefile.am
@@ -1,5 +1,5 @@
 #
-# This file is part of project GEOS (http://trac.osgeo.org/geos/) 
+# This file is part of project GEOS (http://trac.osgeo.org/geos/)
 #
 SUBDIRS = \
     algorithm \
@@ -16,11 +16,12 @@ SUBDIRS = \
     triangulate \
     util
 
-EXTRA_DIST = version.h.vc platform.h.vc platform.h.cmake
+EXTRA_DIST = version.h.vc
 
 geosdir = $(includedir)/geos
 
 geos_HEADERS = \
+    constants.h \
     export.h \
     geomgraph.h \
     geomgraphindex.h \
@@ -54,5 +55,4 @@ geos_HEADERS = \
     util.h
 
 nodist_geos_HEADERS = \
-    version.h \
-    platform.h
+    version.h
diff --git a/include/geos/algorithm/distance/PointPairDistance.h b/include/geos/algorithm/distance/PointPairDistance.h
index e266faa..6c4bc62 100644
--- a/include/geos/algorithm/distance/PointPairDistance.h
+++ b/include/geos/algorithm/distance/PointPairDistance.h
@@ -19,7 +19,7 @@
 #ifndef GEOS_ALGORITHM_DISTANCE_POINTPAIRDISTANCE_H
 #define GEOS_ALGORITHM_DISTANCE_POINTPAIRDISTANCE_H
 
-#include <geos/platform.h> // for DoubleNotANumber
+#include <geos/constants.h> // for DoubleNotANumber
 #include <geos/geom/Coordinate.h> // for inlines
 
 #include <vector> // for composition
diff --git a/include/geos/platform.h.cmake b/include/geos/constants.h
similarity index 69%
rename from include/geos/platform.h.cmake
rename to include/geos/constants.h
index c6330bf..8a07b28 100644
--- a/include/geos/platform.h.cmake
+++ b/include/geos/constants.h
@@ -1,6 +1,6 @@
 /**********************************************************************
  *
- * platform.h - generated by CMake from platform.h.cmake
+ * constants.h
  *
  * GEOS - Geometry Engine Open Source
  * http://geos.osgeo.org
@@ -17,38 +17,31 @@
  *
  *********************************************************************/
 
-#ifndef GEOS_PLATFORM_H_INCLUDED
-#define GEOS_PLATFORM_H_INCLUDED
+#ifndef INCLUDE_GEOS_CONSTANTS_H_
+#define INCLUDE_GEOS_CONSTANTS_H_
 
 #ifdef _MSC_VER
 #ifndef NOMINMAX
 #define NOMINMAX 1
+typedef __int64 int64;
 #endif
 #endif
 
-/* Disable inclusion of platform.h not generated by CMake */
-#define GEOS_PLATFORM_H 1
-
-/* Set to 1 if you have ieeefp.h */
-#cmakedefine HAVE_IEEEFP_H 1
-
-#ifdef _MSC_VER
-#  define _USE_MATH_DEFINES
-#endif
 #include <cmath>
 #include <limits>
 #include <cinttypes>
 
 
-
-#ifndef M_PI
-#define M_PI 3.14159265358979323846
+#ifdef M_PI
+#undef M_PI
 #endif
-
 typedef int64_t int64;
 
-#define ISNAN(x) std::isnan(x)
-#define FINITE(x) std::isfinite(x)
+namespace geos {
+
+constexpr double M_PI = 3.14159265358979323846;
+
+
 
 // Some handy constants
 constexpr double DoubleNotANumber = std::numeric_limits<double>::quiet_NaN();
@@ -56,6 +49,7 @@ constexpr double DoubleMax = (std::numeric_limits<double>::max)();
 constexpr double DoubleInfinity = (std::numeric_limits<double>::infinity)();
 constexpr double DoubleNegInfinity = (-(std::numeric_limits<double>::infinity)());
 
+}  // namespace geos
 
 
-#endif // GEOS_PLATFORM_H_INCLUDED
+#endif  // INCLUDE_GEOS_CONSTANTS_H_
diff --git a/include/geos/geom/Coordinate.h b/include/geos/geom/Coordinate.h
index eb0f9db..945ab7b 100644
--- a/include/geos/geom/Coordinate.h
+++ b/include/geos/geom/Coordinate.h
@@ -16,7 +16,7 @@
 #define GEOS_GEOM_COORDINATE_H
 
 #include <geos/export.h>
-#include <geos/platform.h> // for DoubleNotANumber
+#include <geos/constants.h> // for DoubleNotANumber
 #include <geos/inline.h>
 #include <set>
 #include <stack>
diff --git a/include/geos/geom/Coordinate.inl b/include/geos/geom/Coordinate.inl
index 7920140..46ea94d 100644
--- a/include/geos/geom/Coordinate.inl
+++ b/include/geos/geom/Coordinate.inl
@@ -7,7 +7,7 @@
  *
  * This is free software; you can redistribute and/or modify it under
  * the terms of the GNU Lesser General Public Licence as published
- * by the Free Software Foundation. 
+ * by the Free Software Foundation.
  * See the COPYING file for more information.
  *
  **********************************************************************/
@@ -16,7 +16,7 @@
 #define GEOS_GEOM_COORDINATE_INL
 
 #include <geos/geom/Coordinate.h>
-#include <geos/platform.h> // for DoubleNotANumber
+#include <geos/constants.h> // for DoubleNotANumber
 
 #include <cassert>
 #include <cmath>
@@ -35,7 +35,7 @@ Coordinate::setNull()
 INLINE bool
 Coordinate::isNull() const
 {
-	return (ISNAN(x) && ISNAN(y) && ISNAN(z));
+	return (std::isnan(x) && std::isnan(y) && std::isnan(z));
 }
 
 INLINE
@@ -73,8 +73,8 @@ Coordinate::compareTo(const Coordinate& other) const
 INLINE bool
 Coordinate::equals3D(const Coordinate& other) const
 {
-	return (x == other.x) && ( y == other.y) && 
-		((z == other.z)||(ISNAN(z) && ISNAN(other.z)));
+	return (x == other.x) && ( y == other.y) &&
+		((z == other.z)||(std::isnan(z) && std::isnan(other.z)));
 }
 
 INLINE double
diff --git a/include/geos/geom/CoordinateSequence.h b/include/geos/geom/CoordinateSequence.h
index c6e3e30..30e5491 100644
--- a/include/geos/geom/CoordinateSequence.h
+++ b/include/geos/geom/CoordinateSequence.h
@@ -16,7 +16,6 @@
 #define GEOS_GEOM_COORDINATESEQUENCE_H
 
 #include <geos/export.h>
-#include <geos/platform.h>
 #include <geos/inline.h>
 
 #include <geos/geom/Coordinate.h> // for applyCoordinateFilter
diff --git a/include/geos/geom/Geometry.h b/include/geos/geom/Geometry.h
index d9cf497..4e01b46 100644
--- a/include/geos/geom/Geometry.h
+++ b/include/geos/geom/Geometry.h
@@ -32,7 +32,6 @@
 #endif
 
 #include <geos/export.h>
-#include <geos/platform.h>
 #include <geos/inline.h>
 #include <geos/geom/Envelope.h>
 #include <geos/geom/Dimension.h> // for Dimension::DimensionType
diff --git a/include/geos/geom/GeometryCollection.h b/include/geos/geom/GeometryCollection.h
index 16310a0..b108837 100644
--- a/include/geos/geom/GeometryCollection.h
+++ b/include/geos/geom/GeometryCollection.h
@@ -22,7 +22,6 @@
 
 #include <geos/export.h>
 #include <geos/geom/Geometry.h> // for inheritance
-//#include <geos/platform.h>
 #include <geos/geom/Envelope.h> // for proper use of unique_ptr<>
 #include <geos/geom/Dimension.h> // for Dimension::DimensionType
 
diff --git a/include/geos/geom/GeometryFilter.h b/include/geos/geom/GeometryFilter.h
index 164cdb2..9bbaa5f 100644
--- a/include/geos/geom/GeometryFilter.h
+++ b/include/geos/geom/GeometryFilter.h
@@ -16,7 +16,6 @@
 #ifndef GEOS_GEOM_GEOMETRYFILTER_H
 #define GEOS_GEOM_GEOMETRYFILTER_H
 
-//#include <geos/platform.h>
 #include <geos/export.h>
 #include <geos/inline.h>
 
diff --git a/include/geos/geom/LineString.h b/include/geos/geom/LineString.h
index 00aff7c..25bc13d 100644
--- a/include/geos/geom/LineString.h
+++ b/include/geos/geom/LineString.h
@@ -22,7 +22,6 @@
 #define GEOS_GEOS_LINESTRING_H
 
 #include <geos/export.h>
-#include <geos/platform.h> // do we need this ?
 #include <geos/geom/Geometry.h> // for inheritance
 #include <geos/geom/Lineal.h> // for inheritance
 #include <geos/geom/CoordinateSequence.h> // for proper use of unique_ptr<>
diff --git a/include/geos/geom/LinearRing.h b/include/geos/geom/LinearRing.h
index 9303f42..71ef6f2 100644
--- a/include/geos/geom/LinearRing.h
+++ b/include/geos/geom/LinearRing.h
@@ -23,7 +23,6 @@
 #include <geos/export.h>
 #include <string>
 #include <vector>
-#include <geos/platform.h>
 #include <geos/geom/LineString.h>
 
 #include <geos/inline.h>
diff --git a/include/geos/geom/MultiPoint.h b/include/geos/geom/MultiPoint.h
index 8e35394..bc4fbf0 100644
--- a/include/geos/geom/MultiPoint.h
+++ b/include/geos/geom/MultiPoint.h
@@ -22,7 +22,6 @@
 #define GEOS_GEOS_MULTIPOINT_H
 
 #include <geos/export.h>
-#include <geos/platform.h>
 #include <geos/geom/GeometryCollection.h> // for inheritance
 #include <geos/geom/Puntal.h> // for inheritance
 #include <geos/geom/Dimension.h> // for Dimension::DimensionType
diff --git a/include/geos/geom/MultiPolygon.h b/include/geos/geom/MultiPolygon.h
index b270947..77771ee 100644
--- a/include/geos/geom/MultiPolygon.h
+++ b/include/geos/geom/MultiPolygon.h
@@ -24,7 +24,6 @@
 #include <geos/export.h>
 #include <string>
 #include <vector>
-#include <geos/platform.h>
 #include <geos/geom/GeometryCollection.h> // for inheritance
 #include <geos/geom/Polygonal.h> // for inheritance
 #include <geos/geom/Dimension.h> // for Dimension::DimensionType
diff --git a/include/geos/geom/Point.h b/include/geos/geom/Point.h
index 754f1b0..e93990c 100644
--- a/include/geos/geom/Point.h
+++ b/include/geos/geom/Point.h
@@ -22,7 +22,6 @@
 #define GEOS_GEOS_POINT_H
 
 #include <geos/export.h>
-#include <geos/platform.h>
 #include <geos/geom/Geometry.h> // for inheritance
 #include <geos/geom/Puntal.h> // for inheritance
 #include <geos/geom/CoordinateSequence.h> // for proper use of unique_ptr<>
diff --git a/include/geos/geom/Polygon.h b/include/geos/geom/Polygon.h
index 8874db2..1c46dc4 100644
--- a/include/geos/geom/Polygon.h
+++ b/include/geos/geom/Polygon.h
@@ -24,7 +24,6 @@
 #include <geos/export.h>
 #include <string>
 #include <vector>
-#include <geos/platform.h>
 #include <geos/geom/Geometry.h> // for inheritance
 #include <geos/geom/Polygonal.h> // for inheritance
 #include <geos/geom/Envelope.h> // for proper use of unique_ptr<>
diff --git a/include/geos/geom/util/ComponentCoordinateExtracter.h b/include/geos/geom/util/ComponentCoordinateExtracter.h
index 5224dfe..dc86bd4 100644
--- a/include/geos/geom/util/ComponentCoordinateExtracter.h
+++ b/include/geos/geom/util/ComponentCoordinateExtracter.h
@@ -23,7 +23,6 @@
 #include <geos/geom/Coordinate.h> // to be removed when we have the .inl
 #include <geos/geom/LineString.h> // to be removed when we have the .inl
 #include <geos/geom/Point.h> // to be removed when we have the .inl
-//#include <geos/platform.h>
 
 namespace geos {
 namespace geom { // geos::geom
diff --git a/include/geos/geom/util/GeometryExtracter.h b/include/geos/geom/util/GeometryExtracter.h
index 1cd33c9..89073c6 100644
--- a/include/geos/geom/util/GeometryExtracter.h
+++ b/include/geos/geom/util/GeometryExtracter.h
@@ -24,7 +24,6 @@
 #include <geos/export.h>
 #include <geos/geom/GeometryFilter.h>
 #include <geos/geom/GeometryCollection.h>
-#include <geos/platform.h>
 #include <vector>
 
 namespace geos {
diff --git a/include/geos/geom/util/LinearComponentExtracter.h b/include/geos/geom/util/LinearComponentExtracter.h
index 66a4e52..1c0756f 100644
--- a/include/geos/geom/util/LinearComponentExtracter.h
+++ b/include/geos/geom/util/LinearComponentExtracter.h
@@ -23,7 +23,6 @@
 #include <geos/geom/GeometryComponentFilter.h>
 #include <geos/geom/Geometry.h> // to be removed when we have the .inl
 #include <geos/geom/LineString.h> // to be removed when we have the .inl
-//#include <geos/platform.h>
 
 namespace geos {
 namespace geom { // geos.geom
diff --git a/include/geos/geom/util/PointExtracter.h b/include/geos/geom/util/PointExtracter.h
index 9b7ba08..df4c3d6 100644
--- a/include/geos/geom/util/PointExtracter.h
+++ b/include/geos/geom/util/PointExtracter.h
@@ -19,7 +19,6 @@
 #include <geos/export.h>
 #include <geos/geom/GeometryFilter.h>
 #include <geos/geom/Point.h>
-#include <geos/platform.h>
 #include <vector>
 
 namespace geos {
diff --git a/include/geos/geom/util/PolygonExtracter.h b/include/geos/geom/util/PolygonExtracter.h
index 049a40d..176aa2c 100644
--- a/include/geos/geom/util/PolygonExtracter.h
+++ b/include/geos/geom/util/PolygonExtracter.h
@@ -19,7 +19,6 @@
 #include <geos/export.h>
 #include <geos/geom/GeometryFilter.h>
 #include <geos/geom/Polygon.h>
-#include <geos/platform.h>
 #include <vector>
 
 namespace geos {
diff --git a/include/geos/index/intervalrtree/IntervalRTreeNode.h b/include/geos/index/intervalrtree/IntervalRTreeNode.h
index 3f49615..1dfa07b 100644
--- a/include/geos/index/intervalrtree/IntervalRTreeNode.h
+++ b/include/geos/index/intervalrtree/IntervalRTreeNode.h
@@ -16,7 +16,7 @@
 #ifndef GEOS_INDEX_INTERVALRTREE_INTERVALRTREENODE_H
 #define GEOS_INDEX_INTERVALRTREE_INTERVALRTREENODE_H
 
-#include <geos/platform.h>
+#include <geos/constants.h>
 #include <vector>
 #include <limits>
 
diff --git a/include/geos/index/quadtree/DoubleBits.h b/include/geos/index/quadtree/DoubleBits.h
index b46e10f..6972a98 100644
--- a/include/geos/index/quadtree/DoubleBits.h
+++ b/include/geos/index/quadtree/DoubleBits.h
@@ -20,7 +20,7 @@
 #define GEOS_IDX_QUADTREE_DOUBLEBITS_H
 
 #include <geos/export.h>
-#include <geos/platform.h> // for int64
+#include <geos/constants.h> // for int64
 
 #include <string>
 
diff --git a/include/geos/io/ByteOrderDataInStream.h b/include/geos/io/ByteOrderDataInStream.h
index 9cac179..8596b56 100644
--- a/include/geos/io/ByteOrderDataInStream.h
+++ b/include/geos/io/ByteOrderDataInStream.h
@@ -22,7 +22,6 @@
 
 #include <geos/export.h>
 
-//#include <geos/platform.h>
 //#include <geos/io/ParseException.h>
 //#include <geos/io/ByteOrderValues.h>
 #include <geos/inline.h>
diff --git a/include/geos/io/ByteOrderValues.h b/include/geos/io/ByteOrderValues.h
index 2777b6c..c7394ed 100644
--- a/include/geos/io/ByteOrderValues.h
+++ b/include/geos/io/ByteOrderValues.h
@@ -21,7 +21,7 @@
 #define GEOS_IO_BYTEORDERVALUES_H
 
 #include <geos/export.h>
-#include <geos/platform.h>
+#include <geos/constants.h>
 
 namespace geos {
 namespace io {
diff --git a/include/geos/platform.h.in b/include/geos/platform.h.in
deleted file mode 100644
index e2cfbf2..0000000
--- a/include/geos/platform.h.in
+++ /dev/null
@@ -1,116 +0,0 @@
-#ifndef GEOS_PLATFORM_H
-#define GEOS_PLATFORM_H
-
-/* Set to 1 if you have `int64_t' type */
-#undef HAVE_INT64_T_64
-
-/* Set to 1 if `long int' is 64 bits */
-#undef HAVE_LONG_INT_64
-
-/* Set to 1 if `long long int' is 64 bits */
-#undef HAVE_LONG_LONG_INT_64
-
-/* Set to 1 if you have ieeefp.h */
-#undef HAVE_IEEEFP_H
-
-/* Has finite */
-#undef HAVE_FINITE
-
-/* Has isfinite */
-#undef HAVE_ISFINITE
-
-/* Has isnan */
-#undef HAVE_ISNAN
-
-#ifdef HAVE_IEEEFP_H
-extern "C"
-{
-#include <ieeefp.h>
-}
-#endif
-
-#ifdef HAVE_INT64_T_64
-extern "C"
-{
-#include <inttypes.h>
-}
-#endif
-
-#if defined(__GNUC__) && defined(_WIN32)
-/* For MingW the appropriate definitions are included in
- math.h and float.h but the definitions in
- math.h are only included if __STRICT_ANSI__
- is not defined.  Since GEOS is compiled with -ansi that
- means those definitions are not available. */
-#include <float.h>
-#endif
-
-#include <limits> // for std::numeric_limits
-
-
-
-//Defines NaN for intel platforms
-#define DoubleNotANumber std::numeric_limits<double>::quiet_NaN()
-
-//Don't forget to define infinities
-#define DoubleInfinity std::numeric_limits<double>::infinity()
-#define DoubleNegInfinity -std::numeric_limits<double>::infinity()
-
-#define DoubleMax std::numeric_limits<double>::max()
-
-#ifdef HAVE_INT64_T_64
-  typedef int64_t int64;
-#else
-# ifdef HAVE_LONG_LONG_INT_64
-   typedef long long int int64;
-# else
-   typedef long int int64;
-#  ifndef HAVE_LONG_INT_64
-#   define INT64_IS_REALLY32 1
-#   warning "Could not find 64bit integer definition!"
-#  endif
-# endif
-#endif
-
-
-#if defined(HAVE_FINITE) && !defined(HAVE_ISFINITE)
-# define FINITE(x) (finite(x))
-#else
-# if defined(_MSC_VER)
-#  define FINITE(x) _finite(static_cast<double>(x))
-# elif defined(__hpux__) && defined(__ia64__)
-#  define FINITE(x) (_Isfinite(x))
-# else
-#  define FINITE(x) (std::isfinite(x))
-# endif
-#endif
-
-#if defined(HAVE_ISNAN)
-# define ISNAN(x) (std::isnan(x))
-#else
-# if defined(_MSC_VER)
-#  define ISNAN(x) _isnan(x)
-# elif defined(__MINGW32__) || defined(__CYGWIN__)
-// sandro furieri: sanitizing MinGW32
-#  define ISNAN(x) (std::isnan(x))
-# elif defined(__OSX__) || defined(__APPLE__) || \
-       defined(__NetBSD__) || defined(__DragonFly__) || defined (__OpenBSD__) || \
-       (defined(__sun) && defined(__GNUC__))
-   // Hack for OS/X <cmath> incorrectly re-defining isnan() into oblivion.
-   // It does leave a version in std.
-#  define ISNAN(x) (std::isnan(x))
-# elif (defined(__sun) || defined(__sun__)) && defined(__SUNPRO_CC)
-#  include <math.h>
-#  define ISNAN(x) (::isnan(x))
-# endif
-#endif
-
-#ifndef FINITE
-#error "Can not compile without finite or isfinite function or macro"
-#endif
-
-#ifndef ISNAN
-#error "Can not compile without isnan function or macro"
-#endif
-
-#endif
diff --git a/include/geos/platform.h.vc b/include/geos/platform.h.vc
deleted file mode 100755
index a4fd567..0000000
--- a/include/geos/platform.h.vc
+++ /dev/null
@@ -1,60 +0,0 @@
-/**********************************************************************
- *
- * GEOS - Geometry Engine Open Source
- * http://geos.osgeo.org
- *
- * Copyright (C) 2001-2004 Vivid Solutions Inc.
- *
- * This is free software; you can redistribute and/or modify it under
- * the terms of the GNU Lesser General Public Licence as published
- * by the Free Software Foundation. 
- * See the COPYING file for more information.
- *
- **********************************************************************
- * Manually created platform.h for use with x86 Microsoft Visual C++
- */
-
-#ifndef GEOS_PLATFORM_H
-#define GEOS_PLATFORM_H
-
-#ifndef _MSC_VER
-#error "This platform.h intended for use with MS Visual C++"
-#endif
-
-#ifndef WIN32
-#define WIN32
-#endif
-
-#ifndef NOMINMAX
-#define NOMINMAX
-#endif
-
-#include <float.h>
-
-// We need M_PI, but on MSVC you need to define _USE_MATH_DEFINES before
-// including math.h to get it.  If we are too late (math.h already included)
-// we will define it manually.
-#define _USE_MATH_DEFINES
-#include <math.h>
-
-#ifndef M_PI
-#define M_PI       3.14159265358979323846
-#endif
-
-//Defines NaN for intel platforms
-#define DoubleNotANumber std::numeric_limits<double>::quiet_NaN()
-
-#define ISNAN(x)  _isnan(x)
-
-//Don't forget to define infinities
-#define DoubleInfinity std::numeric_limits<double>::infinity()
-#define DoubleNegInfinity -std::numeric_limits<double>::infinity()
-
-#define DoubleMax (std::numeric_limits<double>::max)()
-
-#define FINITE(x) _finite(static_cast<double>(x))
-#define finite(x) _finite(static_cast<double>(x))
-
-typedef __int64 int64;
-
-#endif
diff --git a/include/geos/precision/CommonBits.h b/include/geos/precision/CommonBits.h
index 66c12a7..10637bd 100644
--- a/include/geos/precision/CommonBits.h
+++ b/include/geos/precision/CommonBits.h
@@ -16,7 +16,7 @@
 #define GEOS_PRECISION_COMMONBITS_H
 
 #include <geos/export.h>
-#include <geos/platform.h> // for int64
+#include <geos/constants.h> // for int64
 
 namespace geos {
 namespace precision { // geos.precision
diff --git a/include/geos/precision/EnhancedPrecisionOp.h b/include/geos/precision/EnhancedPrecisionOp.h
index 0bbeb0e..50f691e 100644
--- a/include/geos/precision/EnhancedPrecisionOp.h
+++ b/include/geos/precision/EnhancedPrecisionOp.h
@@ -20,7 +20,7 @@
 #define GEOS_PRECISION_ENHANCEDPRECISIONOP_H
 
 #include <geos/export.h>
-#include <geos/platform.h> // for int64
+#include <geos/constants.h> // for int64
 
 // Forward declarations
 namespace geos {
diff --git a/src/Makefile.vc b/src/Makefile.vc
deleted file mode 100644
index 28beef0..0000000
--- a/src/Makefile.vc
+++ /dev/null
@@ -1,394 +0,0 @@
-#
-# Building on Win32 with Visual C++ 7.0, 7.1, 8.0 or 9.0
-###############################################################################
-#
-# Produces:
-#  geos.lib: static library for use of C or C++ API.
-#  geos.dll: DLL - only exports the C API
-#  geos_i.lib: stub library to link against for use of geos.dll.
-#
-#  geos_d.lib: debug static library for use of C or C++ API.
-#  geos_d.dll: debug DLL - only exports the C API
-#  geos_i_d.lib: debug stub library to link against for use of geos.dll.
-#
-# This makefile mostly maintained by Frank Warmerdam <warmerdam at pobox.com>
-# with support by Mateusz Loskot <mateusz at loskot.net>
-###############################################################################
-GEOS_ROOT=..
-!INCLUDE $(GEOS_ROOT)\nmake.opt
-!INCLUDE dirlist.mk
-
-###############################################################################
-# Output location
-# TODO: not yet supported
-#OUT_DIR = $(GEOS_ROOT)\bin\$(BUILD_DIR)
-
-###############################################################################
-# List of objects
-
-OBJ_EXT = obj
-EXT = $(OBJ_EXT)
-
-OBJ = \
-	algorithm\Angle.$(EXT) \
-	algorithm\BoundaryNodeRule.$(EXT) \
-	algorithm\Centroid.$(EXT) \
-	algorithm\CGAlgorithms.$(EXT) \
-	algorithm\ConvexHull.$(EXT) \
-	algorithm\HCoordinate.$(EXT) \
-	algorithm\InteriorPointArea.$(EXT) \
-	algorithm\InteriorPointLine.$(EXT) \
-	algorithm\InteriorPointPoint.$(EXT) \
-	algorithm\LineIntersector.$(EXT) \
-	algorithm\MinimumDiameter.$(EXT) \
-	algorithm\NotRepresentableException.$(EXT) \
-	algorithm\PointLocator.$(EXT) \
-	algorithm\RayCrossingCounter.$(EXT) \
-	algorithm\RobustDeterminant.$(EXT) \
-	algorithm\distance\DiscreteHausdorffDistance.$(EXT) \
-	algorithm\distance\DiscreteFrechetDistance.$(EXT) \
-	algorithm\distance\DistanceToPoint.$(EXT) \
-	algorithm\locate\IndexedPointInAreaLocator.$(EXT) \
-	algorithm\locate\PointOnGeometryLocator.$(EXT) \
-	algorithm\locate\SimplePointInAreaLocator.$(EXT) \
-	geom\Coordinate.$(EXT) \
-	geom\CoordinateArraySequence.$(EXT) \
-	geom\CoordinateArraySequenceFactory.$(EXT) \
-	geom\CoordinateSequence.$(EXT) \
-	geom\CoordinateSequenceFactory.$(EXT) \
-	geom\Dimension.$(EXT) \
-	geom\Envelope.$(EXT) \
-	geom\Geometry.$(EXT) \
-	geom\GeometryCollection.$(EXT) \
-	geom\GeometryComponentFilter.$(EXT) \
-	geom\GeometryFactory.$(EXT) \
-	geom\IntersectionMatrix.$(EXT) \
-	geom\LinearRing.$(EXT) \
-	geom\LineSegment.$(EXT) \
-	geom\LineString.$(EXT) \
-	geom\Location.$(EXT) \
-	geom\MultiLineString.$(EXT) \
-	geom\MultiPoint.$(EXT) \
-	geom\MultiPolygon.$(EXT) \
-	geom\Point.$(EXT) \
-	geom\Polygon.$(EXT) \
-	geom\PrecisionModel.$(EXT) \
-	geom\Triangle.$(EXT) \
-	geom\util\ComponentCoordinateExtracter.$(EXT) \
-	geom\util\CoordinateOperation.$(EXT) \
-	geom\util\GeometryEditor.$(EXT) \
-	geom\util\GeometryTransformer.$(EXT) \
-	geom\util\GeometryCombiner.$(EXT) \
-	geom\util\ShortCircuitedGeometryVisitor.$(EXT) \
-	geom\util\SineStarFactory.$(EXT) \
-	geom\util\LinearComponentExtracter.$(EXT) \
-	geom\util\PolygonExtracter.$(EXT) \
-	geom\util\PointExtracter.$(EXT) \
-	geom\prep\AbstractPreparedPolygonContains.$(EXT) \
-	geom\prep\BasicPreparedGeometry.$(EXT) \
-	geom\prep\PreparedGeometry.$(EXT) \
-	geom\prep\PreparedGeometryFactory.$(EXT) \
-	geom\prep\PreparedLineString.$(EXT) \
-	geom\prep\PreparedLineStringIntersects.$(EXT) \
-	geom\prep\PreparedPoint.$(EXT) \
-	geom\prep\PreparedPolygon.$(EXT) \
-	geom\prep\PreparedPolygonContains.$(EXT) \
-	geom\prep\PreparedPolygonContainsProperly.$(EXT) \
-	geom\prep\PreparedPolygonCovers.$(EXT) \
-	geom\prep\PreparedPolygonIntersects.$(EXT) \
-	geom\prep\PreparedPolygonPredicate.$(EXT) \
-	geomgraph\Depth.$(EXT) \
-	geomgraph\DirectedEdge.$(EXT) \
-	geomgraph\DirectedEdgeStar.$(EXT) \
-	geomgraph\Edge.$(EXT) \
-	geomgraph\EdgeEnd.$(EXT) \
-	geomgraph\EdgeEndStar.$(EXT) \
-	geomgraph\EdgeIntersectionList.$(EXT) \
-	geomgraph\EdgeList.$(EXT) \
-	geomgraph\EdgeNodingValidator.$(EXT) \
-	geomgraph\EdgeRing.$(EXT) \
-	geomgraph\GeometryGraph.$(EXT) \
-	geomgraph\GraphComponent.$(EXT) \
-	geomgraph\Label.$(EXT) \
-	geomgraph\Node.$(EXT) \
-	geomgraph\NodeFactory.$(EXT) \
-	geomgraph\NodeMap.$(EXT) \
-	geomgraph\PlanarGraph.$(EXT) \
-	geomgraph\Position.$(EXT) \
-	geomgraph\Quadrant.$(EXT) \
-	geomgraph\TopologyLocation.$(EXT) \
-	geomgraph\index\MonotoneChainEdge.$(EXT) \
-	geomgraph\index\MonotoneChainIndexer.$(EXT) \
-	geomgraph\index\SegmentIntersector.$(EXT) \
-	geomgraph\index\SimpleEdgeSetIntersector.$(EXT) \
-	geomgraph\index\SimpleMCSweepLineIntersector.$(EXT) \
-	geomgraph\index\SimpleSweepLineIntersector.$(EXT) \
-	geomgraph\index\SweepLineEvent.$(EXT) \
-	geomgraph\index\SweepLineSegment.$(EXT) \
-	index\bintree\Bintree.$(EXT) \
-	index\bintree\Interval.$(EXT) \
-	index\bintree\Key.$(EXT) \
-	index\bintree\Node.$(EXT) \
-	index\bintree\NodeBase.$(EXT) \
-	index\bintree\Root.$(EXT) \
-	index\chain\MonotoneChain.$(EXT) \
-	index\chain\MonotoneChainBuilder.$(EXT) \
-	index\chain\MonotoneChainOverlapAction.$(EXT) \
-	index\chain\MonotoneChainSelectAction.$(EXT) \
-	index\intervalrtree\IntervalRTreeBranchNode.$(EXT) \
-	index\intervalrtree\IntervalRTreeLeafNode.$(EXT) \
-	index\intervalrtree\SortedPackedIntervalRTree.$(EXT) \
-	index\quadtree\DoubleBits.$(EXT) \
-	index\quadtree\IntervalSize.$(EXT) \
-	index\quadtree\Key.$(EXT) \
-	index\quadtree\Node.$(EXT) \
-	index\quadtree\NodeBase.$(EXT) \
-	index\quadtree\Root.$(EXT) \
-	index\quadtree\Quadtree.$(EXT) \
-	index\strtree\AbstractNode.$(EXT) \
-	index\strtree\AbstractSTRtree.$(EXT) \
-	index\strtree\BoundablePair.$(EXT) \
-	index\strtree\GeometryItemDistance.$(EXT) \
-	index\strtree\Interval.$(EXT) \
-	index\strtree\ItemBoundable.$(EXT) \
-	index\strtree\SIRtree.$(EXT) \
-	index\strtree\STRtree.$(EXT) \
-	index\sweepline\SweepLineEvent.$(EXT) \
-	index\sweepline\SweepLineIndex.$(EXT) \
-	index\sweepline\SweepLineInterval.$(EXT) \
-	io\ByteOrderDataInStream.$(EXT) \
-	io\ByteOrderValues.$(EXT) \
-	io\CLocalizer.$(EXT) \
-	io\ParseException.$(EXT) \
-	io\StringTokenizer.$(EXT) \
-	io\Unload.$(EXT) \
-	io\WKBReader.$(EXT) \
-	io\WKBWriter.$(EXT) \
-	io\WKTReader.$(EXT) \
-	io\WKTWriter.$(EXT) \
-	io\Writer.$(EXT) \
-	noding\BasicSegmentString.$(EXT) \
-	noding\FastNodingValidator.$(EXT) \
-	noding\FastSegmentSetIntersectionFinder.$(EXT) \
-	noding\GeometryNoder.$(EXT) \
-	noding\IntersectionAdder.$(EXT) \
-	noding\IntersectionFinderAdder.$(EXT) \
-	noding\IteratedNoder.$(EXT) \
-	noding\MCIndexNoder.$(EXT) \
-	noding\MCIndexSegmentSetMutualIntersector.$(EXT) \
-	noding\NodedSegmentString.$(EXT) \
-	noding\NodingValidator.$(EXT) \
-	noding\Octant.$(EXT) \
-	noding\OrientedCoordinateArray.$(EXT) \
-	noding\ScaledNoder.$(EXT) \
-	noding\SegmentIntersectionDetector.$(EXT) \
-	noding\SegmentNode.$(EXT) \
-	noding\SegmentNodeList.$(EXT) \
-	noding\SegmentString.$(EXT) \
-	noding\SegmentStringUtil.$(EXT) \
-	noding\SimpleNoder.$(EXT) \
-	noding\NodingIntersectionFinder.$(EXT) \
-	noding\snapround\HotPixel.$(EXT) \
-	noding\snapround\MCIndexPointSnapper.$(EXT) \
-	noding\snapround\MCIndexSnapRounder.$(EXT) \
-	noding\snapround\SimpleSnapRounder.$(EXT) \
-	operation\GeometryGraphOperation.$(EXT) \
-	operation\IsSimpleOp.$(EXT) \
-	operation\buffer\BufferBuilder.$(EXT) \
-	operation\buffer\BufferInputLineSimplifier.$(EXT) \
-	operation\buffer\BufferParameters.$(EXT) \
-	operation\buffer\BufferOp.$(EXT) \
-	operation\buffer\BufferSubgraph.$(EXT) \
-	operation\buffer\OffsetCurveBuilder.$(EXT) \
-	operation\buffer\OffsetCurveSetBuilder.$(EXT) \
-	operation\buffer\OffsetSegmentGenerator.$(EXT) \
-	operation\buffer\RightmostEdgeFinder.$(EXT) \
-	operation\buffer\SubgraphDepthLocater.$(EXT) \
-	operation\distance\ConnectedElementLocationFilter.$(EXT) \
-	operation\distance\ConnectedElementPointFilter.$(EXT) \
-	operation\distance\DistanceOp.$(EXT) \
-	operation\distance\FacetSequence.$(EXT) \
-	operation\distance\FacetSequenceTreeBuilder.$(EXT) \
-	operation\distance\GeometryLocation.$(EXT) \
-	operation\distance\IndexedFacetDistance.$(EXT) \
-	operation\intersection\Rectangle.$(EXT) \
-	operation\intersection\RectangleIntersection.$(EXT) \
-	operation\intersection\RectangleIntersectionBuilder.$(EXT) \
-	operation\linemerge\EdgeString.$(EXT) \
-	operation\linemerge\LineMergeDirectedEdge.$(EXT) \
-	operation\linemerge\LineMergeEdge.$(EXT) \
-	operation\linemerge\LineMergeGraph.$(EXT) \
-	operation\linemerge\LineMerger.$(EXT) \
-	operation\linemerge\LineSequencer.$(EXT) \
-	operation\overlay\EdgeSetNoder.$(EXT) \
-	operation\overlay\ElevationMatrix.$(EXT) \
-	operation\overlay\ElevationMatrixCell.$(EXT) \
-	operation\overlay\LineBuilder.$(EXT) \
-	operation\overlay\MaximalEdgeRing.$(EXT) \
-	operation\overlay\MinimalEdgeRing.$(EXT) \
-	operation\overlay\OverlayNodeFactory.$(EXT) \
-	operation\overlay\OverlayOp.$(EXT) \
-	operation\overlay\PointBuilder.$(EXT) \
-	operation\overlay\PolygonBuilder.$(EXT) \
-	operation\overlay\snap\GeometrySnapper.$(EXT) \
- 	operation\overlay\snap\LineStringSnapper.$(EXT) \
- 	operation\overlay\snap\SnapOverlayOp.$(EXT) \
- 	operation\overlay\snap\SnapIfNeededOverlayOp.$(EXT) \
- 	operation\overlay\validate\FuzzyPointLocator.$(EXT) \
- 	operation\overlay\validate\OffsetPointGenerator.$(EXT) \
- 	operation\overlay\validate\OverlayResultValidator.$(EXT) \
-	operation\polygonize\PolygonizeDirectedEdge.$(EXT) \
-	operation\polygonize\PolygonizeEdge.$(EXT) \
-	operation\polygonize\EdgeRing.$(EXT) \
-	operation\polygonize\PolygonizeGraph.$(EXT) \
-	operation\polygonize\Polygonizer.$(EXT) \
-	operation\predicate\RectangleContains.$(EXT) \
-	operation\predicate\RectangleIntersects.$(EXT) \
-	operation\predicate\SegmentIntersectionTester.$(EXT) \
-	operation\relate\EdgeEndBuilder.$(EXT) \
-	operation\relate\EdgeEndBundle.$(EXT) \
-	operation\relate\EdgeEndBundleStar.$(EXT) \
-	operation\relate\RelateComputer.$(EXT) \
-	operation\relate\RelateNode.$(EXT) \
-	operation\relate\RelateNodeFactory.$(EXT) \
-	operation\relate\RelateNodeGraph.$(EXT) \
-	operation\relate\RelateOp.$(EXT) \
-	operation\sharedpaths\SharedPathsOp.$(EXT) \
-	operation\union\CascadedPolygonUnion.$(EXT) \
-	operation\union\CascadedUnion.$(EXT) \
-	operation\union\PointGeometryUnion.$(EXT) \
-	operation\union\UnaryUnionOp.$(EXT) \
-	operation\valid\ConnectedInteriorTester.$(EXT) \
-	operation\valid\ConsistentAreaTester.$(EXT) \
-	operation\valid\IndexedNestedRingTester.$(EXT) \
-	operation\valid\IsValidOp.$(EXT) \
-	operation\valid\QuadtreeNestedRingTester.$(EXT) \
-	operation\valid\RepeatedPointTester.$(EXT) \
-	operation\valid\SimpleNestedRingTester.$(EXT) \
-	operation\valid\SweeplineNestedRingTester.$(EXT) \
-	operation\valid\TopologyValidationError.$(EXT) \
-	planargraph\DirectedEdge.$(EXT) \
-	planargraph\DirectedEdgeStar.$(EXT) \
-	planargraph\Edge.$(EXT) \
-	planargraph\Node.$(EXT) \
-	planargraph\NodeMap.$(EXT) \
-	planargraph\PlanarGraph.$(EXT) \
-	planargraph\Subgraph.$(EXT) \
-	planargraph\algorithm\ConnectedSubgraphFinder.$(EXT) \
-	precision\CommonBits.$(EXT) \
-	precision\CommonBitsOp.$(EXT) \
-	precision\CommonBitsRemover.$(EXT) \
-	precision\EnhancedPrecisionOp.$(EXT) \
-	precision\GeometryPrecisionReducer.$(EXT) \
-	precision\MinimumClearance.$(EXT) \
-	precision\PrecisionReducerCoordinateOperation.$(EXT) \
-	precision\SimpleGeometryPrecisionReducer.$(EXT) \
-	simplify\DouglasPeuckerLineSimplifier.$(EXT) \
-	simplify\DouglasPeuckerSimplifier.$(EXT) \
-	simplify\LineSegmentIndex.$(EXT) \
-	simplify\TaggedLineSegment.$(EXT) \
-	simplify\TaggedLinesSimplifier.$(EXT) \
-	simplify\TaggedLineString.$(EXT) \
-	simplify\TaggedLineStringSimplifier.$(EXT) \
-	simplify\TopologyPreservingSimplifier.$(EXT) \
-	triangulate\DelaunayTriangulationBuilder.$(EXT) \
-	triangulate\IncrementalDelaunayTriangulator.$(EXT) \
-	triangulate\VoronoiDiagramBuilder.$(EXT) \
-	triangulate\quadedge\LastFoundQuadEdgeLocator.$(EXT) \
-	triangulate\quadedge\LocateFailureException.$(EXT) \
-	triangulate\quadedge\QuadEdge.$(EXT) \
-	triangulate\quadedge\QuadEdgeLocator.$(EXT) \
-	triangulate\quadedge\QuadEdgeSubdivision.$(EXT) \
-	triangulate\quadedge\TrianglePredicate.$(EXT) \
-	triangulate\quadedge\TriangleVisitor.$(EXT) \
-	triangulate\quadedge\Vertex.$(EXT) \
-	util\Assert.$(EXT) \
-	util\GeometricShapeFactory.$(EXT) \
-	util\Interrupt.$(EXT) \
-	util\math.$(EXT) \
-	util\Profiler.$(EXT) \
-	linearref\ExtractLineByLocation.$(EXT) \
-	linearref\LengthIndexOfPoint.$(EXT) \
-	linearref\LengthIndexedLine.$(EXT) \
-	linearref\LengthLocationMap.$(EXT) \
-	linearref\LinearGeometryBuilder.$(EXT) \
-	linearref\LinearIterator.$(EXT) \
-	linearref\LinearLocation.$(EXT) \
-	linearref\LocationIndexOfLine.$(EXT) \
-	linearref\LocationIndexOfPoint.$(EXT) \
-	..\capi\geos_c.$(EXT) \
-	..\capi\geos_ts_c.$(EXT) \
-	inlines.$(EXT)
-
-TEST_EXE =	TestSweepLineSpeed.exe
-
-###############################################################################
-# Build targets
-
-default: $(LIBNAME) $(DLLNAME) $(CDLLNAME)
-
-all: $(LIBNAME) $(DLLNAME) $(CDLLNAME) TestSweepLineSpeed.exe geostest.exe
-
-check: all
-	TestSweepLineSpeed.exe
-
-
-$(LIBNAME):	$(GEOS_ROOT)\include\geos\platform.h $(GEOS_ROOT)\include\geos\version.h ..\capi\geos_c.h $(OBJ)
-	if exist $(LIBNAME) del $(LIBNAME)
-	$(LINK) /lib /out:$(LIBNAME) $(OBJ)
-
-$(DLLNAME):	$(OBJ)
-	$(LINK) /dll /debug $(LINKER_FLAGS) $(OBJ) /out:$(DLLNAME) /implib:$(SLIBNAME)
-	if exist $(DLLNAME).manifest mt -manifest $(DLLNAME).manifest -outputresource:$(DLLNAME);2
-
-$(CDLLNAME): ..\capi\geos_c.obj ..\capi\geos_ts_c.obj $(DLLNAME)
-	$(LINK) /dll /debug $(LINKER_FLAGS) ..\capi\geos_c.obj ..\capi\geos_ts_c.obj $(LIBNAME) /out:$(CDLLNAME) /implib:$(CLIBNAME)
-	if exist $(CDLLNAME).manifest mt -manifest $(CDLLNAME).manifest -outputresource:$(CDLLNAME);2
-
-$(GEOS_ROOT)\include\geos\platform.h: $(GEOS_ROOT)\include\geos\platform.h.vc
-	$(CP) $(GEOS_ROOT)\include\geos\platform.h.vc $(GEOS_ROOT)\include\geos\platform.h
-
-$(GEOS_ROOT)\include\geos\version.h: $(GEOS_ROOT)\include\geos\version.h.vc
-	if not exist $(GEOS_ROOT)\include\geos\version.h $(CP) $(GEOS_ROOT)\include\geos\version.h.vc $(GEOS_ROOT)\include\geos\version.h
-
-# geos_c.h should already be in distribution, if is not you'll
-# have to run ./configure to recreate
-../capi/geos_c.h: ../capi/geos_c.h.in.
-	$(CP) ..\capi\geos_c.h.in ..\capi\geos_c.h
-
-.cpp.obj:
-	$(CC) $(CFLAGS) /c $*.cpp /Fo$@
-
-{..\capi}.cpp.obj:
-	$(CC) $(CFLAGS) /D "GEOS_DLL_EXPORT" /c $*.cpp /Fo$@
-
-.c.obj:
-	$(CC) $(CFLAGS) /c $*.c /Fo$@
-
-clean:
-	@ECHO "*** Cleaning GEOS source tree"
-	@IF EXIST $(LIBNAME)  $(RM) $(LIBNAME)
-	@IF EXIST $(SLIBNAME) $(RM) $(SLIBNAME)
-	@IF EXIST $(DLLNAME)  $(RM) $(DLLNAME)
-	@IF EXIST $(SLIBNAME) $(RM) $(SLIBNAME)
-	@IF EXIST $(CLIBNAME) $(RM) $(CLIBNAME)
-	@IF EXIST $(CDLLNAME) $(RM) $(CDLLNAME)
-	- at del /s *.exe
-	- at del /s *.exp
-	- at del /s *.ilk
-	- at del /s *.manifest
-	- at del /s *.obj
-	- at del /s *.pdb
-
-TestSweepLineSpeed.exe:	$(LIBNAME) \
-		..\tests\bigtest\GeometryTestFactory.obj \
-		..\tests\bigtest\TestSweepLineSpeed.obj
-	$(LINK) /debug /out:TestSweepLineSpeed.exe \
-		..\tests\bigtest\TestSweepLineSpeed.obj \
-		..\tests\bigtest\GeometryTestFactory.obj \
-		$(LIBNAME)
-
-geostest.exe: $(CDLLNAME) ..\tests\unit\capi\geostest.obj
-	$(LINK) /debug ..\tests\unit\capi\geostest.obj $(CLIBNAME)
-
-# EOF
diff --git a/src/algorithm/HCoordinate.cpp b/src/algorithm/HCoordinate.cpp
index a760cbf..6fc8e82 100644
--- a/src/algorithm/HCoordinate.cpp
+++ b/src/algorithm/HCoordinate.cpp
@@ -21,7 +21,6 @@
 #include <geos/algorithm/HCoordinate.h>
 #include <geos/algorithm/NotRepresentableException.h>
 #include <geos/geom/Coordinate.h>
-#include <geos/platform.h>
 
 #include <memory>
 #include <cmath>
@@ -71,7 +70,7 @@ HCoordinate::intersection(const Coordinate &p1, const Coordinate &p2,
 	double xInt = x/w;
 	double yInt = y/w;
 
-	if ( (!FINITE(xInt)) || (!FINITE(yInt)) )
+	if ( (!std::isfinite(xInt)) || (!std::isfinite(yInt)) )
 	{
 		throw NotRepresentableException();
 	}
@@ -148,7 +147,7 @@ double
 HCoordinate::getX() const
 {
 	double a = x/w;
-	if ( !FINITE(a) ) {
+	if ( !std::isfinite(a) ) {
 		throw NotRepresentableException();
 	}
 	return a;
@@ -159,7 +158,7 @@ double
 HCoordinate::getY() const
 {
 	double a = y/w;
-	if ( !FINITE(a) ) {
+	if ( !std::isfinite(a) ) {
 		throw  NotRepresentableException();
 	}
 	return a;
diff --git a/src/algorithm/InteriorPointLine.cpp b/src/algorithm/InteriorPointLine.cpp
index f7af379..c199503 100644
--- a/src/algorithm/InteriorPointLine.cpp
+++ b/src/algorithm/InteriorPointLine.cpp
@@ -17,6 +17,7 @@
  *
  **********************************************************************/
 
+#include <geos/constants.h>
 #include <geos/algorithm/InteriorPointLine.h>
 #include <geos/geom/Coordinate.h>
 #include <geos/geom/Geometry.h>
diff --git a/src/algorithm/InteriorPointPoint.cpp b/src/algorithm/InteriorPointPoint.cpp
index 7e88315..22c8c25 100644
--- a/src/algorithm/InteriorPointPoint.cpp
+++ b/src/algorithm/InteriorPointPoint.cpp
@@ -13,7 +13,7 @@
  *
  **********************************************************************/
 
-#include <geos/platform.h>
+#include <geos/constants.h>
 #include <geos/algorithm/InteriorPointPoint.h>
 #include <geos/geom/Coordinate.h>
 #include <geos/geom/Geometry.h>
diff --git a/src/algorithm/LineIntersector.cpp b/src/algorithm/LineIntersector.cpp
index 89b7219..f3b6cfb 100644
--- a/src/algorithm/LineIntersector.cpp
+++ b/src/algorithm/LineIntersector.cpp
@@ -17,7 +17,7 @@
  *
  **********************************************************************/
 
-#include <geos/platform.h>
+#include <geos/constants.h>
 #include <geos/algorithm/LineIntersector.h>
 #include <geos/algorithm/Distance.h>
 #include <geos/algorithm/Orientation.h>
@@ -267,7 +267,7 @@ LineIntersector::interpolateZ(const Coordinate &p,
 	cerr<<"LineIntersector::interpolateZ("<<p.toString()<<", "<<p1.toString()<<", "<<p2.toString()<<")"<<endl;
 #endif
 
-	if ( ISNAN(p1.z) )
+	if ( std::isnan(p1.z) )
 	{
 #if GEOS_DEBUG
 		cerr<<" p1 do not have a Z"<<endl;
@@ -275,7 +275,7 @@ LineIntersector::interpolateZ(const Coordinate &p,
 		return p2.z; // might be DoubleNotANumber again
 	}
 
-	if ( ISNAN(p2.z) )
+	if ( std::isnan(p2.z) )
 	{
 #if GEOS_DEBUG
 		cerr<<" p2 do not have a Z"<<endl;
@@ -347,9 +347,9 @@ LineIntersector::computeIntersection(const Coordinate& p,const Coordinate& p1,co
 			cerr<<"RobustIntersector::computeIntersection(Coordinate,Coordinate,Coordinate) calling interpolateZ"<<endl;
 #endif
 			double z = interpolateZ(p, p1, p2);
-			if ( !ISNAN(z) )
+			if ( !std::isnan(z) )
 			{
-				if ( ISNAN(intPt[0].z) )
+				if ( std::isnan(intPt[0].z) )
 					intPt[0].z = z;
 				else
 					intPt[0].z = (intPt[0].z+z)/2;
@@ -469,7 +469,7 @@ LineIntersector::computeIntersect(const Coordinate& p1,const Coordinate& p2,cons
 		if ( p1.equals2D(q1) || p1.equals2D(q2) ) {
 			intPt[0]=p1;
 #if COMPUTE_Z
-			if ( !ISNAN(p1.z) )
+			if ( !std::isnan(p1.z) )
 			{
 				z += p1.z;
 				hits++;
@@ -479,7 +479,7 @@ LineIntersector::computeIntersect(const Coordinate& p1,const Coordinate& p2,cons
 		else if ( p2.equals2D(q1) || p2.equals2D(q2) ) {
 			intPt[0]=p2;
 #if COMPUTE_Z
-			if ( !ISNAN(p2.z) )
+			if ( !std::isnan(p2.z) )
 			{
 				z += p2.z;
 				hits++;
@@ -493,7 +493,7 @@ LineIntersector::computeIntersect(const Coordinate& p1,const Coordinate& p2,cons
 		else if (Pq1==0) {
 			intPt[0]=q1;
 #if COMPUTE_Z
-			if ( !ISNAN(q1.z) )
+			if ( !std::isnan(q1.z) )
 			{
 				z += q1.z;
 				hits++;
@@ -503,7 +503,7 @@ LineIntersector::computeIntersect(const Coordinate& p1,const Coordinate& p2,cons
 		else if (Pq2==0) {
 			intPt[0]=q2;
 #if COMPUTE_Z
-			if ( !ISNAN(q2.z) )
+			if ( !std::isnan(q2.z) )
 			{
 				z += q2.z;
 				hits++;
@@ -513,7 +513,7 @@ LineIntersector::computeIntersect(const Coordinate& p1,const Coordinate& p2,cons
 		else if (Qp1==0) {
 			intPt[0]=p1;
 #if COMPUTE_Z
-			if ( !ISNAN(p1.z) )
+			if ( !std::isnan(p1.z) )
 			{
 				z += p1.z;
 				hits++;
@@ -523,7 +523,7 @@ LineIntersector::computeIntersect(const Coordinate& p1,const Coordinate& p2,cons
 		else if (Qp2==0) {
 			intPt[0]=p2;
 #if COMPUTE_Z
-			if ( !ISNAN(p2.z) )
+			if ( !std::isnan(p2.z) )
 			{
 				z += p2.z;
 				hits++;
@@ -578,8 +578,8 @@ LineIntersector::computeCollinearIntersection(const Coordinate& p1,const Coordin
 		ztot=0;
 		hits=0;
 		q1z = interpolateZ(q1, p1, p2);
-		if (!ISNAN(q1z)) { ztot+=q1z; hits++; }
-		if (!ISNAN(q1.z)) { ztot+=q1.z; hits++; }
+		if (!std::isnan(q1z)) { ztot+=q1z; hits++; }
+		if (!std::isnan(q1.z)) { ztot+=q1.z; hits++; }
 		if ( hits ) intPt[0].z = ztot/hits;
 #endif
 		intPt[1]=q2;
@@ -587,8 +587,8 @@ LineIntersector::computeCollinearIntersection(const Coordinate& p1,const Coordin
 		ztot=0;
 		hits=0;
 		q2z = interpolateZ(q2, p1, p2);
-		if (!ISNAN(q2z)) { ztot+=q2z; hits++; }
-		if (!ISNAN(q2.z)) { ztot+=q2.z; hits++; }
+		if (!std::isnan(q2z)) { ztot+=q2z; hits++; }
+		if (!std::isnan(q2.z)) { ztot+=q2.z; hits++; }
 		if ( hits ) intPt[1].z = ztot/hits;
 #endif
 #if GEOS_DEBUG
@@ -606,8 +606,8 @@ LineIntersector::computeCollinearIntersection(const Coordinate& p1,const Coordin
 		ztot=0;
 		hits=0;
 		p1z = interpolateZ(p1, q1, q2);
-		if (!ISNAN(p1z)) { ztot+=p1z; hits++; }
-		if (!ISNAN(p1.z)) { ztot+=p1.z; hits++; }
+		if (!std::isnan(p1z)) { ztot+=p1z; hits++; }
+		if (!std::isnan(p1.z)) { ztot+=p1.z; hits++; }
 		if ( hits ) intPt[0].z = ztot/hits;
 #endif
 		intPt[1]=p2;
@@ -615,8 +615,8 @@ LineIntersector::computeCollinearIntersection(const Coordinate& p1,const Coordin
 		ztot=0;
 		hits=0;
 		p2z = interpolateZ(p2, q1, q2);
-		if (!ISNAN(p2z)) { ztot+=p2z; hits++; }
-		if (!ISNAN(p2.z)) { ztot+=p2.z; hits++; }
+		if (!std::isnan(p2z)) { ztot+=p2z; hits++; }
+		if (!std::isnan(p2.z)) { ztot+=p2.z; hits++; }
 		if ( hits ) intPt[1].z = ztot/hits;
 #endif
 		return COLLINEAR_INTERSECTION;
@@ -630,8 +630,8 @@ LineIntersector::computeCollinearIntersection(const Coordinate& p1,const Coordin
 		ztot=0;
 		hits=0;
 		q1z = interpolateZ(q1, p1, p2);
-		if (!ISNAN(q1z)) { ztot+=q1z; hits++; }
-		if (!ISNAN(q1.z)) { ztot+=q1.z; hits++; }
+		if (!std::isnan(q1z)) { ztot+=q1z; hits++; }
+		if (!std::isnan(q1.z)) { ztot+=q1.z; hits++; }
 		if ( hits ) intPt[0].z = ztot/hits;
 #endif
 		intPt[1]=p1;
@@ -639,8 +639,8 @@ LineIntersector::computeCollinearIntersection(const Coordinate& p1,const Coordin
 		ztot=0;
 		hits=0;
 		p1z = interpolateZ(p1, q1, q2);
-		if (!ISNAN(p1z)) { ztot+=p1z; hits++; }
-		if (!ISNAN(p1.z)) { ztot+=p1.z; hits++; }
+		if (!std::isnan(p1z)) { ztot+=p1z; hits++; }
+		if (!std::isnan(p1.z)) { ztot+=p1.z; hits++; }
 		if ( hits ) intPt[1].z = ztot/hits;
 #endif
 #if GEOS_DEBUG
@@ -658,8 +658,8 @@ LineIntersector::computeCollinearIntersection(const Coordinate& p1,const Coordin
 		ztot=0;
 		hits=0;
 		q1z = interpolateZ(q1, p1, p2);
-		if (!ISNAN(q1z)) { ztot+=q1z; hits++; }
-		if (!ISNAN(q1.z)) { ztot+=q1.z; hits++; }
+		if (!std::isnan(q1z)) { ztot+=q1z; hits++; }
+		if (!std::isnan(q1.z)) { ztot+=q1.z; hits++; }
 		if ( hits ) intPt[0].z = ztot/hits;
 #endif
 		intPt[1]=p2;
@@ -667,8 +667,8 @@ LineIntersector::computeCollinearIntersection(const Coordinate& p1,const Coordin
 		ztot=0;
 		hits=0;
 		p2z = interpolateZ(p2, q1, q2);
-		if (!ISNAN(p2z)) { ztot+=p2z; hits++; }
-		if (!ISNAN(p2.z)) { ztot+=p2.z; hits++; }
+		if (!std::isnan(p2z)) { ztot+=p2z; hits++; }
+		if (!std::isnan(p2.z)) { ztot+=p2.z; hits++; }
 		if ( hits ) intPt[1].z = ztot/hits;
 #endif
 #if GEOS_DEBUG
@@ -686,8 +686,8 @@ LineIntersector::computeCollinearIntersection(const Coordinate& p1,const Coordin
 		ztot=0;
 		hits=0;
 		q2z = interpolateZ(q2, p1, p2);
-		if (!ISNAN(q2z)) { ztot+=q2z; hits++; }
-		if (!ISNAN(q2.z)) { ztot+=q2.z; hits++; }
+		if (!std::isnan(q2z)) { ztot+=q2z; hits++; }
+		if (!std::isnan(q2.z)) { ztot+=q2.z; hits++; }
 		if ( hits ) intPt[0].z = ztot/hits;
 #endif
 		intPt[1]=p1;
@@ -695,8 +695,8 @@ LineIntersector::computeCollinearIntersection(const Coordinate& p1,const Coordin
 		ztot=0;
 		hits=0;
 		p1z = interpolateZ(p1, q1, q2);
-		if (!ISNAN(p1z)) { ztot+=p1z; hits++; }
-		if (!ISNAN(p1.z)) { ztot+=p1.z; hits++; }
+		if (!std::isnan(p1z)) { ztot+=p1z; hits++; }
+		if (!std::isnan(p1.z)) { ztot+=p1.z; hits++; }
 		if ( hits ) intPt[1].z = ztot/hits;
 #endif
 #if GEOS_DEBUG
@@ -714,8 +714,8 @@ LineIntersector::computeCollinearIntersection(const Coordinate& p1,const Coordin
 		ztot=0;
 		hits=0;
 		q2z = interpolateZ(q2, p1, p2);
-		if (!ISNAN(q2z)) { ztot+=q2z; hits++; }
-		if (!ISNAN(q2.z)) { ztot+=q2.z; hits++; }
+		if (!std::isnan(q2z)) { ztot+=q2z; hits++; }
+		if (!std::isnan(q2.z)) { ztot+=q2.z; hits++; }
 		if ( hits ) intPt[0].z = ztot/hits;
 #endif
 		intPt[1]=p2;
@@ -723,8 +723,8 @@ LineIntersector::computeCollinearIntersection(const Coordinate& p1,const Coordin
 		ztot=0;
 		hits=0;
 		p2z = interpolateZ(p2, q1, q2);
-		if (!ISNAN(p2z)) { ztot+=p2z; hits++; }
-		if (!ISNAN(p2.z)) { ztot+=p2.z; hits++; }
+		if (!std::isnan(p2z)) { ztot+=p2z; hits++; }
+		if (!std::isnan(p2.z)) { ztot+=p2.z; hits++; }
 		if ( hits ) intPt[1].z = ztot/hits;
 #endif
 #if GEOS_DEBUG
@@ -780,8 +780,8 @@ LineIntersector::intersection(const Coordinate& p1,
 	double zvals = 0;
 	double zp = interpolateZ(intPtOut, p1, p2);
 	double zq = interpolateZ(intPtOut, q1, q2);
-	if ( !ISNAN(zp)) { ztot += zp; zvals++; }
-	if ( !ISNAN(zq)) { ztot += zq; zvals++; }
+	if ( !std::isnan(zp)) { ztot += zp; zvals++; }
+	if ( !std::isnan(zq)) { ztot += zq; zvals++; }
 	if ( zvals ) intPtOut.z = ztot/zvals;
 #endif // COMPUTE_Z
 
@@ -871,7 +871,7 @@ LineIntersector::normalizeToEnvCentre(Coordinate &n00, Coordinate &n01,
 
 	// Only do this if input does have Z
 	// See https://trac.osgeo.org/geos/ticket/811
-	if( ISNAN(n00.z) ) return;
+	if( std::isnan(n00.z) ) return;
 
 	double minZ0 = n00.z < n01.z ? n00.z : n01.z;
 	double minZ1 = n10.z < n11.z ? n10.z : n11.z;
diff --git a/src/algorithm/MinimumDiameter.cpp b/src/algorithm/MinimumDiameter.cpp
index 6b1b6d2..1c51f1e 100644
--- a/src/algorithm/MinimumDiameter.cpp
+++ b/src/algorithm/MinimumDiameter.cpp
@@ -22,6 +22,7 @@
  *
  **********************************************************************/
 
+#include <geos/constants.h>
 #include <geos/algorithm/MinimumDiameter.h>
 #include <geos/algorithm/ConvexHull.h>
 #include <geos/geom/Geometry.h>
diff --git a/src/algorithm/RobustDeterminant.cpp b/src/algorithm/RobustDeterminant.cpp
index 84d7966..80cef7d 100644
--- a/src/algorithm/RobustDeterminant.cpp
+++ b/src/algorithm/RobustDeterminant.cpp
@@ -38,7 +38,6 @@
 
 #include <cmath>
 
-#include <geos/platform.h> // for ISNAN, FINITE
 
 #ifdef _MSC_VER
 #pragma warning(disable : 4127)
@@ -59,7 +58,7 @@ int RobustDeterminant::signOfDet2x2(double x1,double y1,double x2,double y2) {
 	double k;
 
   // Protect against non-finite numbers
-  if ( !FINITE(x1) || !FINITE(y1) || !FINITE(x2) || !FINITE(y2) )
+  if ( !std::isfinite(x1) || !std::isfinite(y1) || !std::isfinite(x2) || !std::isfinite(y2) )
   {
     throw util::IllegalArgumentException("RobustDeterminant encountered non-finite numbers ");
   }
diff --git a/src/geom/Coordinate.cpp b/src/geom/Coordinate.cpp
index fca94d8..685301e 100644
--- a/src/geom/Coordinate.cpp
+++ b/src/geom/Coordinate.cpp
@@ -13,11 +13,12 @@
  **********************************************************************/
 
 #include <geos/geom/Coordinate.h>
-#include <geos/platform.h> // for ISNAN
+#include <geos/constants.h> // for std::isnan
 
 #include <sstream>
 #include <string>
 #include <iomanip>
+#include <cmath>
 
 #ifndef GEOS_INLINE
 # include <geos/geom/Coordinate.inl>
@@ -46,7 +47,7 @@ Coordinate::toString() const
 
 std::ostream& operator<< (std::ostream& os, const Coordinate& c)
 {
-	if ( ISNAN(c.z) )
+	if ( std::isnan(c.z) )
 	{
 		os << c.x << " " << c.y;
 	} else {
diff --git a/src/geom/CoordinateArraySequence.cpp b/src/geom/CoordinateArraySequence.cpp
index 04c786d..80c4aa5 100644
--- a/src/geom/CoordinateArraySequence.cpp
+++ b/src/geom/CoordinateArraySequence.cpp
@@ -98,7 +98,7 @@ CoordinateArraySequence::getDimension() const
     if( vect->empty() )
         return 3;
 
-    if( ISNAN((*vect)[0].z) )
+    if( std::isnan((*vect)[0].z) )
         dimension = 2;
     else
         dimension = 3;
diff --git a/src/geom/GeometryFactory.cpp b/src/geom/GeometryFactory.cpp
index 6640e25..e504a09 100644
--- a/src/geom/GeometryFactory.cpp
+++ b/src/geom/GeometryFactory.cpp
@@ -307,7 +307,7 @@ GeometryFactory::createPoint(const Coordinate& coordinate) const
 	if (coordinate.isNull()) {
 		return createPoint();
 	} else {
-		std::size_t dim = ISNAN(coordinate.z) ? 2 : 3;
+		std::size_t dim = std::isnan(coordinate.z) ? 2 : 3;
 		CoordinateSequence *cl = coordinateListFactory->create(new vector<Coordinate>(1, coordinate), dim);
 		//cl->setAt(coordinate, 0);
 		Point *ret = createPoint(cl);
diff --git a/src/geom/LineSegment.cpp b/src/geom/LineSegment.cpp
index c7d29a2..0e75f7c 100644
--- a/src/geom/LineSegment.cpp
+++ b/src/geom/LineSegment.cpp
@@ -18,6 +18,7 @@
  *
  **********************************************************************/
 
+#include <geos/constants.h>
 #include <geos/geom/LineSegment.h>
 #include <geos/geom/LineString.h> // for toGeometry
 #include <geos/geom/Coordinate.h>
diff --git a/src/geom/util/SineStarFactory.cpp b/src/geom/util/SineStarFactory.cpp
index 0689aaa..a734cc4 100644
--- a/src/geom/util/SineStarFactory.cpp
+++ b/src/geom/util/SineStarFactory.cpp
@@ -16,6 +16,7 @@
  *
  **********************************************************************/
 
+#include <geos/constants.h>
 #include <geos/geom/util/SineStarFactory.h>
 #include <geos/geom/Coordinate.h>
 #include <geos/geom/CoordinateSequenceFactory.h>
@@ -29,10 +30,6 @@
 #include <cmath>
 #include <memory>
 
-#ifndef M_PI
-#define M_PI        3.14159265358979323846
-#endif
-
 using namespace std;
 //using namespace geos::geom;
 
diff --git a/src/geomgraph/Node.cpp b/src/geomgraph/Node.cpp
index f2a42df..6f4a609 100644
--- a/src/geomgraph/Node.cpp
+++ b/src/geomgraph/Node.cpp
@@ -18,7 +18,6 @@
  *
  **********************************************************************/
 
-#include <geos/platform.h>
 #include <geos/geom/Coordinate.h>
 #include <geos/geomgraph/Node.h>
 #include <geos/geomgraph/Edge.h>
@@ -245,7 +244,7 @@ Node::addZ(double z)
 #if GEOS_DEBUG
 	cerr<<"["<<this<<"] Node::addZ("<<z<<")";
 #endif
-	if ( ISNAN(z) )
+	if ( std::isnan(z) )
 	{
 #if GEOS_DEBUG
 		cerr<<" skipped"<<endl;
diff --git a/src/io/ByteOrderValues.cpp b/src/io/ByteOrderValues.cpp
index 08e9129..c5be5b4 100644
--- a/src/io/ByteOrderValues.cpp
+++ b/src/io/ByteOrderValues.cpp
@@ -17,7 +17,7 @@
  **********************************************************************/
 
 #include <geos/io/ByteOrderValues.h>
-#include <geos/platform.h>
+#include <geos/constants.h>
 #include <geos/util.h>
 
 #include <cstring>
diff --git a/src/io/WKTWriter.cpp b/src/io/WKTWriter.cpp
index 7880e11..f1704c5 100644
--- a/src/io/WKTWriter.cpp
+++ b/src/io/WKTWriter.cpp
@@ -18,7 +18,6 @@
  *
  **********************************************************************/
 
-#include <geos/platform.h>
 #include <geos/io/WKTWriter.h>
 #include <geos/io/Writer.h>
 #include <geos/io/CLocalizer.h>
@@ -326,7 +325,7 @@ WKTWriter::appendCoordinate(const Coordinate* coordinate,
 	if( outputDimension == 3 )
 	{
 		writer->write(" ");
-		if( ISNAN(coordinate->z) )
+		if( std::isnan(coordinate->z) )
 			writer->write(writeNumber(0.0));
 		else
 			writer->write(writeNumber(coordinate->z));
diff --git a/src/operation/buffer/BufferOp.cpp b/src/operation/buffer/BufferOp.cpp
index 872ce63..e34c2fb 100644
--- a/src/operation/buffer/BufferOp.cpp
+++ b/src/operation/buffer/BufferOp.cpp
@@ -21,7 +21,7 @@
 #include <algorithm>
 #include <cmath>
 
-#include <geos/platform.h>
+#include <geos/constants.h>
 #include <geos/profiler.h>
 #include <geos/precision/GeometryPrecisionReducer.h>
 #include <geos/operation/buffer/BufferOp.h>
diff --git a/src/operation/buffer/BufferParameters.cpp b/src/operation/buffer/BufferParameters.cpp
index d9b1bee..f547c95 100644
--- a/src/operation/buffer/BufferParameters.cpp
+++ b/src/operation/buffer/BufferParameters.cpp
@@ -19,14 +19,10 @@
 #include <cstdlib> // for std::abs()
 #include <cmath> // for cos
 
-#include <geos/platform.h>
+#include <geos/constants.h>
 #include <geos/operation/buffer/BufferParameters.h>
 
 
-#ifndef M_PI
-#define M_PI        3.14159265358979323846
-#endif
-
 namespace geos {
 namespace operation { // geos.operation
 namespace buffer { // geos.operation.buffer
diff --git a/src/operation/buffer/OffsetCurveSetBuilder.cpp b/src/operation/buffer/OffsetCurveSetBuilder.cpp
index 44b758b..47bf9a3 100644
--- a/src/operation/buffer/OffsetCurveSetBuilder.cpp
+++ b/src/operation/buffer/OffsetCurveSetBuilder.cpp
@@ -18,7 +18,7 @@
  *
  **********************************************************************/
 
-#include <geos/platform.h>
+#include <geos/constants.h>
 #include <geos/algorithm/Distance.h>
 #include <geos/algorithm/Orientation.h>
 #include <geos/algorithm/MinimumDiameter.h>
diff --git a/src/operation/distance/DistanceOp.cpp b/src/operation/distance/DistanceOp.cpp
index a5fdcdb..93a2e5e 100644
--- a/src/operation/distance/DistanceOp.cpp
+++ b/src/operation/distance/DistanceOp.cpp
@@ -18,6 +18,7 @@
  *
  **********************************************************************/
 
+#include <geos/constants.h>
 #include <geos/operation/distance/DistanceOp.h>
 #include <geos/operation/distance/GeometryLocation.h>
 #include <geos/operation/distance/ConnectedElementLocationFilter.h>
diff --git a/src/operation/overlay/ElevationMatrix.cpp b/src/operation/overlay/ElevationMatrix.cpp
index a5445ad..1bffeef 100644
--- a/src/operation/overlay/ElevationMatrix.cpp
+++ b/src/operation/overlay/ElevationMatrix.cpp
@@ -16,7 +16,7 @@
  *
  **********************************************************************/
 
-#include <geos/platform.h>
+#include <geos/constants.h>
 #include <geos/operation/overlay/ElevationMatrix.h>
 #include <geos/util/IllegalArgumentException.h>
 #include <geos/geom/Geometry.h>
@@ -61,14 +61,14 @@ ElevationMatrixFilter::filter_rw(Coordinate *c) const
 #endif
 
 	// already has a Z value, nothing to do
-	if ( ! ISNAN(c->z) ) return;
+	if ( ! std::isnan(c->z) ) return;
 
 	double p_avgElevation = em.getAvgElevation();
 
 	try {
 		const ElevationMatrixCell &emc = em.getCell(*c);
 		c->z = emc.getAvg();
-		if ( ISNAN(c->z) ) c->z = p_avgElevation;
+		if ( std::isnan(c->z) ) c->z = p_avgElevation;
 #if GEOS_DEBUG
 		cerr<<"  z set to "<<c->z<<endl;
 #endif
@@ -137,7 +137,7 @@ ElevationMatrix::add(const CoordinateSequence *cs)
 void
 ElevationMatrix::add(const Coordinate &c)
 {
-	if ( ISNAN(c.z) ) return;
+	if ( std::isnan(c.z) ) return;
 	try {
 		ElevationMatrixCell &emc = getCell(c);
 		emc.add(c);
@@ -200,7 +200,7 @@ ElevationMatrix::getAvgElevation() const
 		{
 			const ElevationMatrixCell &cell = cells[(r*cols)+c];
 			double e = cell.getAvg();
-			if ( !ISNAN(e) )
+			if ( !std::isnan(e) )
 			{
 				zvals++;
 				ztot+=e;
@@ -236,7 +236,7 @@ ElevationMatrix::elevate(Geometry *g) const
 {
 
 	// Nothing to do if no elevation info in matrix
-	if ( ISNAN(getAvgElevation()) ) return;
+	if ( std::isnan(getAvgElevation()) ) return;
 
 	g->apply_rw(&filter);
 }
diff --git a/src/operation/overlay/ElevationMatrixCell.cpp b/src/operation/overlay/ElevationMatrixCell.cpp
index d5aee46..e1b5548 100644
--- a/src/operation/overlay/ElevationMatrixCell.cpp
+++ b/src/operation/overlay/ElevationMatrixCell.cpp
@@ -16,7 +16,7 @@
  *
  **********************************************************************/
 
-#include <geos/platform.h>
+#include <geos/constants.h>
 #include <geos/geom/Coordinate.h>
 #include <geos/operation/overlay/ElevationMatrixCell.h>
 
@@ -43,7 +43,7 @@ ElevationMatrixCell::~ElevationMatrixCell()
 void
 ElevationMatrixCell::add(const Coordinate &c)
 {
-	if ( !ISNAN(c.z) )
+	if ( !std::isnan(c.z) )
 	{
 		if ( zvals.insert(c.z).second )
 		{
@@ -55,7 +55,7 @@ ElevationMatrixCell::add(const Coordinate &c)
 void
 ElevationMatrixCell::add(double z)
 {
-	if ( !ISNAN(z) )
+	if ( !std::isnan(z) )
 	{
 		if ( zvals.insert(z).second )
 		{
diff --git a/src/operation/overlay/LineBuilder.cpp b/src/operation/overlay/LineBuilder.cpp
index 6b13d68..c39de10 100644
--- a/src/operation/overlay/LineBuilder.cpp
+++ b/src/operation/overlay/LineBuilder.cpp
@@ -17,7 +17,6 @@
  *
  **********************************************************************/
 
-#include <geos/platform.h>
 #include <geos/operation/overlay/LineBuilder.h>
 #include <geos/operation/overlay/OverlayOp.h>
 #include <geos/algorithm/PointLocator.h>
@@ -218,7 +217,7 @@ LineBuilder::propagateZ(CoordinateSequence *cs)
 	size_t cssize = cs->getSize();
 	for (size_t i = 0; i < cssize; ++i)
 	{
-		if ( !ISNAN(cs->getAt(i).z) ) v3d.push_back(i);
+		if ( !std::isnan(cs->getAt(i).z) ) v3d.push_back(i);
 	}
 
 #if GEOS_DEBUG
diff --git a/src/operation/overlay/OverlayOp.cpp b/src/operation/overlay/OverlayOp.cpp
index e5a93c7..1621d3b 100644
--- a/src/operation/overlay/OverlayOp.cpp
+++ b/src/operation/overlay/OverlayOp.cpp
@@ -17,7 +17,7 @@
  *
  **********************************************************************/
 
-#include <geos/platform.h>
+#include <geos/constants.h>
 #include <geos/operation/overlay/OverlayOp.h>
 #include <geos/operation/overlay/validate/OverlayResultValidator.h>
 #include <geos/operation/overlay/ElevationMatrix.h>
@@ -461,7 +461,7 @@ OverlayOp::getAverageZ(const Polygon *poly)
 	for (size_t i=0; i<npts; ++i)
 	{
 		const Coordinate &c = pts->getAt(i);
-		if ( !ISNAN(c.z) )
+		if ( !std::isnan(c.z) )
 		{
 			totz += c.z;
 			zcount++;
diff --git a/src/operation/valid/IsValidOp.cpp b/src/operation/valid/IsValidOp.cpp
index c7a3d18..dbcf4eb 100644
--- a/src/operation/valid/IsValidOp.cpp
+++ b/src/operation/valid/IsValidOp.cpp
@@ -19,16 +19,13 @@
  *
  **********************************************************************/
 
-#include "IndexedNestedRingTester.h" // TODO: private header>? --mloskot
-
 #include <geos/export.h>
-#include <geos/platform.h>
+#include <geos/constants.h>
+#include <geos/algorithm/CGAlgorithms.h>
 #include <geos/algorithm/LineIntersector.h>
+#include <geos/algorithm/MCPointInRing.h>
 #include <geos/algorithm/PointLocation.h>
 #include <geos/algorithm/locate/IndexedPointInAreaLocator.h>
-#include <geos/operation/valid/ConnectedInteriorTester.h>
-#include <geos/operation/valid/ConsistentAreaTester.h>
-#include <geos/operation/valid/IsValidOp.h>
 #include <geos/geom/CoordinateSequence.h>
 #include <geos/geom/GeometryCollection.h>
 #include <geos/geom/LineString.h>
@@ -41,6 +38,10 @@
 #include <geos/geomgraph/Edge.h>
 #include <geos/geomgraph/index/SegmentIntersector.h>
 #include <geos/index/chain/MonotoneChainSelectAction.h>
+#include <geos/operation/valid/ConnectedInteriorTester.h>
+#include <geos/operation/valid/ConsistentAreaTester.h>
+#include <geos/operation/valid/IndexedNestedRingTester.h>
+#include <geos/operation/valid/IsValidOp.h>
 #include <geos/util/UnsupportedOperationException.h>
 
 
@@ -95,9 +96,15 @@ IsValidOp::isValid()
 bool
 IsValidOp::isValid(const Coordinate &coord)
 {
+<<<<<<< HEAD
     if (! FINITE(coord.x) ) return false;
     if (! FINITE(coord.y) ) return false;
     return true;
+=======
+	if (! std::isfinite(coord.x) ) return false;
+	if (! std::isfinite(coord.y) ) return false;
+	return true;
+>>>>>>> Using constants.h and stop using platform.h (closes #925)
 }
 
 /* static public */
diff --git a/src/planargraph/algorithm/ConnectedSubgraphFinder.cpp b/src/planargraph/algorithm/ConnectedSubgraphFinder.cpp
index a0a5343..8e9f932 100644
--- a/src/planargraph/algorithm/ConnectedSubgraphFinder.cpp
+++ b/src/planargraph/algorithm/ConnectedSubgraphFinder.cpp
@@ -12,7 +12,7 @@
  *
  **********************************************************************/
 
-#include <geos/platform.h>
+#include <geos/constants.h>
 #include <geos/planargraph/algorithm/ConnectedSubgraphFinder.h>
 #include <geos/planargraph/Subgraph.h>
 #include <geos/planargraph/Edge.h>
diff --git a/src/precision/CommonBits.cpp b/src/precision/CommonBits.cpp
index e8e4fd8..a435a92 100644
--- a/src/precision/CommonBits.cpp
+++ b/src/precision/CommonBits.cpp
@@ -13,7 +13,7 @@
  *
  **********************************************************************/
 
-#include <geos/platform.h> // for int64
+#include <geos/constants.h> // for int64
 #include <geos/precision/CommonBits.h>
 
 namespace geos {
diff --git a/src/util/GeometricShapeFactory.cpp b/src/util/GeometricShapeFactory.cpp
index a1b5eae..bfc80f7 100644
--- a/src/util/GeometricShapeFactory.cpp
+++ b/src/util/GeometricShapeFactory.cpp
@@ -17,6 +17,7 @@
  *
  **********************************************************************/
 
+#include <geos/constants.h>
 #include <geos/util/GeometricShapeFactory.h>
 #include <geos/geom/Coordinate.h>
 #include <geos/geom/CoordinateSequenceFactory.h>
@@ -28,9 +29,6 @@
 #include <cmath>
 #include <memory>
 
-#ifndef M_PI
-#define M_PI        3.14159265358979323846
-#endif
 
 using namespace std;
 using namespace geos::geom;
diff --git a/tests/perf/ClassSizes.cpp b/tests/perf/ClassSizes.cpp
index 9ae5e68..09ab4a9 100644
--- a/tests/perf/ClassSizes.cpp
+++ b/tests/perf/ClassSizes.cpp
@@ -25,7 +25,7 @@
 #include <geos/geomgraph/PlanarGraph.h>
 #include <geos/noding/NodedSegmentString.h>
 #include <geos/profiler.h>
-#include <geos/platform.h>
+#include <geos/constants.h>
 #include <iostream>
 
 using namespace std;
diff --git a/tests/unit/algorithm/distance/DiscreteFrechetDistanceTest.cpp b/tests/unit/algorithm/distance/DiscreteFrechetDistanceTest.cpp
index d4d55a2..a1e74be 100644
--- a/tests/unit/algorithm/distance/DiscreteFrechetDistanceTest.cpp
+++ b/tests/unit/algorithm/distance/DiscreteFrechetDistanceTest.cpp
@@ -4,7 +4,7 @@
 
 #include <tut/tut.hpp>
 // geos
-#include <geos/platform.h>
+#include <geos/constants.h>
 #include <geos/io/WKTReader.h>
 #include <geos/algorithm/distance/DiscreteFrechetDistance.h>
 #include <geos/geom/PrecisionModel.h>
diff --git a/tests/unit/algorithm/distance/DiscreteHausdorffDistanceTest.cpp b/tests/unit/algorithm/distance/DiscreteHausdorffDistanceTest.cpp
index 236ce39..15f01fe 100644
--- a/tests/unit/algorithm/distance/DiscreteHausdorffDistanceTest.cpp
+++ b/tests/unit/algorithm/distance/DiscreteHausdorffDistanceTest.cpp
@@ -5,7 +5,7 @@
 
 #include <tut/tut.hpp>
 // geos
-#include <geos/platform.h>
+#include <geos/constants.h>
 #include <geos/io/WKTReader.h>
 #include <geos/algorithm/distance/DiscreteHausdorffDistance.h>
 #include <geos/geom/PrecisionModel.h>
diff --git a/tests/unit/capi/GEOSDistanceTest.cpp b/tests/unit/capi/GEOSDistanceTest.cpp
index b66c668..1a2dae4 100644
--- a/tests/unit/capi/GEOSDistanceTest.cpp
+++ b/tests/unit/capi/GEOSDistanceTest.cpp
@@ -4,15 +4,13 @@
 #include <tut/tut.hpp>
 // geos
 #include <geos_c.h>
+#include <geos/constants.h>
 // std
 #include <cstdarg>
 #include <cstdio>
 #include <cstdlib>
 #include <memory>
 #include <math.h>
-#ifndef M_PI
-#define M_PI       3.14159265358979323846
-#endif
 
 namespace tut
 {
@@ -93,7 +91,7 @@ namespace tut
 
 
         for (size_t i = 0; i < num_points; i++) {
-            angle[i] = 2 * M_PI * std::rand() / RAND_MAX;
+            angle[i] = 2 * geos::M_PI * std::rand() / RAND_MAX;
             radius[i] = r*std::rand() / RAND_MAX;
         }
 
diff --git a/tests/unit/geom/CoordinateArraySequenceTest.cpp b/tests/unit/geom/CoordinateArraySequenceTest.cpp
index 238667b..71f9893 100644
--- a/tests/unit/geom/CoordinateArraySequenceTest.cpp
+++ b/tests/unit/geom/CoordinateArraySequenceTest.cpp
@@ -30,9 +30,9 @@ namespace tut
           Filter() : is3d(false) {}
           void filter_rw(geos::geom::Coordinate* c) const override {
             if ( is3d ) {
-              if ( ISNAN(c->z) ) c->z = 0.0;
+              if ( std::isnan(c->z) ) c->z = 0.0;
             }
-            else c->z = DoubleNotANumber;
+            else c->z = geos::DoubleNotANumber;
           }
         };
     };
diff --git a/tests/unit/geom/CoordinateTest.cpp b/tests/unit/geom/CoordinateTest.cpp
index 07392cf..e7ba1db 100644
--- a/tests/unit/geom/CoordinateTest.cpp
+++ b/tests/unit/geom/CoordinateTest.cpp
@@ -3,7 +3,6 @@
 
 #include <tut/tut.hpp>
 // geos
-#include <geos/platform.h>
 #include <geos/geom/Coordinate.h>
 // std
 #include <cmath>
@@ -56,7 +55,7 @@ namespace tut
         geos::geom::Coordinate coord;
         ensure_equals( coord.x, 0.0 );
         ensure_equals( coord.y, 0.0 );
-        ensure(0 != ISNAN( coord.z ) );
+        ensure(0 != std::isnan( coord.z ) );
     }
 
     // Test of copy constructor and assignment operator
@@ -178,16 +177,16 @@ namespace tut
 
         // Make it null and check
         not_null_coord.setNull();
-        ensure( 0 != ISNAN( not_null_coord.x ) );
-        ensure( 0 != ISNAN( not_null_coord.y ) );
-        ensure( 0 != ISNAN( not_null_coord.z ) );
+        ensure( 0 != std::isnan( not_null_coord.x ) );
+        ensure( 0 != std::isnan( not_null_coord.y ) );
+        ensure( 0 != std::isnan( not_null_coord.z ) );
 
         // Build in static null instance
         geos::geom::Coordinate null_coord;
         null_coord = geos::geom::Coordinate::getNull();
-        ensure( 0 != ISNAN( null_coord.x ) );
-        ensure( 0 != ISNAN( null_coord.y ) );
-        ensure( 0 != ISNAN( null_coord.z ) );
+        ensure( 0 != std::isnan( null_coord.x ) );
+        ensure( 0 != std::isnan( null_coord.y ) );
+        ensure( 0 != std::isnan( null_coord.z ) );
     }
 
 } // namespace tut
diff --git a/tests/unit/geom/TriangleTest.cpp b/tests/unit/geom/TriangleTest.cpp
index 380ad0c..31552ff 100644
--- a/tests/unit/geom/TriangleTest.cpp
+++ b/tests/unit/geom/TriangleTest.cpp
@@ -4,7 +4,6 @@
 // tut
 #include <tut/tut.hpp>
 // geos
-#include <geos/platform.h>
 #include <geos/geom/Triangle.h>
 #include <geos/geom/Coordinate.h>
 // std
@@ -115,7 +114,7 @@ namespace tut
 		ensure( std::fabs(center.x - 6.0) < 1e-15 );
 		ensure( center.y > 4.2 );
 		ensure( center.y < 4.3 );
-		ensure( 0 != ISNAN( center.z ) );
+		ensure( 0 != std::isnan( center.z ) );
     }
     // Test circumcentre()
         template<>
@@ -148,14 +147,14 @@ namespace tut
 		t1.circumcentre(c1);
 		ensure_equals(c1.x ,2 );
 		ensure_equals(c1.y ,3 );
-		ensure( 0 != ISNAN( c1.z ) );
+		ensure( 0 != std::isnan( c1.z ) );
 
 		//For t2:
 		Coordinate c2(0,0);
 		t2.circumcentre(c2);
 		ensure_equals(c2.x ,30.5 );
 		ensure_equals(c2.y ,- 14.5 );
-		ensure( 0 != ISNAN( c2.z ) );
+		ensure( 0 != std::isnan( c2.z ) );
 
 
 		//For t3:
@@ -164,7 +163,7 @@ namespace tut
 		ensure( std::fabs(c3.x - 13.0) < 1 );
 		ensure( c3.y > 13.7 );
 		ensure( c3.y < 13.8 );
-		ensure( 0 != ISNAN( c3.z ) );
+		ensure( 0 != std::isnan( c3.z ) );
 		// cout << "CicumCenter of triangle ABC:: " << c1.x << " " << c1.y << endl;
 
 		//  std::cout << "CicumCenter of triangle DEF:: " << c2.x << " " << c2.y << std::endl;
diff --git a/tests/unit/geom/util/GeometryExtracterTest.cpp b/tests/unit/geom/util/GeometryExtracterTest.cpp
index 008d36d..6c0cbdd 100644
--- a/tests/unit/geom/util/GeometryExtracterTest.cpp
+++ b/tests/unit/geom/util/GeometryExtracterTest.cpp
@@ -4,7 +4,7 @@
 // tut
 #include <tut/tut.hpp>
 // geos
-#include <geos/platform.h>
+#include <geos/constants.h>
 #include <geos/geom/PrecisionModel.h>
 #include <geos/geom/GeometryFactory.h>
 #include <geos/geom/Point.h>
diff --git a/tests/unit/io/ByteOrderValuesTest.cpp b/tests/unit/io/ByteOrderValuesTest.cpp
index ce5c73c..3ef25df 100644
--- a/tests/unit/io/ByteOrderValuesTest.cpp
+++ b/tests/unit/io/ByteOrderValuesTest.cpp
@@ -5,7 +5,7 @@
 #include <tut/tut.hpp>
 // geos
 #include <geos/io/ByteOrderValues.h>
-#include <geos/platform.h> // for int64
+#include <geos/constants.h> // for int64
 // std
 #include <sstream>
 #include <memory>
diff --git a/tests/unit/io/WKBWriterTest.cpp b/tests/unit/io/WKBWriterTest.cpp
index 3d94c60..8eb89d5 100644
--- a/tests/unit/io/WKBWriterTest.cpp
+++ b/tests/unit/io/WKBWriterTest.cpp
@@ -76,7 +76,7 @@ namespace tut
             ensure( geom->getCoordinateDimension() == 2 );
             ensure( geom->getCoordinate()->x == -117.0 );
             ensure( geom->getCoordinate()->y == 33.0 );
-            ensure( ISNAN(geom->getCoordinate()->z) != 0 );
+            ensure( std::isnan(geom->getCoordinate()->z) != 0 );
 
             delete geom;
     }
@@ -128,7 +128,7 @@ namespace tut
             ensure( geom->getCoordinateDimension() == 2 );
             ensure( geom->getCoordinate()->x == -117.0 );
             ensure( geom->getCoordinate()->y == 33.0 );
-            ensure( ISNAN(geom->getCoordinate()->z) != 0);
+            ensure( std::isnan(geom->getCoordinate()->z) != 0);
 
             delete geom;
     }
diff --git a/tests/unit/linearref/LengthIndexedLineTest.cpp b/tests/unit/linearref/LengthIndexedLineTest.cpp
index 23c5e3a..df494aa 100644
--- a/tests/unit/linearref/LengthIndexedLineTest.cpp
+++ b/tests/unit/linearref/LengthIndexedLineTest.cpp
@@ -5,7 +5,6 @@
 #include <tut/tut.hpp>
 #include <utility.h>
 // geos
-#include <geos/platform.h>
 #include <geos/io/WKTReader.h>
 #include <geos/io/WKTWriter.h>
 #include <geos/geom/PrecisionModel.h>
@@ -399,7 +398,7 @@ void object::test<25>()
     LengthIndexedLine indexedLine(linearGeom.get());
     double projIndex = indexedLine.project(Coordinate(5, 5));
     Coordinate projPt = indexedLine.extractPoint(projIndex);
-    ensure(0 != ISNAN(projPt.z));
+    ensure(0 != std::isnan(projPt.z));
 }
 
 /**
diff --git a/tests/unit/operation/buffer/BufferBuilderTest.cpp b/tests/unit/operation/buffer/BufferBuilderTest.cpp
index f18b59a..259d141 100644
--- a/tests/unit/operation/buffer/BufferBuilderTest.cpp
+++ b/tests/unit/operation/buffer/BufferBuilderTest.cpp
@@ -6,7 +6,7 @@
 // geos
 #include <geos/operation/buffer/BufferBuilder.h>
 #include <geos/operation/buffer/BufferParameters.h>
-#include <geos/platform.h>
+#include <geos/constants.h>
 #include <geos/geom/Coordinate.h>
 #include <geos/geom/GeometryFactory.h>
 #include <geos/geom/Geometry.h>
diff --git a/tests/unit/operation/buffer/BufferOpTest.cpp b/tests/unit/operation/buffer/BufferOpTest.cpp
index d4ba5ca..21370de 100644
--- a/tests/unit/operation/buffer/BufferOpTest.cpp
+++ b/tests/unit/operation/buffer/BufferOpTest.cpp
@@ -6,7 +6,7 @@
 // geos
 #include <geos/operation/buffer/BufferOp.h>
 #include <geos/operation/buffer/BufferParameters.h>
-#include <geos/platform.h>
+#include <geos/constants.h>
 #include <geos/geom/Coordinate.h>
 #include <geos/geom/GeometryFactory.h>
 #include <geos/geom/Geometry.h>
diff --git a/tests/unit/operation/buffer/BufferParametersTest.cpp b/tests/unit/operation/buffer/BufferParametersTest.cpp
index 2272dad..322aabd 100644
--- a/tests/unit/operation/buffer/BufferParametersTest.cpp
+++ b/tests/unit/operation/buffer/BufferParametersTest.cpp
@@ -5,7 +5,7 @@
 #include <tut/tut.hpp>
 // geos
 #include <geos/operation/buffer/BufferParameters.h>
-#include <geos/platform.h>
+#include <geos/constants.h>
 // std
 #include <memory>
 
diff --git a/tests/unit/operation/distance/DistanceOpTest.cpp b/tests/unit/operation/distance/DistanceOpTest.cpp
index 0e31553..f136da2 100644
--- a/tests/unit/operation/distance/DistanceOpTest.cpp
+++ b/tests/unit/operation/distance/DistanceOpTest.cpp
@@ -5,7 +5,7 @@
 #include <tut/tut.hpp>
 // geos
 #include <geos/operation/distance/DistanceOp.h>
-#include <geos/platform.h>
+#include <geos/constants.h>
 #include <geos/geom/Coordinate.h>
 #include <geos/geom/GeometryFactory.h>
 #include <geos/geom/Geometry.h>
diff --git a/tests/unit/operation/linemerge/LineMergerTest.cpp b/tests/unit/operation/linemerge/LineMergerTest.cpp
index 46e7915..1f83205 100644
--- a/tests/unit/operation/linemerge/LineMergerTest.cpp
+++ b/tests/unit/operation/linemerge/LineMergerTest.cpp
@@ -5,7 +5,7 @@
 #include <tut/tut.hpp>
 // geos
 #include <geos/operation/linemerge/LineMerger.h>
-#include <geos/platform.h>
+#include <geos/constants.h>
 #include <geos/geom/GeometryFactory.h>
 #include <geos/geom/Geometry.h>
 #include <geos/geom/LineString.h>
diff --git a/tests/unit/operation/linemerge/LineSequencerTest.cpp b/tests/unit/operation/linemerge/LineSequencerTest.cpp
index a8950aa..5da318c 100644
--- a/tests/unit/operation/linemerge/LineSequencerTest.cpp
+++ b/tests/unit/operation/linemerge/LineSequencerTest.cpp
@@ -5,7 +5,7 @@
 #include <tut/tut.hpp>
 // geos
 #include <geos/operation/linemerge/LineSequencer.h>
-#include <geos/platform.h>
+#include <geos/constants.h>
 #include <geos/geom/GeometryFactory.h>
 #include <geos/geom/Geometry.h>
 #include <geos/geom/LineString.h>
diff --git a/tests/unit/operation/sharedpaths/SharedPathsOpTest.cpp b/tests/unit/operation/sharedpaths/SharedPathsOpTest.cpp
index 82647ba..e4f8396 100644
--- a/tests/unit/operation/sharedpaths/SharedPathsOpTest.cpp
+++ b/tests/unit/operation/sharedpaths/SharedPathsOpTest.cpp
@@ -5,7 +5,7 @@
 #include <tut/tut.hpp>
 // geos
 #include <geos/operation/sharedpaths/SharedPathsOp.h>
-#include <geos/platform.h>
+#include <geos/constants.h>
 #include <geos/geom/GeometryFactory.h>
 #include <geos/geom/Geometry.h>
 #include <geos/geom/LineString.h>
diff --git a/tests/unit/operation/valid/IsValidTest.cpp b/tests/unit/operation/valid/IsValidTest.cpp
index 1cf3204..18d3cee 100644
--- a/tests/unit/operation/valid/IsValidTest.cpp
+++ b/tests/unit/operation/valid/IsValidTest.cpp
@@ -4,7 +4,7 @@
 
 #include <tut/tut.hpp>
 // geos
-#include <geos/platform.h>
+#include <geos/constants.h>
 #include <geos/operation/valid/IsValidOp.h>
 #include <geos/geom/Coordinate.h>
 #include <geos/geom/CoordinateArraySequence.h>
@@ -14,7 +14,7 @@
 #include <geos/geom/GeometryFactory.h>
 #include <geos/geom/PrecisionModel.h>
 #include <geos/operation/valid/TopologyValidationError.h>
-#include <geos/platform.h> // for ISNAN
+#include <geos/constants.h> // for std::isnan
 // std
 #include <cmath>
 #include <string>
@@ -59,7 +59,7 @@ namespace tut
     {
 	CoordinateSequence* cs = new CoordinateArraySequence();
 	cs->add(Coordinate(0.0, 0.0));
-	cs->add(Coordinate(1.0, DoubleNotANumber));
+	cs->add(Coordinate(1.0, geos::DoubleNotANumber));
 	GeomPtr line ( factory_->createLineString(cs) );
 
 
@@ -73,7 +73,7 @@ namespace tut
 	ensure_equals( err->getErrorType(),
 	               TopologyValidationError::eInvalidCoordinate );
 
-	ensure(0 != ISNAN(errCoord.y));
+	ensure(0 != std::isnan(errCoord.y));
 	ensure_equals(valid, false);
     }
 
diff --git a/tests/unit/operation/valid/ValidClosedRingTest.cpp b/tests/unit/operation/valid/ValidClosedRingTest.cpp
index 6a567e1..314a2ff 100644
--- a/tests/unit/operation/valid/ValidClosedRingTest.cpp
+++ b/tests/unit/operation/valid/ValidClosedRingTest.cpp
@@ -17,8 +17,8 @@
 #include <geos/util/GEOSException.h>
 #include <geos/io/WKTReader.h>
 #include <geos/operation/valid/TopologyValidationError.h>
-#include <geos/platform.h> // for ISNAN
 // std
+#include <cmath>
 #include <string>
 #include <memory>
 #include <iostream>
diff --git a/tests/unit/operation/valid/ValidSelfTouchingRingFormingHoleTest.cpp b/tests/unit/operation/valid/ValidSelfTouchingRingFormingHoleTest.cpp
index 4cb8787..122ffaf 100644
--- a/tests/unit/operation/valid/ValidSelfTouchingRingFormingHoleTest.cpp
+++ b/tests/unit/operation/valid/ValidSelfTouchingRingFormingHoleTest.cpp
@@ -17,8 +17,8 @@
 #include <geos/util/GEOSException.h>
 #include <geos/io/WKTReader.h>
 #include <geos/operation/valid/TopologyValidationError.h>
-#include <geos/platform.h> // for ISNAN
 // std
+#include <cmath>
 #include <string>
 #include <memory>
 #include <iostream>
diff --git a/tests/unit/precision/CommonBitsTest.cpp b/tests/unit/precision/CommonBitsTest.cpp
index e3c0bf4..14fb1ef 100644
--- a/tests/unit/precision/CommonBitsTest.cpp
+++ b/tests/unit/precision/CommonBitsTest.cpp
@@ -3,7 +3,7 @@
 // tut
 #include <tut/tut.hpp>
 // geos
-#include <geos/platform.h>
+#include <geos/constants.h>
 #include <geos/precision/CommonBits.h>
 // std
 

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

Summary of changes:
 CMakeLists.txt                                     |  25 +-
 capi/geos_ts_c.cpp                                 |   3 +-
 configure.ac                                       |   2 +-
 doc/example.cpp                                    |   5 +-
 include/CMakeLists.txt                             |  11 +-
 include/geos/Makefile.am                           |   8 +-
 .../geos/algorithm/distance/PointPairDistance.h    |   2 +-
 include/geos/{platform.h.cmake => constants.h}     |  32 +-
 include/geos/geom/Coordinate.h                     |   2 +-
 include/geos/geom/Coordinate.inl                   |  10 +-
 include/geos/geom/CoordinateSequence.h             |   1 -
 include/geos/geom/Geometry.h                       |   1 -
 include/geos/geom/GeometryCollection.h             |   1 -
 include/geos/geom/GeometryFilter.h                 |   1 -
 include/geos/geom/LineString.h                     |   1 -
 include/geos/geom/LinearRing.h                     |   1 -
 include/geos/geom/MultiPoint.h                     |   1 -
 include/geos/geom/MultiPolygon.h                   |   1 -
 include/geos/geom/Point.h                          |   1 -
 include/geos/geom/Polygon.h                        |   1 -
 .../geos/geom/util/ComponentCoordinateExtracter.h  |   1 -
 include/geos/geom/util/GeometryExtracter.h         |   1 -
 include/geos/geom/util/LinearComponentExtracter.h  |   1 -
 include/geos/geom/util/PointExtracter.h            |   1 -
 include/geos/geom/util/PolygonExtracter.h          |   1 -
 .../geos/index/intervalrtree/IntervalRTreeNode.h   |   2 +-
 include/geos/index/quadtree/DoubleBits.h           |   2 +-
 include/geos/io/ByteOrderDataInStream.h            |   1 -
 include/geos/io/ByteOrderValues.h                  |   2 +-
 include/geos/platform.h.in                         | 116 ------
 include/geos/platform.h.vc                         |  60 ----
 include/geos/precision/CommonBits.h                |   2 +-
 include/geos/precision/EnhancedPrecisionOp.h       |   2 +-
 src/Makefile.vc                                    | 394 ---------------------
 src/algorithm/CGAlgorithmsDD.cpp                   |   6 +-
 src/algorithm/HCoordinate.cpp                      |   7 +-
 src/algorithm/InteriorPointLine.cpp                |   1 +
 src/algorithm/InteriorPointPoint.cpp               |   2 +-
 src/algorithm/LineIntersector.cpp                  |  76 ++--
 src/algorithm/MinimumDiameter.cpp                  |   1 +
 src/algorithm/RobustDeterminant.cpp                |   3 +-
 src/geom/Coordinate.cpp                            |   5 +-
 src/geom/CoordinateArraySequence.cpp               |   2 +-
 src/geom/GeometryFactory.cpp                       |   2 +-
 src/geom/LineSegment.cpp                           |   1 +
 src/geom/util/SineStarFactory.cpp                  |   5 +-
 src/geomgraph/Node.cpp                             |   3 +-
 src/io/ByteOrderValues.cpp                         |   2 +-
 src/io/WKTWriter.cpp                               |   3 +-
 src/operation/buffer/BufferOp.cpp                  |   2 +-
 src/operation/buffer/BufferParameters.cpp          |   6 +-
 src/operation/buffer/OffsetCurveSetBuilder.cpp     |   2 +-
 src/operation/distance/DistanceOp.cpp              |   1 +
 src/operation/overlay/ElevationMatrix.cpp          |  12 +-
 src/operation/overlay/ElevationMatrixCell.cpp      |   6 +-
 src/operation/overlay/LineBuilder.cpp              |   3 +-
 src/operation/overlay/OverlayOp.cpp                |   4 +-
 src/operation/valid/IsValidOp.cpp                  |  16 +-
 .../algorithm/ConnectedSubgraphFinder.cpp          |   2 +-
 src/precision/CommonBits.cpp                       |   2 +-
 src/util/GeometricShapeFactory.cpp                 |   4 +-
 tests/perf/ClassSizes.cpp                          |   2 +-
 .../distance/DiscreteFrechetDistanceTest.cpp       |   2 +-
 .../distance/DiscreteHausdorffDistanceTest.cpp     |   2 +-
 tests/unit/capi/GEOSDistanceTest.cpp               |   6 +-
 tests/unit/geom/CoordinateArraySequenceTest.cpp    |   4 +-
 tests/unit/geom/CoordinateTest.cpp                 |  15 +-
 tests/unit/geom/TriangleTest.cpp                   |   9 +-
 tests/unit/geom/util/GeometryExtracterTest.cpp     |   2 +-
 tests/unit/io/ByteOrderValuesTest.cpp              |   2 +-
 tests/unit/io/WKBWriterTest.cpp                    |   4 +-
 tests/unit/linearref/LengthIndexedLineTest.cpp     |   3 +-
 tests/unit/operation/buffer/BufferBuilderTest.cpp  |   2 +-
 tests/unit/operation/buffer/BufferOpTest.cpp       |   2 +-
 .../unit/operation/buffer/BufferParametersTest.cpp |   2 +-
 tests/unit/operation/distance/DistanceOpTest.cpp   |   2 +-
 tests/unit/operation/linemerge/LineMergerTest.cpp  |   2 +-
 .../unit/operation/linemerge/LineSequencerTest.cpp |   2 +-
 .../operation/sharedpaths/SharedPathsOpTest.cpp    |   2 +-
 tests/unit/operation/valid/IsValidTest.cpp         |   8 +-
 tests/unit/operation/valid/ValidClosedRingTest.cpp |   2 +-
 .../valid/ValidSelfTouchingRingFormingHoleTest.cpp |   2 +-
 tests/unit/precision/CommonBitsTest.cpp            |   2 +-
 83 files changed, 162 insertions(+), 792 deletions(-)
 rename include/geos/{platform.h.cmake => constants.h} (69%)
 delete mode 100644 include/geos/platform.h.in
 delete mode 100755 include/geos/platform.h.vc
 delete mode 100644 src/Makefile.vc


hooks/post-receive
-- 
GEOS


More information about the geos-commits mailing list