Skip to content

Conversation

@yu-ta-sato
Copy link
Collaborator

Description

This pull request introduces the Nominatim API to support place-based queries, add topological clipping for network data, and provide new utilities for removing isolations.

Boundary and area handling improvements:

  • Added the get_boundaries function to retrieve polygon boundaries for named places using Nominatim geocoding, enabling place-based queries in load_overture_data.
  • Updated load_overture_data and _prepare_area_and_bbox to accept and process a wider range of area types, including bounding boxes, polygons, multipolygons, GeoSeries, and GeoDataFrames, with automatic CRS handling and mutual exclusion with place name. [1] [2] [3] [4]

Graph processing and clipping utilities:

  • Introduced the clip_graph function in utils.py for topological clipping of network graphs, preserving network integrity when clipping segments, and integrated it into _download_and_process_type for segment data. [1] [2]
  • Added remove_isolated_components to filter graphs to their largest connected component, improving downstream graph analysis. [1] [2]

Robustness and usability enhancements:

  • Improved handling of GeoJSON output from subprocesses in _download_and_process_type, including parsing stdout and filtering for valid geometries and exploding MultiLineStrings. [1] [2]
  • Added warnings in process_overture_segments for missing or geographic CRS, guiding users toward best practices for spatial analysis.

These changes collectively make the package more flexible, robust, and user-friendly for spatial data analysis and network graph operations.

Related Issues

#114

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 get boundary and place name Add Nominatim API for load_overture_data by a parameter place_name Feb 9, 2026
@codecov
Copy link

codecov bot commented Feb 9, 2026

Codecov Report

❌ Patch coverage is 92.52336% with 8 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
city2graph/utils.py 85.10% 7 Missing ⚠️
city2graph/data.py 98.33% 1 Missing ⚠️

📢 Thoughts on this report? Let us know!

@yu-ta-sato yu-ta-sato merged commit 5ebcf8f into main Feb 9, 2026
9 of 10 checks passed
@yu-ta-sato yu-ta-sato deleted the add_get_boundary_and_place_name branch February 9, 2026 04: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