Skip to content

Commit

Permalink
geography/geos: Update to 3.13.0
Browse files Browse the repository at this point in the history
packaging changes:
  - change to cmake/build.mk
  - set test target (tests pass on NetBSD 10 amd64)
  - update HOMEPAGE
  - adjust revbumping instructions, because depending pcakages no
    longer wrongly link to the C++ library

* NEWS: Changes in 3.13.0 (2024-09-06)

- New things:
  - Add Angle::sinCosSnap to avoid small errors, e.g. with buffer operations (GH-978, Mike Taves)
  - Add classes for curved geometry types: CircularString, CompoundCurve, CurvedPolygon, MultiCurve,
    MultiSurface (GH-1046, Dan Baston/German QGIS users group/Canton of Basel-Landschaft/Canton of Zug)
  - Support curved geometry types in WKT/WKB readers/writers (GH-1046, GH-1104, GH-1106, Dan Baston)
  - 3D read and write support for GeoJSON (GH-1150, Oreilles)
  - Port of RelateNG locationtech/jts#1052 (Martin Davis, Paul Ramsey)
    - Rewrite of boolean predicates and relate matrix calculations
    - "Prepared" mode now available for all predicates and relate matrix
    - CAPI functions GEOSPreparedRelate and GEOSPreparedRelatePattern expose new functionality
    - CAPI implementations of GEOSPreparedTouches, etc, that were previously defaulting
      into non-prepared implementations now default into the RelateNG prepared implementation
    - Prepared implementations for Intersects, Covers, still use the older implementations
    - https://lin-ear-th-inking.blogspot.com/2024/05/jts-topological-relationships-next.html
    - https://lin-ear-th-inking.blogspot.com/2024/05/relateng-performance.html

- Breaking Changes
  - Zero-length linestrings (eg LINESTRING(1 1, 1 1)) are now treated as equivalent to points (POINT(1 1)) in boolean predicates
  - CMake 3.15 or later is requried (GH-1143, Mike Taves)

* https://libgeos.org/posts/2024-09-06-geos-3-13-released/

This secion restates the NEWS with a different organization.

The headline features of this release are:

- A new approach to boolean predicates via RelateNG

  - Faster performance for many cases where a short circuit is available
  - Avoiding the full computation of a topology graph for every call
  - Ability to use a high speed “prepared” approach for the complete set of predicates as well as the relate matrix functions

- Initial support for ISO SQL/MM curve types

  - Create, read and write support for CircularString, CompoundCurve, CurvedPolygon, MultiCurve, MultiSurface

This release includes the following new features in the C API (and of course underlying changes to the C++ code to support these features):

- GEOSGeom_createEmptyCircularString() creates a new empty CircularString
- GEOSGeom_createCircularString(coordseq) creates a CircularString with the supplied coordinates
- GEOSGeom_createEmptyCompoundCurve() creates a new empty CompoundCurve
- GEOSGeom_createCompoundCurve(curves, ncurves) creates a CompoundCurve with the supplied components (start/end coordinates must match up)
- GEOSGeom_createEmptyCurvePolygon() creates a new empty CurvePolygon
- GEOSGeom_createCurvePolygon(shell, holes, nholes) creates a CurvePolygon with the supplied rings
- GEOSPreparedRelate(prepgeom, geom) generates a DE9IM intersection matrix for the geometry pair, where one input has been “prepared” for fast repeated calls
- GEOSPreparedRelatePattern(prepgeom, geom, pattern) tests a pair of geometry against a known DE9IM pattern to see if the relationship is consistent with the pattern
  • Loading branch information
gdt committed Sep 8, 2024
1 parent e774c6a commit a8258fe
Show file tree
Hide file tree
Showing 3 changed files with 70 additions and 36 deletions.
52 changes: 23 additions & 29 deletions geography/geos/Makefile
Original file line number Diff line number Diff line change
@@ -1,59 +1,53 @@
# $NetBSD: Makefile,v 1.50 2024/06/05 22:33:56 gdt Exp $
# $NetBSD: Makefile,v 1.51 2024/09/08 00:51:56 gdt Exp $

