Package: wkpool 0.5.0

Michael Sumner

wkpool: Vertex Pool Topology for Well-Known Geometry

Establishes and maintains vertex pool topology for geometry handled by 'wk'. Segments are the atomic unit, vertices are shared via integer references into a pool. Topology is made discoverable via coincident vertex detection while not requiring modification of the input data. Topological data models follow principles described in Worboys and Duckham (2004, ISBN:978-0415283755). The edge-based topology geometry decomposed into vertices and directed edge pairs is a simplification of the quad-edge case in Guibas and Stolfi (1985) <doi:10.1145/282918.282923>. Triangle pools on the same vertices answer common polygon questions (area, centroid, the DE-9IM relation between regions, point location, boundaries, clipping, union) from the triangles directly, with exact orientation tests after Shewchuk (1997) <doi:10.1007/PL00009321>.

Authors:Michael Sumner [aut, cre, cph]

wkpool_0.5.0.tar.gz
wkpool_0.5.0.zip(r-4.7-x86_64)wkpool_0.5.0.zip(r-4.7-arm64)wkpool_0.5.0.zip(r-4.6-x86_64)wkpool_0.5.0.zip(r-4.6-arm64)wkpool_0.5.0.zip(r-4.5-x86_64)
wkpool_0.5.0.tgz(r-4.6-x86_64)wkpool_0.5.0.tgz(r-4.6-arm64)wkpool_0.5.0.tgz(r-4.5-x86_64)wkpool_0.5.0.tgz(r-4.5-arm64)
wkpool_0.5.0.tar.gz(r-4.7-arm64)wkpool_0.5.0.tar.gz(r-4.7-x86_64)wkpool_0.5.0.tar.gz(r-4.6-arm64)wkpool_0.5.0.tar.gz(r-4.6-x86_64)
wkpool_0.5.0.tgz(r-4.6-emscripten)
manual.pdf |manual.html✨
DESCRIPTION |NEWS
card.svg |card.png
wkpool/json (API)

# Install 'wkpool' in R:
install.packages('wkpool', repos = c('https://hypertidy.r-universe.dev', 'https://cloud.r-project.org'))

Bug tracker:https://github.com/hypertidy/wkpool/issues

Pkgdown/docs site:https://hypertidy.github.io

Uses libs:
  • c++– GNU Standard C++ Library v3

On CRAN:

Conda:

cpp

6.80 score 6 stars 1 packages 16 scripts 437 downloads 53 exports 7 dependencies

Last updated from:bc3653c1ec. Checks:15 OK. Indexed: yes.

TargetResultTimeFilesSyslog
linux-devel-arm64OK144
linux-devel-x86_64OK142
source / vignettesOK215
linux-release-arm64OK140
linux-release-x86_64OK131
macos-release-arm64OK117
macos-release-x86_64OK291
macos-oldrel-arm64OK106
macos-oldrel-x86_64OK190
windows-devel-arm64OK222
windows-devel-x86_64OK147
windows-release-arm64OK225
windows-release-x86_64OK115
windows-oldrel-x86_64OK98
wasm-releaseOK93

Exports:arc_node_summaryarcs_to_wkbarcs_to_wktas_arcsas_pslgclassify_cyclescycle_signed_areacycles_to_wkbcycles_to_wktestablish_topologyfind_arcsfind_cyclesfind_facesfind_internal_boundariesfind_neighboursfind_nodesfind_shared_edgeshole_pointsmerge_coincidentnew_wkpoolnew_wkpool_tripool_combinepool_compactpool_featurepool_holespool_pathpool_pathspool_segmentspool_trianglespool_triangulatepool_verticesreverse_cyclesegments_to_wkbsegments_to_wkttopology_reporttri_as_arrowtri_boundarytri_clip_recttri_convex_hulltri_dissolvetri_from_arrowtri_is_preparedtri_locatetri_measurestri_neighbourstri_overlaytri_overlay_relatetri_preparetri_relatetri_segmentstri_structurevertex_degreewkpool

Dependencies:clicpp11gluelifecyclerlangvctrswk

Questions on a mesh
A small coverage | Measures | Relations | Points | Parts and holes | Boundaries, clipping and hulls | Preparing a mesh for many questions | Relations between layers | Triangles in Arrow | Checking against GEOS | When it applies

