Skip to content

Commit

Permalink
update LineStringCurve occurrences in PlanarLineStringCurve
Browse files Browse the repository at this point in the history
  • Loading branch information
louisgreiner committed Apr 24, 2024
1 parent 66c052d commit 1232f08
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions src/curves.rs
Original file line number Diff line number Diff line change
Expand Up @@ -717,7 +717,7 @@ mod tests {
#[test]
fn spherical_intersect_segment() {
// Note: following tests have been computed with a maximum length of curve of 100m, otherwise the curve is densified.

// Intersection
let paris_to_new_york = SphericalLineStringCurve::new(line_string![(x: PARIS_LON, y: PARIS_LAT), (x: NEW_YORK_LON, y: NEW_YORK_LAT)], 1.);
let segment = Line::new(coord! {x: -36.76627263796084, y: 69.72980545457074}, coord! {x: -53.52127629098692, y: 15.34337895024332});
Expand All @@ -728,7 +728,7 @@ mod tests {
assert!(paris_to_new_york.intersect_segment(segment).is_none());

// TODO: Collinear
// Notes:
// Notes:
// - because of the haversine densification, the geometry is slightly different and includes more points
// than before, thus creating intersection(s) point(s).
// - is very rare in reality
Expand Down
8 changes: 4 additions & 4 deletions src/lrs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -563,19 +563,19 @@ impl<CurveImpl: Curve> Lrs<CurveImpl> {
mod tests {
use geo::line_string;

use crate::curves::LineStringCurve;
use crate::curves::PlanarLineStringCurve;

use super::*;

fn lrs() -> Lrs<LineStringCurve> {
fn lrs() -> Lrs<PlanarLineStringCurve> {
let traversal = Traversal {
curve: LineStringCurve::new(line_string![(x: 0., y:0.), (x: 200., y:0.)], 1.),
curve: PlanarLineStringCurve::new(line_string![(x: 0., y:0.), (x: 200., y:0.)], 1.),
id: "curve".to_owned(),
lrms: vec![LrmHandle(0), LrmHandle(1)],
};

let traversal2 = Traversal {
curve: LineStringCurve::new(line_string![(x: 0., y:-1.), (x: 200., y:-1.)], 1.),
curve: PlanarLineStringCurve::new(line_string![(x: 0., y:-1.), (x: 200., y:-1.)], 1.),
id: "curve".to_owned(),
lrms: vec![LrmHandle(1)],
};
Expand Down

0 comments on commit 1232f08

Please sign in to comment.