From 88de710f062d39718767ea4f550f3b2b61e1753d Mon Sep 17 00:00:00 2001 From: Christoph Fink Date: Thu, 19 Dec 2024 16:24:25 +0100 Subject: [PATCH 1/3] increase street layer maximum extent --- src/main/java/com/conveyal/r5/common/GeometryUtils.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/java/com/conveyal/r5/common/GeometryUtils.java b/src/main/java/com/conveyal/r5/common/GeometryUtils.java index c41eef536..121fd3f7e 100644 --- a/src/main/java/com/conveyal/r5/common/GeometryUtils.java +++ b/src/main/java/com/conveyal/r5/common/GeometryUtils.java @@ -23,8 +23,8 @@ public class GeometryUtils { /** Average of polar and equatorial radii, https://en.wikipedia.org/wiki/Earth */ public static final double RADIUS_OF_EARTH_M = 6_367_450; - /** Maximum area allowed for the bounding box of uploaded files -- large enough for California. */ - private static final double MAX_BOUNDING_BOX_AREA_SQ_KM = 975_000; + /** Maximum area allowed for the bounding box of uploaded files -- large enough for Europe. */ + private static final double MAX_BOUNDING_BOX_AREA_SQ_KM = 1_000_000; /** * Haversine formula for distance on the sphere. We used to have a fastDistance function that would estimate this From 61177994f0279bf82ea97fa734113759f84b0069 Mon Sep 17 00:00:00 2001 From: Christoph Fink Date: Tue, 28 Jan 2025 16:11:10 +0100 Subject: [PATCH 2/3] increase MAX_BOUNDING_BOX_AREA_SQ_KM to Earth's surface area --- src/main/java/com/conveyal/r5/common/GeometryUtils.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/java/com/conveyal/r5/common/GeometryUtils.java b/src/main/java/com/conveyal/r5/common/GeometryUtils.java index 121fd3f7e..d6760edf6 100644 --- a/src/main/java/com/conveyal/r5/common/GeometryUtils.java +++ b/src/main/java/com/conveyal/r5/common/GeometryUtils.java @@ -23,8 +23,8 @@ public class GeometryUtils { /** Average of polar and equatorial radii, https://en.wikipedia.org/wiki/Earth */ public static final double RADIUS_OF_EARTH_M = 6_367_450; - /** Maximum area allowed for the bounding box of uploaded files -- large enough for Europe. */ - private static final double MAX_BOUNDING_BOX_AREA_SQ_KM = 1_000_000; + /** Maximum area allowed for the bounding box of uploaded files -- large enough for Earth. */ + private static final double MAX_BOUNDING_BOX_AREA_SQ_KM = 510_073_000; /** * Haversine formula for distance on the sphere. We used to have a fastDistance function that would estimate this From 081d5ea445f88093f4755fe910f519a8746896da Mon Sep 17 00:00:00 2001 From: Christoph Fink Date: Tue, 28 Jan 2025 16:27:07 +0100 Subject: [PATCH 3/3] exceptions are not triggered without artificial extent restrictions --- .../datasource/SpatialDataSourceIngesterTest.java | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/test/java/com/conveyal/analysis/datasource/SpatialDataSourceIngesterTest.java b/src/test/java/com/conveyal/analysis/datasource/SpatialDataSourceIngesterTest.java index e32cdf9d9..0ddfa41e2 100644 --- a/src/test/java/com/conveyal/analysis/datasource/SpatialDataSourceIngesterTest.java +++ b/src/test/java/com/conveyal/analysis/datasource/SpatialDataSourceIngesterTest.java @@ -59,12 +59,12 @@ void basicValid (FileStorageFormat format) { } } - /** Test on files containing huge shapes: the continents of Africa, South America, and Australia. */ - @ParameterizedTest - @EnumSource(names = {"GEOPACKAGE", "GEOJSON", "SHP"}) - void continentalScale (FileStorageFormat format) { - assertIngestException(format, "continents", IllegalArgumentException.class, "exceeds"); - } + // /** Test on files containing huge shapes: the continents of Africa, South America, and Australia. */ + // @ParameterizedTest + // @EnumSource(names = {"GEOPACKAGE", "GEOJSON", "SHP"}) + // void continentalScale (FileStorageFormat format) { + // assertIngestException(format, "continents", IllegalArgumentException.class, "exceeds"); + // } /** * Test on projected (non-WGS84) data containing shapes on both sides of the 180 degree antimeridian.