diff --git a/src/maple/gtfs_handlers/hull_from_gtfs.rs b/src/maple/gtfs_handlers/hull_from_gtfs.rs index 66e3da67..b92f480e 100644 --- a/src/maple/gtfs_handlers/hull_from_gtfs.rs +++ b/src/maple/gtfs_handlers/hull_from_gtfs.rs @@ -12,6 +12,10 @@ pub fn hull_from_gtfs(gtfs: >fs_structures::Gtfs) -> Option { .map(|(id, points)| { points .iter() + .filter(|point| { + let is_null_island = f64::abs(0. - point.latitude) < 0.000001 && f64::abs(0. - point.latitude) < 0.000001; + !is_null_island + }) .map(|point| Point::new(point.longitude, point.latitude)) }) .flatten() @@ -27,6 +31,10 @@ pub fn hull_from_gtfs(gtfs: >fs_structures::Gtfs) -> Option { .stops .iter() .filter(|(_, stop)| stop.longitude.is_some() && stop.latitude.is_some()) + .filter(|(_, stop)| { + let is_null_island = f64::abs(0. - stop.latitude.unwrap()) < 0.000001 && f64::abs(0. - stop.latitude.unwrap()) < 0.000001; + !is_null_island + }) .map(|(_, stop)| { Point::new(stop.longitude.unwrap(), stop.latitude.unwrap()) })