Geodata: linestring ingestion and robust polygon area handling #333
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
summary
Adds first-class linestring support to geodata ingestion and plotting, and hardens polygon area computation for NaN-separated rings. This enables downstream breakline generation (more to come in later PRs) and improves correctness for mixed shapefiles without changing default behavior.
changes
geodata
Add linestrings property (default empty) and propagate via ParseShoreline.
Plot supports rendering linestrings and start/end markers.
shapefile reader
Classify closed shapes (within tolerance) as polygons; open shapes as linestrings.
Output includes polygon rings and linestring collections.
polygon area
shoelace updated to handle NaN-separated sub-polygons with per-ring closure and summed area.
motivation
Many shoreline datasets mix polygons and open lines; linestring awareness is required for breakline workflows.
Robust area computation avoids errors for multi-ring polygons and hole structures.