[Git][debian-gis-team/geos][upstream] New upstream version 3.10.1
Bas Couwenberg (@sebastic)
gitlab at salsa.debian.org
Wed Nov 3 05:26:01 GMT 2021
Bas Couwenberg pushed to branch upstream at Debian GIS Project / geos
Commits:
aaf73dcd by Bas Couwenberg at 2021-11-03T05:52:39+01:00
New upstream version 3.10.1
- - - - -
28 changed files:
- CMakeLists.txt
- NEWS
- README.md
- Version.txt
- − bisect_script.sh
- − cmake_install.cmake
- include/geos/io/WKBConstants.h
- include/geos/triangulate/quadedge/Vertex.h
- include/geos/util.h
- − include/geos/version.h
- − ltmain.sh
- src/algorithm/Distance.cpp
- src/algorithm/LineIntersector.cpp
- src/algorithm/MinimumBoundingCircle.cpp
- src/geom/LineSegment.cpp
- src/geom/util/Densifier.cpp
- src/geom/util/GeometryTransformer.cpp
- src/io/GeoJSONReader.cpp
- src/operation/union/CascadedPolygonUnion.cpp
- src/triangulate/VoronoiDiagramBuilder.cpp
- tests/unit/capi/GEOSDistanceTest.cpp
- tests/unit/capi/GEOSFrechetDistanceTest.cpp
- tests/unit/capi/GEOSGeom_setPrecisionTest.cpp
- tests/unit/capi/GEOSHausdorffDistanceTest.cpp
- tests/unit/capi/GEOSSTRtreeTest.cpp
- tests/unit/io/GeoJSONReaderTest.cpp
- − tools/geos-config
- − tools/geos.pc
Changes:
=====================================
CMakeLists.txt
=====================================
@@ -416,6 +416,10 @@ if(NOT _is_multi_config_generator)
"/debian/"
"/php/"
"/.*build-.*/"
+ "cmake_install\\\\.cmake"
+ "/include/geos/version\\\\.h\$"
+ "/tools/geos-config\$"
+ "/tools/geos\\\\.pc\$"
${PROJECT_BINARY_DIR}
)
=====================================
NEWS
=====================================
@@ -1,3 +1,14 @@
+Changes in 3.10.1
+2021-11-2
+
+- Fixes/Improvements:
+ - Fix mistake in constants used to select WKB flavor in C API (GH489, Paul Ramsey)
+ - Fix crash when reducing precision on a LinearRing (#1135, Paul Ramsey)
+ - Fix GeoJSON crash on invalid input (GH498, Even Rouault)
+ - Use std::sqrt exclusively for Solaris build (Paul Ramsey)
+ - Fix mistaken version numbers in some parts of 3.10.0 (Paul Ramsey)
+
+
Changes in 3.10.0
2021-10-20
=====================================
README.md
=====================================
@@ -14,18 +14,19 @@ The official Git repository is at [OSGEO Gitea](https://git.osgeo.org/gitea/geos
## Build status
-| CI | Main | 3.9 | 3.8 | 3.7 |
-| :---: | :--- | :--- | :--- | :--- |
-| GitHub | [![github](https://github.com/libgeos/geos/workflows/CI/badge.svg?branchmain)](https://github.com/libgeos/geos/actions?query=workflow%3ACI) | [![github](https://github.com/libgeos/geos/workflows/CI/badge.svg?branch=3.9)](https://github.com/libgeos/geos/actions?query=workflow%3ACI) | [![github](https://github.com/libgeos/geos/workflows/CI/badge.svg?branch=3.8)](https://github.com/libgeos/geos/actions?query=workflow%3ACI) | [![github](https://github.com/libgeos/geos/workflows/CI/badge.svg?branch=3.7)](https://github.com/libgeos/geos/actions?query=workflow%3ACI) |
-| GitLab CI | [![gitlab-ci](https://gitlab.com/geos/libgeos/badges/main/pipeline.svg)](https://gitlab.com/geos/libgeos/commits/master) | [![gitlab-ci](https://gitlab.com/geos/libgeos/badges/3.9/pipeline.svg)](https://gitlab.com/geos/libgeos/commits/3.9) | [![gitlab-ci](https://gitlab.com/geos/libgeos/badges/3.8/pipeline.svg)](https://gitlab.com/geos/libgeos/commits/3.8) | [![gitlab-ci](https://gitlab.com/geos/libgeos/badges/3.7/pipeline.svg)](https://gitlab.com/geos/libgeos/commits/3.7) |
-| Debbie | [![debbie](https://debbie.postgis.net/buildStatus/icon?job=GEOS_Master)](https://debbie.postgis.net/view/GEOS/job/GEOS_Master/) | [![debbie](https://debbie.postgis.net/buildStatus/icon?job=GEOS_Branch_3.9)](https://debbie.postgis.net/view/GEOS/job/GEOS_Branch_3.9/) | [![debbie](https://debbie.postgis.net/buildStatus/icon?job=GEOS_Branch_3.8)](https://debbie.postgis.net/view/GEOS/job/GEOS_Branch_3.8/) | [![debbie](https://debbie.postgis.net/buildStatus/icon?job=GEOS_Branch_3.7)](https://debbie.postgis.net/view/GEOS/job/GEOS_Branch_3.7/) |
-| Winnie | [![winnie](https://winnie.postgis.net:444/view/GEOS/job/GEOS_Master/badge/icon)](https://winnie.postgis.net:444/view/GEOS/job/GEOS_Master/) | [![winnie](https://winnie.postgis.net:444/view/GEOS/job/GEOS_Branch_3.9/badge/icon)](https://winnie.postgis.net:444/view/GEOS/job/GEOS_Branch_3.9/) | [![winnie](https://winnie.postgis.net:444/view/GEOS/job/GEOS_Branch_3.8/badge/icon)](https://winnie.postgis.net:444/view/GEOS/job/GEOS_Branch_3.8/) | [![winnie](https://winnie.postgis.net:444/view/GEOS/job/GEOS_Branch_3.7/badge/icon)](https://winnie.postgis.net:444/view/GEOS/job/GEOS_Branch_3.7/) |
-| Dronie | [![dronie](https://dronie.osgeo.org/api/badges/geos/geos/status.svg?branch=main)](https://dronie.osgeo.org/geos/geos?branch=master) | [![dronie](https://dronie.osgeo.org/api/badges/geos/geos/status.svg?branch=3.9)](https://dronie.osgeo.org/geos/geos?branch=3.9) | [![dronie](https://dronie.osgeo.org/api/badges/geos/geos/status.svg?branch=3.8)](https://dronie.osgeo.org/geos/geos?branch=3.8) | [![dronie](https://dronie.osgeo.org/api/badges/geos/geos/status.svg?branch=3.7)](https://dronie.osgeo.org/geos/geos?branch=3.7) |
-| AppVeyor | [![appveyor](https://ci.appveyor.com/api/projects/status/62aplwst722b89au/branch/main?svg=true)](https://ci.appveyor.com/project/dbaston/geos/branch/master) | [![appveyor](https://ci.appveyor.com/api/projects/status/62aplwst722b89au/branch/3.9?svg=true)](https://ci.appveyor.com/project/dbaston/geos/branch/3.9) | [![appveyor](https://ci.appveyor.com/api/projects/status/62aplwst722b89au/branch/3.8?svg=true)](https://ci.appveyor.com/project/dbaston/geos/branch/3.8) | [![appveyor](https://ci.appveyor.com/api/projects/status/62aplwst722b89au/branch/3.7?svg=true)](https://ci.appveyor.com/project/dbaston/geos/branch/3.7) |
-| Bessie | [![bessie](https://debbie.postgis.net/buildStatus/icon?job=GEOS_Worker_Run/label=bessie&build=last:${params.reference=refs/heads/main})](https://debbie.postgis.net/view/GEOS/job/GEOS_Worker_Run/label=bessie) | [![bessie](https://debbie.postgis.net/buildStatus/icon?job=GEOS_Worker_Run/label=bessie&build=last:${params.reference=refs/heads/3.9})](https://debbie.postgis.net/view/GEOS/job/GEOS_Worker_Run/label=bessie) | [![bessie](https://debbie.postgis.net/buildStatus/icon?job=GEOS_Worker_Run/label=bessie&build=last:${params.reference=refs/heads/3.8})](https://debbie.postgis.net/view/GEOS/job/GEOS_Worker_Run/label=bessie) | [![bessie](https://debbie.postgis.net/buildStatus/icon?job=GEOS_Worker_Run/label=bessie&build=last:${params.reference=refs/heads/3.7})](https://debbie.postgis.net/view/GEOS/job/GEOS_Worker_Run/label=bessie) |
-| Bessie32 | [![bessie32](https://debbie.postgis.net/buildStatus/icon?job=GEOS_Worker_Run/label=bessie32&build=last:${params.reference=refs/heads/main})](https://debbie.postgis.net/view/GEOS/job/GEOS_Worker_Run/label=bessie32) |[![bessie32](https://debbie.postgis.net/buildStatus/icon?job=GEOS_Worker_Run/label=bessie32&build=last:${params.reference=refs/heads/3.9})](https://debbie.postgis.net/view/GEOS/job/GEOS_Worker_Run/label=bessie32)| [![bessie32](https://debbie.postgis.net/buildStatus/icon?job=GEOS_Worker_Run/label=bessie32&build=last:${params.reference=refs/heads/3.8})](https://debbie.postgis.net/view/GEOS/job/GEOS_Worker_Run/label=bessie32) | [![bessie32](https://debbie.postgis.net/buildStatus/icon?job=GEOS_Worker_Run/label=bessie32&build=last:${params.reference=refs/heads/3.7})](https://debbie.postgis.net/view/GEOS/job/GEOS_Worker_Run/label=bessie32) |
-| Berrie64 | [![berrie64](https://debbie.postgis.net/buildStatus/icon?job=GEOS_Worker_Run/label=berrie64&build=last:${params.reference=refs/heads/main})](https://debbie.postgis.net/view/GEOS/job/GEOS_Worker_Run/label=berrie64) | [![berrie64](https://debbie.postgis.net/buildStatus/icon?job=GEOS_Worker_Run/label=berrie64&build=last:${params.reference=refs/heads/3.9})](https://debbie.postgis.net/view/GEOS/job/GEOS_Worker_Run/label=berrie64) | [![berrie64](https://debbie.postgis.net/buildStatus/icon?job=GEOS_Worker_Run/label=berrie64&build=last:${params.reference=refs/heads/3.8})](https://debbie.postgis.net/view/GEOS/job/GEOS_Worker_Run/label=berrie64) ||
-| Berrie | [![berrie](https://debbie.postgis.net/buildStatus/icon?job=GEOS_Worker_Run/label=berrie&build=last:${params.reference=refs/heads/main})](https://debbie.postgis.net/view/GEOS/job/GEOS_Worker_Run/label=berrie) |[![berrie](https://debbie.postgis.net/buildStatus/icon?job=GEOS_Worker_Run/label=berrie&build=last:${params.reference=refs/heads/3.9})](https://debbie.postgis.net/view/GEOS/job/GEOS_Worker_Run/label=berrie)|[![berrie](https://debbie.postgis.net/buildStatus/icon?job=GEOS_Worker_Run/label=berrie&build=last:${params.reference=refs/heads/3.8})](https://debbie.postgis.net/view/GEOS/job/GEOS_Worker_Run/label=berrie)||
+| CI | 3.10 |
+| :---: | :--- |
+| GitHub | [![github](https://github.com/libgeos/geos/workflows/CI/badge.svg?branch=3.10)](https://github.com/libgeos/geos/actions?query=workflow%3ACI) |
+| Azure | [![Build Status](https://dev.azure.com/libgeos/geos/_apis/build/status/libgeos.geos?branchName=3.10)](https://dev.azure.com/libgeos/geos/_build/latest?definitionId=2&branchName=3.10) |
+| GitLab CI | [![gitlab-ci](https://gitlab.com/geos/libgeos/badges/3.10/pipeline.svg)](https://gitlab.com/geos/libgeos/commits/3.10) |
+| Debbie | [![debbie](https://debbie.postgis.net/buildStatus/icon?job=GEOS_Branch_3.10)](https://debbie.postgis.net/view/GEOS/job/GEOS_Branch_3.10/) |
+| Winnie | [![winnie](https://winnie.postgis.net:444/view/GEOS/job/GEOS_Branch_3.10/badge/icon)](https://winnie.postgis.net:444/view/GEOS/job/GEOS_Branch_3.10/) |
+| Dronie | [![dronie](https://dronie.osgeo.org/api/badges/geos/geos/status.svg?branch=3.10)](https://dronie.osgeo.org/geos/geos?branch=3.10) |
+| AppVeyor | [![appveyor](https://ci.appveyor.com/api/projects/status/62aplwst722b89au/branch/3.10?svg=true)](https://ci.appveyor.com/project/dbaston/geos/branch/3.10) |
+| Bessie | [![bessie](https://debbie.postgis.net/buildStatus/icon?job=GEOS_Worker_Run/label=bessie&build=last:${params.reference=refs/heads/3.10})](https://debbie.postgis.net/view/GEOS/job/GEOS_Worker_Run/label=bessie) |
+| Bessie32 | [![bessie32](https://debbie.postgis.net/buildStatus/icon?job=GEOS_Worker_Run/label=bessie32&build=last:${params.reference=refs/heads/3.10})](https://debbie.postgis.net/view/GEOS/job/GEOS_Worker_Run/label=bessie32)
+| Berrie64 | [![berrie64](https://debbie.postgis.net/buildStatus/icon?job=GEOS_Worker_Run/label=berrie64&build=last:${params.reference=refs/heads/3.10})](https://debbie.postgis.net/view/GEOS/job/GEOS_Worker_Run/label=berrie64) |
+| Berrie | [![berrie](https://debbie.postgis.net/buildStatus/icon?job=GEOS_Worker_Run/label=berrie&build=last:${params.reference=refs/heads/3.10})](https://debbie.postgis.net/view/GEOS/job/GEOS_Worker_Run/label=berrie) |
## Build/install
=====================================
Version.txt
=====================================
@@ -2,7 +2,7 @@
# GEOS Versions
GEOS_VERSION_MAJOR=3
GEOS_VERSION_MINOR=10
-GEOS_VERSION_PATCH=0
+GEOS_VERSION_PATCH=1
# OPTIONS: "", "dev", "rc1" etc.
GEOS_PATCH_WORD=
=====================================
bisect_script.sh deleted
=====================================
@@ -1,44 +0,0 @@
-#!/bin/bash
-
-# git bisect start
-# git bisect good 6b153d67e24c36477faee2eb47e6f486b768cdc2
-# git bisect bad df1fd770c96c1919f63e675f997157c1914d480e
-# git bisect run ./bisect_script.sh
-#
-#
-# 3.8 release 6b153d67e24c36477faee2eb47e6f486b768cdc2
-# 3.9 release df1fd770c96c1919f63e675f997157c1914d480e
-#
-
-ROOT=`pwd`
-BLD=$ROOT/../geos-git-build
-LIB=$BLD/lib
-TST=$ROOT/../geos-performance/_build
-PERF=$TST/geos_perf
-NM="Australia buffer"
-CUTOFF=200
-
-echo "--------"
-echo "Running in $ROOT"
-
-echo "Building in $BLD"
-pushd $BLD
-cmake -DCMAKE_BUILD_TYPE=Release ../geos-git
-make
-popd
-
-echo "Running $PERF"
-export DYLD_LIBRARY_PATH=$LIB
-pushd $TST
-TIME=`$PERF | grep "$NM" | cut -f5 -d,`
-echo "Run time = $TIME"
-popd
-
-#if [ $TIME -lt $CUTOFF ]; then
-if [ $(echo "$TIME < $CUTOFF" | bc -l) -eq 1 ]; then
- # good
- exit 0
-else
- # bad
- exit 1
-fi
=====================================
cmake_install.cmake deleted
=====================================
@@ -1,160 +0,0 @@
-# Install script for directory: /Users/pramsey/Code/geos-git
-
-# Set the install prefix
-if(NOT DEFINED CMAKE_INSTALL_PREFIX)
- set(CMAKE_INSTALL_PREFIX "/usr/local")
-endif()
-string(REGEX REPLACE "/$" "" CMAKE_INSTALL_PREFIX "${CMAKE_INSTALL_PREFIX}")
-
-# Set the install configuration name.
-if(NOT DEFINED CMAKE_INSTALL_CONFIG_NAME)
- if(BUILD_TYPE)
- string(REGEX REPLACE "^[^A-Za-z0-9_]+" ""
- CMAKE_INSTALL_CONFIG_NAME "${BUILD_TYPE}")
- else()
- set(CMAKE_INSTALL_CONFIG_NAME "Release")
- endif()
- message(STATUS "Install configuration: \"${CMAKE_INSTALL_CONFIG_NAME}\"")
-endif()
-
-# Set the component getting installed.
-if(NOT CMAKE_INSTALL_COMPONENT)
- if(COMPONENT)
- message(STATUS "Install component: \"${COMPONENT}\"")
- set(CMAKE_INSTALL_COMPONENT "${COMPONENT}")
- else()
- set(CMAKE_INSTALL_COMPONENT)
- endif()
-endif()
-
-# Is this installation the result of a crosscompile?
-if(NOT DEFINED CMAKE_CROSSCOMPILING)
- set(CMAKE_CROSSCOMPILING "FALSE")
-endif()
-
-# Set default install directory permissions.
-if(NOT DEFINED CMAKE_OBJDUMP)
- set(CMAKE_OBJDUMP "/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/objdump")
-endif()
-
-if("x${CMAKE_INSTALL_COMPONENT}x" STREQUAL "xUnspecifiedx" OR NOT CMAKE_INSTALL_COMPONENT)
- file(INSTALL DESTINATION "${CMAKE_INSTALL_PREFIX}/lib" TYPE SHARED_LIBRARY FILES "/Users/pramsey/Code/geos-git/lib/libgeos.3.10.0dev.dylib")
- if(EXISTS "$ENV{DESTDIR}${CMAKE_INSTALL_PREFIX}/lib/libgeos.3.10.0dev.dylib" AND
- NOT IS_SYMLINK "$ENV{DESTDIR}${CMAKE_INSTALL_PREFIX}/lib/libgeos.3.10.0dev.dylib")
- if(CMAKE_INSTALL_DO_STRIP)
- execute_process(COMMAND "/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/strip" -x "$ENV{DESTDIR}${CMAKE_INSTALL_PREFIX}/lib/libgeos.3.10.0dev.dylib")
- endif()
- endif()
-endif()
-
-if("x${CMAKE_INSTALL_COMPONENT}x" STREQUAL "xUnspecifiedx" OR NOT CMAKE_INSTALL_COMPONENT)
- file(INSTALL DESTINATION "${CMAKE_INSTALL_PREFIX}/lib" TYPE SHARED_LIBRARY FILES "/Users/pramsey/Code/geos-git/lib/libgeos.dylib")
- if(EXISTS "$ENV{DESTDIR}${CMAKE_INSTALL_PREFIX}/lib/libgeos.dylib" AND
- NOT IS_SYMLINK "$ENV{DESTDIR}${CMAKE_INSTALL_PREFIX}/lib/libgeos.dylib")
- if(CMAKE_INSTALL_DO_STRIP)
- execute_process(COMMAND "/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/strip" -x "$ENV{DESTDIR}${CMAKE_INSTALL_PREFIX}/lib/libgeos.dylib")
- endif()
- endif()
-endif()
-
-if("x${CMAKE_INSTALL_COMPONENT}x" STREQUAL "xUnspecifiedx" OR NOT CMAKE_INSTALL_COMPONENT)
- file(INSTALL DESTINATION "${CMAKE_INSTALL_PREFIX}/lib" TYPE SHARED_LIBRARY FILES
- "/Users/pramsey/Code/geos-git/lib/libgeos_c.1.15.0.dylib"
- "/Users/pramsey/Code/geos-git/lib/libgeos_c.1.dylib"
- )
- foreach(file
- "$ENV{DESTDIR}${CMAKE_INSTALL_PREFIX}/lib/libgeos_c.1.15.0.dylib"
- "$ENV{DESTDIR}${CMAKE_INSTALL_PREFIX}/lib/libgeos_c.1.dylib"
- )
- if(EXISTS "${file}" AND
- NOT IS_SYMLINK "${file}")
- execute_process(COMMAND /usr/bin/install_name_tool
- -delete_rpath "/Users/pramsey/Code/geos-git/lib"
- "${file}")
- if(CMAKE_INSTALL_DO_STRIP)
- execute_process(COMMAND "/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/strip" -x "${file}")
- endif()
- endif()
- endforeach()
-endif()
-
-if("x${CMAKE_INSTALL_COMPONENT}x" STREQUAL "xUnspecifiedx" OR NOT CMAKE_INSTALL_COMPONENT)
- file(INSTALL DESTINATION "${CMAKE_INSTALL_PREFIX}/lib" TYPE SHARED_LIBRARY FILES "/Users/pramsey/Code/geos-git/lib/libgeos_c.dylib")
- if(EXISTS "$ENV{DESTDIR}${CMAKE_INSTALL_PREFIX}/lib/libgeos_c.dylib" AND
- NOT IS_SYMLINK "$ENV{DESTDIR}${CMAKE_INSTALL_PREFIX}/lib/libgeos_c.dylib")
- execute_process(COMMAND /usr/bin/install_name_tool
- -delete_rpath "/Users/pramsey/Code/geos-git/lib"
- "$ENV{DESTDIR}${CMAKE_INSTALL_PREFIX}/lib/libgeos_c.dylib")
- if(CMAKE_INSTALL_DO_STRIP)
- execute_process(COMMAND "/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/strip" -x "$ENV{DESTDIR}${CMAKE_INSTALL_PREFIX}/lib/libgeos_c.dylib")
- endif()
- endif()
-endif()
-
-if("x${CMAKE_INSTALL_COMPONENT}x" STREQUAL "xUnspecifiedx" OR NOT CMAKE_INSTALL_COMPONENT)
- if(EXISTS "$ENV{DESTDIR}${CMAKE_INSTALL_PREFIX}/lib/cmake/GEOS/geos-targets.cmake")
- file(DIFFERENT EXPORT_FILE_CHANGED FILES
- "$ENV{DESTDIR}${CMAKE_INSTALL_PREFIX}/lib/cmake/GEOS/geos-targets.cmake"
- "/Users/pramsey/Code/geos-git/CMakeFiles/Export/lib/cmake/GEOS/geos-targets.cmake")
- if(EXPORT_FILE_CHANGED)
- file(GLOB OLD_CONFIG_FILES "$ENV{DESTDIR}${CMAKE_INSTALL_PREFIX}/lib/cmake/GEOS/geos-targets-*.cmake")
- if(OLD_CONFIG_FILES)
- message(STATUS "Old export file \"$ENV{DESTDIR}${CMAKE_INSTALL_PREFIX}/lib/cmake/GEOS/geos-targets.cmake\" will be replaced. Removing files [${OLD_CONFIG_FILES}].")
- file(REMOVE ${OLD_CONFIG_FILES})
- endif()
- endif()
- endif()
- file(INSTALL DESTINATION "${CMAKE_INSTALL_PREFIX}/lib/cmake/GEOS" TYPE FILE FILES "/Users/pramsey/Code/geos-git/CMakeFiles/Export/lib/cmake/GEOS/geos-targets.cmake")
- if("${CMAKE_INSTALL_CONFIG_NAME}" MATCHES "^([Rr][Ee][Ll][Ee][Aa][Ss][Ee])$")
- file(INSTALL DESTINATION "${CMAKE_INSTALL_PREFIX}/lib/cmake/GEOS" TYPE FILE FILES "/Users/pramsey/Code/geos-git/CMakeFiles/Export/lib/cmake/GEOS/geos-targets-release.cmake")
- endif()
-endif()
-
-if("x${CMAKE_INSTALL_COMPONENT}x" STREQUAL "xUnspecifiedx" OR NOT CMAKE_INSTALL_COMPONENT)
- file(INSTALL DESTINATION "${CMAKE_INSTALL_PREFIX}/lib/cmake/GEOS" TYPE FILE FILES
- "/Users/pramsey/Code/geos-git/geos-config.cmake"
- "/Users/pramsey/Code/geos-git/geos-config-version.cmake"
- )
-endif()
-
-if("x${CMAKE_INSTALL_COMPONENT}x" STREQUAL "xUnspecifiedx" OR NOT CMAKE_INSTALL_COMPONENT)
- file(INSTALL DESTINATION "${CMAKE_INSTALL_PREFIX}/include" TYPE DIRECTORY FILES
- "/Users/pramsey/Code/geos-git/include/geos"
- "/Users/pramsey/Code/geos-git/include/geos"
- FILES_MATCHING REGEX "/[^/]*\\.h$")
-endif()
-
-if("x${CMAKE_INSTALL_COMPONENT}x" STREQUAL "xUnspecifiedx" OR NOT CMAKE_INSTALL_COMPONENT)
- file(INSTALL DESTINATION "${CMAKE_INSTALL_PREFIX}/include" TYPE DIRECTORY FILES
- "/Users/pramsey/Code/geos-git/include/geos"
- "/Users/pramsey/Code/geos-git/include/geos"
- FILES_MATCHING REGEX "/[^/]*\\.inl$")
-endif()
-
-if("x${CMAKE_INSTALL_COMPONENT}x" STREQUAL "xUnspecifiedx" OR NOT CMAKE_INSTALL_COMPONENT)
- file(INSTALL DESTINATION "${CMAKE_INSTALL_PREFIX}/include" TYPE FILE FILES "/Users/pramsey/Code/geos-git/capi/geos_c.h")
-endif()
-
-if(NOT CMAKE_INSTALL_LOCAL_ONLY)
- # Include the install script for each subdirectory.
- include("/Users/pramsey/Code/geos-git/include/cmake_install.cmake")
- include("/Users/pramsey/Code/geos-git/src/cmake_install.cmake")
- include("/Users/pramsey/Code/geos-git/capi/cmake_install.cmake")
- include("/Users/pramsey/Code/geos-git/tests/cmake_install.cmake")
- include("/Users/pramsey/Code/geos-git/benchmarks/cmake_install.cmake")
- include("/Users/pramsey/Code/geos-git/util/cmake_install.cmake")
- include("/Users/pramsey/Code/geos-git/doc/cmake_install.cmake")
- include("/Users/pramsey/Code/geos-git/tools/cmake_install.cmake")
-
-endif()
-
-if(CMAKE_INSTALL_COMPONENT)
- set(CMAKE_INSTALL_MANIFEST "install_manifest_${CMAKE_INSTALL_COMPONENT}.txt")
-else()
- set(CMAKE_INSTALL_MANIFEST "install_manifest.txt")
-endif()
-
-string(REPLACE ";" "\n" CMAKE_INSTALL_MANIFEST_CONTENT
- "${CMAKE_INSTALL_MANIFEST_FILES}")
-file(WRITE "/Users/pramsey/Code/geos-git/${CMAKE_INSTALL_MANIFEST}"
- "${CMAKE_INSTALL_MANIFEST_CONTENT}")
=====================================
include/geos/io/WKBConstants.h
=====================================
@@ -41,8 +41,8 @@ namespace WKBConstants {
};
enum wkbFlavour {
- wkbIso = 1,
- wkbExtended = 2
+ wkbExtended = 1,
+ wkbIso = 2
};
}
=====================================
include/geos/triangulate/quadedge/Vertex.h
=====================================
@@ -19,7 +19,7 @@
#ifndef GEOS_TRIANGULATE_QUADEDGE_VERTEX_H
#define GEOS_TRIANGULATE_QUADEDGE_VERTEX_H
-#include <math.h>
+#include <cmath>
#include <memory>
#include <cstring>
@@ -234,8 +234,8 @@ private:
inline double
distance(const Vertex& v1, const Vertex& v2)
{
- return sqrt(pow(v2.getX() - v1.getX(), 2.0)
- + pow(v2.getY() - v1.getY(), 2.0));
+ return std::sqrt(pow(v2.getX() - v1.getX(), 2.0) +
+ pow(v2.getY() - v1.getY(), 2.0));
}
/**
=====================================
include/geos/util.h
=====================================
@@ -21,15 +21,10 @@
#ifndef GEOS_UTIL_H
#define GEOS_UTIL_H
-//#include <geos/util/AssertionFailedException.h>
#include <geos/util/GEOSException.h>
#include <geos/util/IllegalArgumentException.h>
#include <geos/util/TopologyException.h>
-//#include <geos/util/UnsupportedOperationException.h>
-//#include <geos/util/CoordinateArrayFilter.h>
-//#include <geos/util/UniqueCoordinateArrayFilter.h>
#include <geos/util/GeometricShapeFactory.h>
-//#include <geos/util/math.h>
#include <memory>
#include <type_traits>
=====================================
include/geos/version.h deleted
=====================================
@@ -1,37 +0,0 @@
-/**********************************************************************
- *
- * GEOS - Geometry Engine Open Source
- * http://geos.osgeo.org
- *
- * Copyright (C) 2007 Refractions Research 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.
- *
- **********************************************************************/
-#ifndef GEOS_VERSION_H_INCLUDED
-#define GEOS_VERSION_H_INCLUDED
-
-#ifndef GEOS_VERSION_MAJOR
-#define GEOS_VERSION_MAJOR 3
-#endif
-
-#ifndef GEOS_VERSION_MINOR
-#define GEOS_VERSION_MINOR 10
-#endif
-
-#ifndef GEOS_VERSION_PATCH
-#define GEOS_VERSION_PATCH 0dev
-#endif
-
-#ifndef GEOS_VERSION
-#define GEOS_VERSION "3.10.0dev"
-#endif
-
-#ifndef GEOS_JTS_PORT
-#define GEOS_JTS_PORT "1.17.0"
-#endif
-
-#endif // GEOS_VERSION_H_INCLUDED
=====================================
ltmain.sh deleted
=====================================
The diff for this file was not included because it is too large.
=====================================
src/algorithm/Distance.cpp
=====================================
@@ -75,7 +75,7 @@ Distance::pointToSegment(const geom::Coordinate& p,
double s = ((A.y - p.y) * (B.x - A.x) - (A.x - p.x) * (B.y - A.y)) /
((B.x - A.x) * (B.x - A.x) + (B.y - A.y) * (B.y - A.y));
- return fabs(s) * sqrt(((B.x - A.x) * (B.x - A.x) + (B.y - A.y) * (B.y - A.y)));
+ return std::fabs(s) * std::sqrt(((B.x - A.x) * (B.x - A.x) + (B.y - A.y) * (B.y - A.y)));
}
/*public static*/
@@ -97,7 +97,7 @@ Distance::pointToLinePerpendicular(const geom::Coordinate& p,
double s = ((A.y - p.y) * (B.x - A.x) - (A.x - p.x) * (B.y - A.y))
/
((B.x - A.x) * (B.x - A.x) + (B.y - A.y) * (B.y - A.y));
- return fabs(s) * sqrt(((B.x - A.x) * (B.x - A.x) + (B.y - A.y) * (B.y - A.y)));
+ return std::fabs(s) * std::sqrt(((B.x - A.x) * (B.x - A.x) + (B.y - A.y) * (B.y - A.y)));
}
/*public static*/
=====================================
src/algorithm/LineIntersector.cpp
=====================================
@@ -229,7 +229,7 @@ LineIntersector::interpolateZ(const Coordinate& p,
xoff = (p.x - p1.x);
yoff = (p.y - p1.y);
double pdist = (xoff * xoff + yoff * yoff);
- double fract = sqrt(pdist / seglen);
+ double fract = std::sqrt(pdist / seglen);
double zoff = zgap * fract;
//double interpolated = p1.z < p2.z ? p1.z+zoff : p1.z-zoff;
double interpolated = p1.z + zoff;
@@ -600,7 +600,7 @@ LineIntersector::zInterpolate(const Coordinate& p, const Coordinate& p1, const C
double xoff = (p.x - p1.x);
double yoff = (p.y - p1.y);
double plen = (xoff * xoff + yoff * yoff);
- double frac = sqrt(plen / seglen);
+ double frac = std::sqrt(plen / seglen);
double zoff = dz * frac;
double zInterpolated = p1z + zoff;
#if GEOS_DEBUG
=====================================
src/algorithm/MinimumBoundingCircle.cpp
=====================================
@@ -31,7 +31,7 @@
#include <geos/geom/Triangle.h>
#include <geos/util/GEOSException.h>
-#include <math.h> // sqrt
+#include <cmath> // sqrt
#include <memory> // for unique_ptr
#include <typeinfo>
#include <vector>
@@ -316,7 +316,7 @@ MinimumBoundingCircle::pointWitMinAngleWithX(std::vector<Coordinate>& pts, Coord
if(dy < 0) {
dy = -dy;
}
- double len = sqrt(dx * dx + dy * dy);
+ double len = std::sqrt(dx * dx + dy * dy);
double sin = dy / len;
if(sin < minSin) {
=====================================
src/geom/LineSegment.cpp
=====================================
@@ -279,7 +279,7 @@ LineSegment::pointAlongOffset(double segmentLengthFraction,
double dx = p1.x - p0.x;
double dy = p1.y - p0.y;
- double len = sqrt(dx * dx + dy * dy);
+ double len = std::sqrt(dx * dx + dy * dy);
double ux = 0.0;
double uy = 0.0;
=====================================
src/geom/util/Densifier.cpp
=====================================
@@ -18,7 +18,7 @@
*
**********************************************************************/
-#include <math.h>
+#include <cmath>
#include <geos/geom/util/Densifier.h>
#include <geos/geom/CoordinateSequenceFactory.h>
=====================================
src/geom/util/GeometryTransformer.cpp
=====================================
@@ -202,7 +202,7 @@ GeometryTransformer::transformLinearRing(
CoordinateSequence::Ptr seq(transformCoordinates(
geom->getCoordinatesRO(), geom));
- auto seqSize = seq->size();
+ std::size_t seqSize = seq ? seq->size() : 0;
// ensure a valid LinearRing
if(seqSize > 0 && seqSize < 4 && ! preserveType) {
=====================================
src/io/GeoJSONReader.cpp
=====================================
@@ -49,7 +49,7 @@ std::unique_ptr<geom::Geometry> GeoJSONReader::read(const std::string& geoJsonTe
{
try {
const json& j = json::parse(geoJsonText);
- const std::string& type = j["type"];
+ const std::string& type = j.at("type");
if (type == "Feature") {
return readFeatureForGeometry(j);
}
@@ -69,7 +69,7 @@ GeoJSONFeatureCollection GeoJSONReader::readFeatures(const std::string& geoJsonT
{
try {
const json& j = json::parse(geoJsonText);
- const std::string& type = j["type"];
+ const std::string& type = j.at("type");
if (type == "Feature") {
const auto& feature = readFeature(j);
return GeoJSONFeatureCollection { std::vector<GeoJSONFeature>{feature} };
@@ -90,15 +90,15 @@ GeoJSONFeatureCollection GeoJSONReader::readFeatures(const std::string& geoJsonT
std::unique_ptr<geom::Geometry> GeoJSONReader::readFeatureForGeometry(
const geos_nlohmann::json& j) const
{
- const auto& geometryJson = j["geometry"];
+ const auto& geometryJson = j.at("geometry");
auto geometry = readGeometry(geometryJson);
return geometry;
}
GeoJSONFeature GeoJSONReader::readFeature(const geos_nlohmann::json& j) const
{
- const auto& geometryJson = j["geometry"];
- const auto& properties = j["properties"];
+ const auto& geometryJson = j.at("geometry");
+ const auto& properties = j.at("properties");
return GeoJSONFeature{readGeometry(geometryJson), readProperties(properties)};
}
@@ -147,7 +147,7 @@ GeoJSONValue GeoJSONReader::readProperty(
std::unique_ptr<geom::Geometry> GeoJSONReader::readFeatureCollectionForGeometry(
const geos_nlohmann::json& j) const
{
- const auto& featuresJson = j["features"];
+ const auto& featuresJson = j.at("features");
std::vector<std::unique_ptr<geom::Geometry>> geometries;
geometries.reserve(featuresJson.size());
for (const auto& featureJson : featuresJson) {
@@ -160,7 +160,7 @@ std::unique_ptr<geom::Geometry> GeoJSONReader::readFeatureCollectionForGeometry(
GeoJSONFeatureCollection GeoJSONReader::readFeatureCollection(
const geos_nlohmann::json& j) const
{
- const auto& featuresJson = j["features"];
+ const auto& featuresJson = j.at("features");
std::vector<GeoJSONFeature> features;
features.reserve(featuresJson.size());
for (const auto& featureJson : featuresJson) {
@@ -173,7 +173,7 @@ GeoJSONFeatureCollection GeoJSONReader::readFeatureCollection(
std::unique_ptr<geom::Geometry> GeoJSONReader::readGeometry(
const geos_nlohmann::json& j) const
{
- const std::string& type = j["type"];
+ const std::string& type = j.at("type");
if (type == "Point") {
return readPoint(j);
}
@@ -217,7 +217,7 @@ geom::Coordinate GeoJSONReader::readCoordinate(
std::unique_ptr<geom::Point> GeoJSONReader::readPoint(
const geos_nlohmann::json& j) const
{
- const auto& coords = j["coordinates"].get<std::vector<double>>();
+ const auto& coords = j.at("coordinates").get<std::vector<double>>();
if (coords.size() == 1) {
throw ParseException("Expected two coordinates found one");
}
@@ -233,7 +233,7 @@ std::unique_ptr<geom::Point> GeoJSONReader::readPoint(
std::unique_ptr<geom::LineString> GeoJSONReader::readLineString(
const geos_nlohmann::json& j) const
{
- const auto& coords = j["coordinates"].get<std::vector<std::vector<double>>>();
+ const auto& coords = j.at("coordinates").get<std::vector<std::vector<double>>>();
std::vector<geom::Coordinate> coordinates;
coordinates.reserve(coords.size());
for (const auto& coord : coords) {
@@ -245,9 +245,9 @@ std::unique_ptr<geom::LineString> GeoJSONReader::readLineString(
}
std::unique_ptr<geom::Polygon> GeoJSONReader::readPolygon(
- const geos_nlohmann::json& json) const
+ const geos_nlohmann::json& j) const
{
- const auto& polygonCoords = json["coordinates"].get<std::vector<std::vector<std::vector<double>>>>();
+ const auto& polygonCoords = j.at("coordinates").get<std::vector<std::vector<std::vector<double>>>>();
return readPolygon(polygonCoords);
}
@@ -286,7 +286,7 @@ std::unique_ptr<geom::Polygon> GeoJSONReader::readPolygon(
std::unique_ptr<geom::MultiPoint> GeoJSONReader::readMultiPoint(
const geos_nlohmann::json& j) const
{
- const auto& coords = j["coordinates"].get<std::vector<std::vector<double>>>();
+ const auto& coords = j.at("coordinates").get<std::vector<std::vector<double>>>();
std::vector<std::unique_ptr<geom::Point>> points;
points.reserve(coords.size());
for (const auto& coord : coords) {
@@ -297,9 +297,9 @@ std::unique_ptr<geom::MultiPoint> GeoJSONReader::readMultiPoint(
}
std::unique_ptr<geom::MultiLineString> GeoJSONReader::readMultiLineString(
- const geos_nlohmann::json& json) const
+ const geos_nlohmann::json& j) const
{
- const auto& listOfCoords = json["coordinates"].get<std::vector<std::vector<std::vector<double>>>>();
+ const auto& listOfCoords = j.at("coordinates").get<std::vector<std::vector<std::vector<double>>>>();
std::vector<std::unique_ptr<geom::LineString>> lines;
lines.reserve(listOfCoords.size());
for (const auto& coords : listOfCoords) {
@@ -316,9 +316,9 @@ std::unique_ptr<geom::MultiLineString> GeoJSONReader::readMultiLineString(
}
std::unique_ptr<geom::MultiPolygon> GeoJSONReader::readMultiPolygon(
- const geos_nlohmann::json& json) const
+ const geos_nlohmann::json& j) const
{
- const auto& multiPolygonCoords = json["coordinates"].get<std::vector<std::vector<std::vector<std::vector<double>>>>>();
+ const auto& multiPolygonCoords = j.at("coordinates").get<std::vector<std::vector<std::vector<std::vector<double>>>>>();
std::vector<std::unique_ptr<geom::Polygon>> polygons;
polygons.reserve(multiPolygonCoords.size());
for (const auto& polygonCoords : multiPolygonCoords) {
@@ -330,7 +330,7 @@ std::unique_ptr<geom::MultiPolygon> GeoJSONReader::readMultiPolygon(
std::unique_ptr<geom::GeometryCollection> GeoJSONReader::readGeometryCollection(
const geos_nlohmann::json& j) const
{
- const auto& jsonGeometries = j["geometries"];
+ const auto& jsonGeometries = j.at("geometries");
std::vector<std::unique_ptr<geom::Geometry>> geometries;
geometries.reserve(jsonGeometries.size());
for (const auto& jsonGeometry : jsonGeometries) {
=====================================
src/operation/union/CascadedPolygonUnion.cpp
=====================================
@@ -120,18 +120,17 @@ CascadedPolygonUnion::binaryUnion(const std::vector<const geom::Geometry*> & geo
std::unique_ptr<geom::Geometry>
CascadedPolygonUnion::unionSafe(const geom::Geometry* g0, const geom::Geometry* g1) const
{
- if(g0 == nullptr && g1 == nullptr) {
- return nullptr;
+ if(g0 != nullptr && g1 != nullptr) {
+ return unionActual(g0, g1);
}
- if(g0 == nullptr) {
+ if(g1 != nullptr) {
return g1->clone();
}
- if(g1 == nullptr) {
+ if(g0 != nullptr) {
return g0->clone();
}
-
- return unionActual(g0, g1);
+ return nullptr;
}
std::unique_ptr<geom::Geometry>
=====================================
src/triangulate/VoronoiDiagramBuilder.cpp
=====================================
@@ -19,7 +19,7 @@
#include <geos/triangulate/VoronoiDiagramBuilder.h>
#include <algorithm>
-#include <math.h>
+#include <cmath>
#include <vector>
#include <iostream>
=====================================
tests/unit/capi/GEOSDistanceTest.cpp
=====================================
@@ -11,7 +11,7 @@
#include <cstdlib>
#include <fenv.h>
#include <memory>
-#include <math.h>
+#include <cmath>
#include "capi_test_utils.h"
@@ -134,7 +134,7 @@ void object::test<4>
int status = GEOSDistance(g1, g2, &d);
ensure_equals(status, 1);
- ensure_equals(d, sqrt(2));
+ ensure_equals(d, std::sqrt(2));
// check for floating point overflow exceptions
int raised = fetestexcept(FE_OVERFLOW);
@@ -160,7 +160,7 @@ void object::test<5>
int status = GEOSDistance(g1, g2, &d);
ensure_equals(status, 1);
- // ensure_equals(d, sqrt(2));
+ // ensure_equals(d, std::sqrt(2));
// check for floating point overflow exceptions
int raised = fetestexcept(FE_OVERFLOW);
=====================================
tests/unit/capi/GEOSFrechetDistanceTest.cpp
=====================================
@@ -9,7 +9,7 @@
#include <cstdio>
#include <cstdlib>
#include <memory>
-#include <math.h>
+#include <cmath>
#include "capi_test_utils.h"
=====================================
tests/unit/capi/GEOSGeom_setPrecisionTest.cpp
=====================================
@@ -158,5 +158,16 @@ void object::test<9> ()
ensure_geometry_equals(geom2_, "LINESTRING (0 0, 0 0)");
}
+
+// Collapse a linearRing / Trac #1135
+template<>
+template<>
+void object::test<10> ()
+{
+ geom1_ = fromWKT("LINEARRING (0 0, 0.1 0, 0.1 0.1, 0 0.1, 0 0)");
+ geom2_ = GEOSGeom_setPrecision(geom1_, 1.0, 0);
+ ensure_geometry_equals(geom2_, "LINEARRING EMPTY");
+}
+
} // namespace tut
=====================================
tests/unit/capi/GEOSHausdorffDistanceTest.cpp
=====================================
@@ -9,7 +9,7 @@
#include <cstdio>
#include <cstdlib>
#include <memory>
-#include <math.h>
+#include <cmath>
#include "capi_test_utils.h"
=====================================
tests/unit/capi/GEOSSTRtreeTest.cpp
=====================================
@@ -38,7 +38,7 @@ INTPOINT_dist(const void* a, const void* b, double* distance, void*)
int dx = p2->x - p1->x;
int dy = p2->y - p1->y;
- *distance = sqrt(static_cast<double>(dx * dx) + dy * dy);
+ *distance = std::sqrt(static_cast<double>(dx * dx) + dy * dy);
return 1;
}
=====================================
tests/unit/io/GeoJSONReaderTest.cpp
=====================================
@@ -437,5 +437,22 @@ void object::test<29>
ensure_equals("ParseException: Expected two coordinates found more than two", errorMessage);
}
+// Throw ParseException for bad GeoJSON
+template<>
+template<>
+void object::test<30>
+()
+{
+ std::string errorMessage;
+ std::string geojson { "{ \"missing\": \"type\" }" };
+ bool error = false;
+ try {
+ GeomPtr geom(geojsonreader.read(geojson));
+ } catch (geos::io::ParseException& e) {
+ error = true;
+ }
+ ensure(error == true);
+}
+
}
=====================================
tools/geos-config deleted
=====================================
@@ -1,77 +0,0 @@
-#!/bin/sh
-
-prefix=/usr/local
-libdir=${prefix}/lib
-
-usage()
-{
- cat <<EOF
-Usage: geos-config [OPTIONS]
-Options:
- [--prefix]
- [--version]
- [--libs]
- [--clibs]
- [--cclibs]
- [--static-clibs]
- [--static-cclibs]
- [--cflags]
- [--ldflags]
- [--includes]
- [--jtsport]
-EOF
- exit $1
-}
-
-if test $# -eq 0; then
- usage 1 1>&2
-fi
-
-while test $# -gt 0; do
- case "$1" in
- -*=*) optarg=`echo "$1" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
- *) optarg= ;;
- esac
- case $1 in
- --prefix)
- echo ${prefix}
- ;;
- --version)
- echo 3.10.0dev
- ;;
- --libs)
- # TODO: make an alias for --clibs
- # see http://trac.osgeo.org/geos/ticket/497
- echo -L${libdir} -lgeos-3
- ;;
- --clibs)
- echo -L${libdir} -lgeos_c
- ;;
- --cclibs)
- echo -L${libdir} -lgeos
- ;;
- --static-clibs)
- echo -L${libdir} -lgeos_c -lgeos -lm
- ;;
- --static-cclibs)
- echo -L${libdir} -lgeos -lm
- ;;
- --cflags)
- echo -I${prefix}/include
- ;;
- --ldflags)
- echo -L${libdir}
- ;;
- --includes)
- echo ${prefix}/include
- ;;
- --jtsport)
- echo 1.17.0
- ;;
- *)
- usage 1 1>&2
- ;;
- esac
- shift
-done
-
=====================================
tools/geos.pc deleted
=====================================
@@ -1,11 +0,0 @@
-prefix=/usr/local
-exec_prefix=${prefix}
-includedir=${prefix}/include
-libdir=${prefix}/lib
-
-Name: GEOS
-Description: Geometry Engine, Open Source - C API
-Requires:
-Version: 3.10.0dev
-Cflags: -I${includedir}
-Libs: -L${libdir} -lgeos_c
View it on GitLab: https://salsa.debian.org/debian-gis-team/geos/-/commit/aaf73dcdc5cec448e7e046d0068935060387172e
--
View it on GitLab: https://salsa.debian.org/debian-gis-team/geos/-/commit/aaf73dcdc5cec448e7e046d0068935060387172e
You're receiving this email because of your account on salsa.debian.org.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/pkg-grass-devel/attachments/20211103/0fabb7a4/attachment-0001.htm>
More information about the Pkg-grass-devel
mailing list