pseudo-tags from DB, here: preload and use in-memory matching
This commit is contained in:
parent
bfe1f4a6a4
commit
f7bce89b7c
2 changed files with 10 additions and 6 deletions
|
@ -98,6 +98,10 @@ public class DatabasePseudoTagProvider {
|
|||
|
||||
public void addTags(long osm_id, Map<String, String> map) {
|
||||
|
||||
if (map == null || !map.containsKey("highway")) {
|
||||
return;
|
||||
}
|
||||
|
||||
cntOsmWays++;
|
||||
if ((cntOsmWays % 1000000L) == 0) {
|
||||
String out = "Osm Ways processed=" + cntOsmWays + " way modifs=" + cntWayModified;
|
||||
|
|
|
@ -171,6 +171,12 @@ public class OsmCutter extends MapCreatorBase {
|
|||
// encode tags
|
||||
if (w.getTagsOrNull() == null) return;
|
||||
|
||||
if (dbPseudoTagProvider != null) {
|
||||
dbPseudoTagProvider.addTags(w.wid, w.getTagsOrNull());
|
||||
}
|
||||
|
||||
generatePseudoTags(w.getTagsOrNull());
|
||||
|
||||
int[] lookupData = _expctxWay.createNewLookupData();
|
||||
for (String key : w.getTagsOrNull().keySet()) {
|
||||
String value = w.getTag(key);
|
||||
|
@ -187,12 +193,6 @@ public class OsmCutter extends MapCreatorBase {
|
|||
ok |= _expctxWay.getCostfactor() < 10000.;
|
||||
if (!ok) return;
|
||||
|
||||
if (dbPseudoTagProvider != null) {
|
||||
dbPseudoTagProvider.addTags(w.wid, w.getTagsOrNull());
|
||||
}
|
||||
|
||||
generatePseudoTags(w.getTagsOrNull());
|
||||
|
||||
if (wayDos != null) {
|
||||
w.writeTo(wayDos);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue