Skip to content

Commit 920e82a

Browse files
committed
CustomWeighting: better error message for wrong format
1 parent df4d2d2 commit 920e82a

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

core/src/main/java/com/graphhopper/routing/weighting/custom/GeoToValueEntry.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,8 @@ static Geometry pickGeometry(CustomModel customModel, String key) {
4343
JsonFeature feature = customModel.getAreas().get(id);
4444
if (feature == null)
4545
throw new IllegalArgumentException("Cannot find area " + id);
46+
if (feature.getGeometry() == null)
47+
throw new IllegalArgumentException("Cannot find coordinates of area " + id);
4648
return feature.getGeometry();
4749
}
4850

0 commit comments

Comments
 (0)