VERSION_BASE= 3.12.2
VERSION_BASE= 3.13.0
# Accomodate testing unreleased versions.
#VERSION_RC= beta2
VERSION_RC=
VERSION= ${VERSION_BASE}${VERSION_RC}
DISTNAME= geos-${VERSION}
EXTRACT_SUFX= .tar.bz2
CATEGORIES= geography
MASTER_SITES= http://download.osgeo.org/geos/

# geos has two libraries:
# geos_c (C), which follows normal versioning rules
# geos (C++), which uses -release, and changes on every release

# According to the geos project (as documented in README), the C++
# interface should not be directly used and other packages should not
# link against it. Therefore, in theory pkgsrc would perform a
# recursive revbump when the libgeos_c.so version changes, and would
# generally ignore libgeos.so shlib name changes.
#
# However, libtool explicitly adds dependency_libs, so packages that
# intend to only depend on the C library end up being linked directly
# to the C++ library also. Thus, they need revbumping because of
# libtools {bug or feature}.
#
# Packages that need revbumping because of libtool's behavior:
# geography/gdal-lib
# geography/py-gdal
# Packages that need revbumping because of direct use of the C++ lib:
# (none known)

MAINTAINER= [email protected]
HOMEPAGE= https://trac.osgeo.org/geos
HOMEPAGE= https://libgeos.org/
COMMENT= C++ port of the Java Topology Suite (JTS)
LICENSE= gnu-lgpl-v2.1

USE_LANGUAGES= c c++

USE_CXX_FEATURES+= c++14

USE_CMAKE= yes
#PKG_DEBUG_LEVEL?= 1
.include "../../devel/cmake/build.mk"
# cmake hides what it is doing; ask it to be like traditional builds.
MAKE_FLAGS+= VERBOSE=1

# Note that the new geos cmake build system is broken and misorders
# RPATH for tests, leading to testing the installed geos instead of
# the built geos. Reported upstream via email 202110, and probably
# it's a cmake bug.
TEST_TARGET= check
TEST_TARGET= test
# pthreads are used in tests only, to validate that the thread-safe
# API to geos, which is not threaded, works. In that API, callers
# provide context so that the library does not use internal state.
# For now, leave it out on the theory that it's found anyway,
# optimizing for the package not the tests.
#.include "../../mk/pthread.buildlink3.mk"

# geos has two libraries:
# geos_c (C), which follows normal versioning rules
# geos (C++), which uses -release, and changes on every release

