Changeset 16595 in josm for trunk/src/org
- Timestamp:
- 2020-06-11T08:40:11+02:00 (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/tools/Territories.java
r16552 r16595 188 188 189 189 private static void initializeExternalData() { 190 initializeExternalData("Geofabrik", 191 Config.getUrls().getJOSMWebsite() + "/remote/geofabrik-index-v1-nogeom.json"); 192 } 193 194 static void initializeExternalData(String source, String path) { 190 195 taginfoGeofabrikCache = new TreeMap<>(); 191 initializeExternalData(taginfoGeofabrikCache, "Geofabrik",192 Config.getUrls().getJOSMWebsite() + "/remote/geofabrik-index-v1-nogeom.json");193 }194 195 static void initializeExternalData(Map<String, TaginfoRegionalInstance> cache, String source, String path) {196 196 try (CachedFile cf = new CachedFile(path); InputStream is = cf.getInputStream(); JsonParser json = Json.createParser(is)) { 197 197 while (json.hasNext()) { … … 205 205 JsonArray iso2 = props.getJsonArray(ISO3166_2_LC); 206 206 if (iso1 != null) { 207 readExternalTaginfo( cache, taginfo, iso1, source);207 readExternalTaginfo(taginfoGeofabrikCache, taginfo, iso1, source); 208 208 } else if (iso2 != null) { 209 readExternalTaginfo( cache, taginfo, iso2, source);209 readExternalTaginfo(taginfoGeofabrikCache, taginfo, iso2, source); 210 210 } 211 211 })));
Note:
See TracChangeset
for help on using the changeset viewer.