Skip to content

Commit 2410c3f

Browse files
committed
countries: avoid problems for BE and NL
1 parent 9e7b67f commit 2410c3f

File tree

3 files changed

+12
-9
lines changed

3 files changed

+12
-9
lines changed

core/src/main/java/com/graphhopper/routing/ev/Country.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ public enum Country {
4343
AUT("Austria", "AUT", "AT"),
4444
AZE("Azerbaijan", "AZE", "AZ"),
4545
BDI("Burundi", "BDI", "BI"),
46-
BEL("Belgium", "BEL", "BE", BE_BRU, BE_VLG, BE_WAL),
46+
BEL("Belgium", "BEL", "BE"),
4747
BEN("Benin", "BEN", "BJ"),
4848
BFA("Burkina Faso", "BFA", "BF"),
4949
BGD("Bangladesh", "BGD", "BD"),
@@ -172,7 +172,7 @@ public enum Country {
172172
NGA("Nigeria", "NGA", "NG"),
173173
NIC("Nicaragua", "NIC", "NI"),
174174
NIU("Niue", "NIU", "NU"),
175-
NLD("Netherlands", "NLD", "NL", NL_BQ1, NL_BQ2, NL_BQ3),
175+
NLD("Netherlands", "NLD", "NL"),
176176
NOR("Norway", "NOR", "NO"),
177177
NPL("Nepal", "NPL", "NP"),
178178
NRU("Nauru", "NRU", "NR"),

core/src/main/java/com/graphhopper/routing/ev/State.java

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,10 @@ public enum State {
1818
AU_VIC("AU-VIC", AUS),
1919
AU_WA("AU-WA", AUS),
2020

21-
// Belgium
22-
BE_BRU("BE-BRU", BEL),
23-
BE_VLG("BE-VLG", BEL),
24-
BE_WAL("BE-WAL", BEL),
21+
// the sub regions of Belgium have no data in countries.geojson
22+
// BE_BRU("BE-BRU", BEL),
23+
// BE_VLG("BE-VLG", BEL),
24+
// BE_WAL("BE-WAL", BEL),
2525

2626
// Canada
2727
CA_AB("CA-AB", CAN),
@@ -50,9 +50,10 @@ public enum State {
5050
// GB_SCT("GB-SCT", GBR),
5151

5252
// Netherlands
53-
NL_BQ1("NL-BQ1", NLD),
54-
NL_BQ2("NL-BQ2", NLD),
55-
NL_BQ3("NL-BQ3", NLD),
53+
// TODO same problem here
54+
// NL_BQ1("NL-BQ1", NLD),
55+
// NL_BQ2("NL-BQ2", NLD),
56+
// NL_BQ3("NL-BQ3", NLD),
5657

5758
// United States
5859
US_AL("US-AL", USA),

core/src/test/java/com/graphhopper/routing/util/AreaIndexTest.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -140,6 +140,8 @@ public void testCountries() {
140140
assertEquals("US-NM", countryIndex.query(35.67514, -105.94665).get(0).getProperties().get(State.ISO_3166_2));
141141
assertEquals("AT", countryIndex.query(48.20448, 16.10788).get(0).getProperties().get(State.ISO_3166_2));
142142
assertEquals("GB", countryIndex.query(51.6730876, 0.0041691).get(0).getProperties().get(State.ISO_3166_2));
143+
assertEquals("BE", countryIndex.query(50.846931, 4.332262).get(0).getProperties().get(State.ISO_3166_2));
144+
assertEquals("NL", countryIndex.query(52.208451, 5.500524).get(0).getProperties().get(State.ISO_3166_2));
143145
}
144146

145147
private AreaIndex<CustomArea> createCountryIndex() {

0 commit comments

Comments
 (0)