pull/566/head
Mike Barry 2023-04-26 07:02:50 -04:00
rodzic c4aa9e07de
commit 585111198c
2 zmienionych plików z 3 dodań i 4 usunięć

Wyświetl plik

@ -314,20 +314,20 @@ public class GeoUtils {
stats.dataError(stage + "_snap_fix_input");
}
return GeometryPrecisionReducer.reduce(geom, tilePrecision);
} catch (IllegalArgumentException e) {
} catch (TopologyException | IllegalArgumentException e) {
// precision reduction fails if geometry is invalid, so attempt
// to fix it then try again
geom = GeometryFixer.fix(geom);
stats.dataError(stage + "_snap_fix_input2");
try {
return GeometryPrecisionReducer.reduce(geom, tilePrecision);
} catch (IllegalArgumentException e2) {
} catch (TopologyException | IllegalArgumentException e2) {
// give it one last try but with more aggressive fixing, just in case (see issue #511)
geom = fixPolygon(geom, tilePrecision.gridSize() / 2);
stats.dataError(stage + "_snap_fix_input3");
try {
return GeometryPrecisionReducer.reduce(geom, tilePrecision);
} catch (IllegalArgumentException e3) {
} catch (TopologyException | IllegalArgumentException e3) {
stats.dataError(stage + "_snap_fix_input3_failed");
throw new GeometryException("snap_third_time_failed", "Error reducing precision");
}

File diff suppressed because one or more lines are too long