Skip to content

Add morphological_graphs() and improve error handling for GeometryCollection #179

Merged
yu-ta-sato merged 1 commit into
c2g-dev:mainfrom
yu-ta-sato:enh/add_morphological_graphs
Jul 3, 2026
Merged

Add morphological_graphs() and improve error handling for GeometryCollection #179
yu-ta-sato merged 1 commit into
c2g-dev:mainfrom
yu-ta-sato:enh/add_morphological_graphs

Conversation

@yu-ta-sato

Copy link
Copy Markdown
Collaborator

Description

This pull request adds morphological_graphs(), a new public API for generating morphological graphs for multiple network-distance budgets in one call.

Previously, callers that needed graphs for several distances had to call morphological_graph() repeatedly. That repeated expensive shared work, especially reachability computation and enclosed tessellation generation. The new implementation prepares the morphology context once, builds the shared reachability field once, creates tessellation context from the largest requested distance, and then applies per-distance filtering to produce each graph.

The change also refactors morphological_graph() to use the same shared preparation and per-distance graph-building path, keeping the single-distance API behavior aligned with the new multi-distance API. As part of this refactor, fixed internal ID column constants are introduced for place and movement layers.

This PR also improves tessellation robustness by converting GeometryCollection tessellation cells to their polygonal parts where possible, and dropping empty or non-polygonal cells before downstream processing.

Related Issues

N/A

Checklist

  • I have read the Contributing Guide.
  • I have updated the documentation, if necessary.
  • I have added tests to cover my changes.
  • All new and existing tests passed.
  • Pre-commit checks passed locally.

@yu-ta-sato yu-ta-sato changed the title Add morphological_graphs() and improve error handling for Add morphological_graphs() and improve error handling for GeometryCollection Jul 3, 2026
@yu-ta-sato yu-ta-sato merged commit 87f9126 into c2g-dev:main Jul 3, 2026
6 checks passed
@yu-ta-sato yu-ta-sato deleted the enh/add_morphological_graphs branch July 3, 2026 17:43
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.

1 participant