Skip to content

Commit

Permalink
Unify Densify trait across metric spaces
Browse files Browse the repository at this point in the history
Just like #1228, but for Densify rather than Length.

This enables Geodesic, Haversine, Euclidean, and Rhumb Densification.

This required implementing InterpolatePoint for Euclidean.

Adjacent work:

deprecated legacy DensifyHaversine
linestring_segment is now implemented in terms of the new Densify

NOTE: linestring_segment would be a good future candidate for
a similar unification across all the metric spaces
  • Loading branch information
michaelkirk committed Oct 18, 2024
1 parent f683c7a commit 61329c8
Show file tree
Hide file tree
Showing 8 changed files with 458 additions and 341 deletions.
14 changes: 14 additions & 0 deletions geo/CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,20 @@
line_string.length::<Haversine>();
```
* <https://github.com/georust/geo/pull/1228>
* Deprecated `DensifyHaversine`
* BREAKING: `Densify::densify` is no longer strictly Euclidean, and now accepts a generic line measure parameter.
```
// Before
line_string.densify();
line_string.densify_haversine();
// After
line_string.densify::<Euclidean>();
line_string.densify::<Haversine>();
// Additional measures are now supported
line_string.densify::<Geodesic>();
line_string.densify::<Rhumb>();
```
* Change IntersectionMatrix::is_equal_topo to now consider empty geometries as equal.
* <https://github.com/georust/geo/pull/1223>
* Fix `(LINESTRING EMPTY).contains(LINESTRING EMPTY)` and `(MULTIPOLYGON EMPTY).contains(MULTIPOINT EMPTY)` which previously
Expand Down
263 changes: 0 additions & 263 deletions geo/src/algorithm/densify.rs

This file was deleted.

Loading

0 comments on commit 61329c8

Please sign in to comment.