Last update: 2026-11-16
Started: 2026-11-15

Triangulation
Ear cutting | A real coverage | Constrained Delaunay: the PSLG route | Back to a triangle pool | The islands | Which engine | Further reading

Last update: 2026-10-12
Started: 2026-10-12

Segments: the atoms of geometry
What is a segment? | The cost of sealed geometry | What becomes easy | The full topology | Cycles and winding | The round trip | Integration: triangulation | Segments in movement data | Why this matters now | The lineage | Further reading

Last update: 2026-10-12
Started: 2026-02-28

wkpool: Topology-based Geometry Handling
Why topology? | Basic workflow | Establish topology | Inspect the raw state | Access the pool components | Merge coincident vertices | Adjacency discovery | Shared edges | Internal boundaries | Neighbour graph | Ring and cycle analysis | Find closed cycles | Classify by winding | Arc-node topology | Round-trip to WKT | Periodic x (antimeridian) | Triangulation | Subsetting and combining | Building a pool from tables | Visualization | Related Work | Core topology/vertex-pool (hypertidy ecosystem) | Mesh/triangulation | Adjacency (computed, not stored)

Last update: 2026-10-12
Started: 2026-02-28

Readme and manuals

Help Manual

Help pageTopics
Summarize arc-node structurearc_node_summary
Convert arcs to WKT linestringsarcs_to_wkb arcs_to_wkt
Convert arcs to a wkpool of arc segmentsas_arcs
Convert wkpool to a PSLG (planar straight line graph)as_pslg
Classify cycles as outer rings or holes based on windingclassify_cycles
Calculate signed area of a cyclecycle_signed_area
Convert cycles to WKT polygonscycles_to_wkb cycles_to_wkt
Establish topology from any wk-handleable geometryestablish_topology
Find arcs (maximal segment sequences between nodes)find_arcs
Find closed cycles (rings) in segment graphfind_cycles
Find the faces of a segment graphfind_faces
Find internal boundaries (edges shared by exactly 2 features, opposite direction)find_internal_boundaries
Build adjacency from shared edgesfind_neighbours
Find nodes (vertices where degree != 2)find_nodes
Find shared edges between featuresfind_shared_edges
Merge coincident vertices in a poolmerge_coincident
Construct a wkpool from validated componentsnew_wkpool
Construct a triangle poolnew_wkpool_tri
Plot a wkpool objectplot.wkpool
Plot a triangle poolplot.wkpool_tri
Combine wkpool objectspool_combine
Compact a pool by removing unreferenced verticespool_compact
Get hole points for constrained triangulationhole_points pool_holes
Access the triangles of a triangle poolpool_triangles tri_segments wk_handle.wkpool_tri
Triangulate the polygons in a poolpool_triangulate
Reverse a cycle's winding directionreverse_cycle
Convert wkpool segments to WKTsegments_to_wkb segments_to_wkt
Report topology diagnosticstopology_report
Triangles as an Arrow arraytri_as_arrow
Boundary edges of groups of trianglestri_boundary
Clip triangles by a rectangletri_clip_rect
Convex hulls of groups of trianglestri_convex_hull
Dissolve triangles into polygons by grouptri_dissolve
Read triangles from an Arrow arraytri_from_arrow
Locate points in a triangle pooltri_locate
Measures of groups of trianglestri_measures
Neighbouring trianglestri_neighbours
Overlay two layers in one meshtri_overlay
Relations between the layers of an overlaytri_overlay_relate
Prepare a triangle pool for repeated questionstri_is_prepared tri_prepare
Relations between groups of trianglestri_relate
Parts and holes of groups of trianglestri_structure
Combine many wkpool vectors into one vectorvec_c vec_c.wkpool
Calculate vertex degree (number of segments touching each vertex)vertex_degree
Handle wkpool objects with wk handlerswk_handle.wkpool
Create a wkpool from a vertex table and a segment tablewkpool
Access components of a wkpool objectpool_feature pool_path pool_paths pool_segments pool_vertices wkpool-accessors
CRS and geodesic handling for wkpoolwkpool-crs wk_crs.wkpool wk_is_geodesic.wkpool wk_set_crs.wkpool wk_set_geodesic.wkpool