# According to the geos project (as documented in README), the C++
# interface should not be directly used and other packages should not
# link against it. Therefore, in theory pkgsrc would perform a
# recursive revbump when the libgeos_c.so version changes, and no
# bumping is needed because the libgeos.so shlib version changes.
#
# As of 2024-09, the theory holds and no library is known to link
# against libgeos.
find_cxx_users:
for p in /usr/pkg/bin/*; do g=`objdump -x $$p 2>/dev/null | egrep NEEDED | egrep geos`; if [ "$$g" != "" ]; then echo $$p $$g; fi; done
find /usr/pkg/lib -type f | egrep /lib*.so | while read p; do g=`objdump -x $$p 2>/dev/null | egrep NEEDED | egrep geos`; if [ "$$g" != "" ]; then echo $$p $$g; fi; done
find /usr/pkg/libexec -type f | while read p; do g=`objdump -x $$p 2>/dev/null | egrep NEEDED | egrep geos`; if [ "$$g" != "" ]; then echo $$p $$g; fi; done

.include "../../mk/bsd.pkg.mk"
46 changes: 43 additions & 3 deletions geography/geos/PLIST
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@comment $NetBSD: PLIST,v 1.27 2024/06/05 22:33:56 gdt Exp $
@comment $NetBSD: PLIST,v 1.28 2024/09/08 00:51:56 gdt Exp $
bin/geos-config
bin/geosop
include/geos.h
Expand All @@ -8,6 +8,7 @@ include/geos/algorithm/BoundaryNodeRule.h
include/geos/algorithm/CGAlgorithmsDD.h
include/geos/algorithm/CentralEndpointIntersector.h
include/geos/algorithm/Centroid.h
include/geos/algorithm/CircularArcs.h
include/geos/algorithm/ConvexHull.h
include/geos/algorithm/Distance.h
include/geos/algorithm/HCoordinate.h
Expand All @@ -31,6 +32,8 @@ include/geos/algorithm/RayCrossingCounter.h
include/geos/algorithm/Rectangle.h
include/geos/algorithm/RobustDeterminant.h
include/geos/algorithm/SimplePointInRing.h
include/geos/algorithm/construct/IndexedDistanceToPoint.h
include/geos/algorithm/construct/IndexedPointInPolygonsLocator.h
include/geos/algorithm/construct/LargestEmptyCircle.h
include/geos/algorithm/construct/MaximumInscribedCircle.h
include/geos/algorithm/distance/DiscreteFrechetDistance.h
Expand Down Expand Up @@ -65,34 +68,45 @@ include/geos/edgegraph/HalfEdge.h
include/geos/edgegraph/MarkHalfEdge.h
include/geos/export.h
include/geos/geom.h
include/geos/geom/CircularArc.h
include/geos/geom/CircularString.h
include/geos/geom/CompoundCurve.h
include/geos/geom/Coordinate.h
include/geos/geom/CoordinateFilter.h
include/geos/geom/CoordinateList.h
include/geos/geom/CoordinateSequence.h
include/geos/geom/CoordinateSequenceFilter.h
include/geos/geom/CoordinateSequenceIterator.h
include/geos/geom/CoordinateSequences.h
include/geos/geom/Curve.h
include/geos/geom/CurvePolygon.h
include/geos/geom/Dimension.h
include/geos/geom/Envelope.h
include/geos/geom/Geometry.h
include/geos/geom/GeometryCollection.h
include/geos/geom/GeometryComponentFilter.h
include/geos/geom/GeometryFactory.h
include/geos/geom/GeometryFilter.h
include/geos/geom/GeometryTypeName.h
include/geos/geom/HeuristicOverlay.h
include/geos/geom/IntersectionMatrix.h
include/geos/geom/LineSegment.h
include/geos/geom/LineString.h
include/geos/geom/LinearRing.h
include/geos/geom/Location.h
include/geos/geom/MultiCurve.h
include/geos/geom/MultiLineString.h
include/geos/geom/MultiPoint.h
include/geos/geom/MultiPolygon.h
include/geos/geom/MultiSurface.h
include/geos/geom/Point.h
include/geos/geom/Polygon.h
include/geos/geom/Position.h
include/geos/geom/PrecisionModel.h
include/geos/geom/Quadrant.h
include/geos/geom/SimpleCurve.h
include/geos/geom/Surface.h
include/geos/geom/SurfaceImpl.h
include/geos/geom/Triangle.h
include/geos/geom/prep/AbstractPreparedPolygonContains.h
include/geos/geom/prep/BasicPreparedGeometry.h
Expand All @@ -118,12 +132,14 @@ include/geos/geom/util/GeometryEditor.h
include/geos/geom/util/GeometryEditorOperation.h
include/geos/geom/util/GeometryExtracter.h
include/geos/geom/util/GeometryFixer.h
include/geos/geom/util/GeometryLister.h
include/geos/geom/util/GeometryMapper.h
include/geos/geom/util/GeometryTransformer.h
include/geos/geom/util/LinearComponentExtracter.h
include/geos/geom/util/NoOpGeometryOperation.h
include/geos/geom/util/PointExtracter.h
include/geos/geom/util/PolygonExtracter.h
include/geos/geom/util/PolygonalExtracter.h
include/geos/geom/util/ShortCircuitedGeometryVisitor.h
include/geos/geom/util/SineStarFactory.h
include/geos/geomgraph/Depth.h
Expand Down Expand Up @@ -373,6 +389,30 @@ include/geos/operation/relate/RelateNode.h
include/geos/operation/relate/RelateNodeFactory.h
include/geos/operation/relate/RelateNodeGraph.h
include/geos/operation/relate/RelateOp.h
include/geos/operation/relateng/AdjacentEdgeLocator.h
include/geos/operation/relateng/BasicPredicate.h
include/geos/operation/relateng/DimensionLocation.h
include/geos/operation/relateng/EdgeSegmentIntersector.h
include/geos/operation/relateng/EdgeSegmentOverlapAction.h
include/geos/operation/relateng/EdgeSetIntersector.h
include/geos/operation/relateng/IMPatternMatcher.h
include/geos/operation/relateng/IMPredicate.h
include/geos/operation/relateng/IntersectionMatrixPattern.h
include/geos/operation/relateng/LineStringExtracter.h
include/geos/operation/relateng/LinearBoundary.h
include/geos/operation/relateng/NodeSection.h
include/geos/operation/relateng/NodeSections.h
include/geos/operation/relateng/PolygonNodeConverter.h
include/geos/operation/relateng/RelateEdge.h
include/geos/operation/relateng/RelateGeometry.h
include/geos/operation/relateng/RelateMatrixPredicate.h
include/geos/operation/relateng/RelateNG.h
include/geos/operation/relateng/RelateNode.h
include/geos/operation/relateng/RelatePointLocator.h
include/geos/operation/relateng/RelatePredicate.h
include/geos/operation/relateng/RelateSegmentString.h
include/geos/operation/relateng/TopologyComputer.h
include/geos/operation/relateng/TopologyPredicate.h
include/geos/operation/sharedpaths/SharedPathsOp.h
include/geos/operation/union/CascadedPolygonUnion.h
include/geos/operation/union/CoverageUnion.h
Expand Down Expand Up @@ -479,8 +519,8 @@ lib/cmake/GEOS/geos-config.cmake
lib/cmake/GEOS/geos-targets-release.cmake
lib/cmake/GEOS/geos-targets.cmake
lib/libgeos.so
lib/libgeos.so.3.12.2
lib/libgeos.so.3.13.0
lib/libgeos_c.so
lib/libgeos_c.so.1
lib/libgeos_c.so.1.18.2
lib/libgeos_c.so.1.19.0
lib/pkgconfig/geos.pc
8 changes: 4 additions & 4 deletions geography/geos/distinfo
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
$NetBSD: distinfo,v 1.50 2024/06/05 22:33:56 gdt Exp $
$NetBSD: distinfo,v 1.51 2024/09/08 00:51:56 gdt Exp $

BLAKE2s (geos-3.12.2.tar.bz2) = 8a21dc07a95e61888443bc1ac0c1c6dfe4d2eab0b2b4484409172c16bf136201
SHA512 (geos-3.12.2.tar.bz2) = af9b0eb2475c81407f0c7e2a61667bc4d90e862798b155ee40a59e7fde3d38488ef10f930e9cf309a83e436fb80e26e85e0f1d61b375b98110bbb1062645fb5d
Size (geos-3.12.2.tar.bz2) = 6756010 bytes
BLAKE2s (geos-3.13.0.tar.bz2) = 862b31b01bcae17488f24133f4205afdf3729b30cc5b654d3dba3697244a44a9
SHA512 (geos-3.13.0.tar.bz2) = 8ffaa3f49a8365db693ac948e9d66cf55321eb12151734c7da2775070b7804ffa607de2474b7019d6ea2a99d5e037fb1e8561bf9025e65ddd4bd1ba049382b28
Size (geos-3.13.0.tar.bz2) = 6801211 bytes
SHA1 (patch-ae) = 253ae5cf5c2705a80d89d996507e3e94f2a11296

0 comments on commit a8258fe

Please sign in to comment.