fix: FastBingTileGridGenerator CRS conversion and polygon holes handling - #267
Merged
joshuacortez merged 1 commit intoFeb 28, 2026
Conversation
Fixes thinkingmachines#263 **Bug 1: CRS Conversion** - Input GeoDataFrames in non-EPSG:4326 CRS are now automatically converted to EPSG:4326 before grid generation (Bing tiles use lat/lng) - Output is converted back to the original input CRS - Warning emitted if input has no CRS set **Bug 2: Polygon Holes** - Polygons with interior holes are now detected and handled - Holes are ignored during grid generation (grids fill entire exterior) - Warning emitted when holes are detected to inform the user **Tests Added:** - test_fast_bing_tile_grid_generator_non_4326_crs - test_fast_bing_tile_grid_generator_polygon_with_holes - test_fast_bing_tile_grid_generator_no_crs_warning
butchtm
self-requested a review
February 28, 2026 02:22
butchtm
approved these changes
Feb 28, 2026
Collaborator
|
Thank you @AmmarYasser455 ! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Fixes #263
Summary
This PR addresses both bugs reported in issue #263 for
FastBingTileGridGenerator:Bug 1: CRS Conversion (Projected CRS handling)
Problem: When input GeoDataFrame was in a projected CRS (like EPSG:32651), the grid generation produced incorrect results because the algorithm expects lat/lng coordinates.
Solution:
Bug 2: Polygon Holes (Interior rings)
Problem: Polygons with interior holes caused incorrect grid generation, producing grids over water/holes.
Solution:
Tests Added
test_fast_bing_tile_grid_generator_non_4326_crs- Verifies CRS conversion works correctlytest_fast_bing_tile_grid_generator_polygon_with_holes- Verifies holes warning is emittedtest_fast_bing_tile_grid_generator_no_crs_warning- Verifies missing CRS warningAll Tests Pass