Skip to content

Update shputils - #195

Open
thbeu wants to merge 1 commit into
OSGeo:masterfrom
thbeu:update-shputils
Open

thbeu wants to merge 1 commit into
OSGeo:masterfrom
thbeu:update-shputils

Conversation

@thbeu

@thbeu thbeu commented May 5, 2026

Copy link
Copy Markdown
Contributor

Implement polygon CUT clipping with Sutherland-Hodgman algorithm

Add compute_clip_intersection() to find where a line segment crosses an axis-aligned clip rectangle, and a static sh_clip_edge() helper implementing Sutherland-Hodgman clipping against a single edge.

Replace the previously incomplete CUT mode in clip_boundary() with a full polygon clipping implementation for SHPT_POLYGON/POLYGONZ/POLYGONM types.

Add unit tests.

Fixes #27.

…rithm

Add compute_clip_intersection() to find where a line segment crosses an axis-aligned clip rectangle, and a static sh_clip_edge() helper implementing Sutherland-Hodgman clipping against a single edge.

Replace the previously incomplete CUT mode in clip_boundary() with a full polygon clipping implementation for SHPT_POLYGON/POLYGONZ/POLYGONM types.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

shputils.c needs help

1 participant