Add additional tags

This commit is contained in:
Victor Shcherb 2019-07-08 01:30:33 +02:00
parent f62a349b47
commit 4d91f9b451
3 changed files with 5 additions and 8 deletions

View file

@ -290,7 +290,8 @@ public class RenderingRuleProperty {
return false; return false;
} }
String val2 = req.getStorage().getStringValue(vl); String val2 = req.getStorage().getStringValue(vl);
return val != null && val.equals(val2); return val != null && (val.equals(val2) ||
(val2.indexOf(';') != -1 && val2.contains(val+';')));
} }
int k = val.indexOf('='); int k = val.indexOf('=');

View file

@ -613,7 +613,7 @@ public class RouteResultPreparation {
println(msg); println(msg);
//calculateStatistics(result); // calculateStatistics(result);
} }
private void calculateStatistics(List<RouteSegmentResult> result) { private void calculateStatistics(List<RouteSegmentResult> result) {

View file

@ -352,7 +352,7 @@ public class RouteStatisticsHelper {
//String additional = attrName + "=" + attribute; //String additional = attrName + "=" + attribute;
RouteDataObject obj = segment.obj; RouteDataObject obj = segment.obj;
int[] tps = obj.getTypes(); int[] tps = obj.getTypes();
String additional = slopeClass != null ? slopeClass : ""; String additional = slopeClass != null ? (slopeClass + ";") : "";
for (int k = 0; k < tps.length; k++) { for (int k = 0; k < tps.length; k++) {
BinaryMapRouteReaderAdapter.RouteTypeRule tp = obj.region.quickGetEncodingRule(tps[k]); BinaryMapRouteReaderAdapter.RouteTypeRule tp = obj.region.quickGetEncodingRule(tps[k]);
if (tp.getTag().equals("highway") || tp.getTag().equals("route") || if (tp.getTag().equals("highway") || tp.getTag().equals("route") ||
@ -360,11 +360,7 @@ public class RouteStatisticsHelper {
req.setStringFilter(rrs.PROPS.R_TAG, tp.getTag()); req.setStringFilter(rrs.PROPS.R_TAG, tp.getTag());
req.setStringFilter(rrs.PROPS.R_VALUE, tp.getValue()); req.setStringFilter(rrs.PROPS.R_VALUE, tp.getValue());
} else { } else {
// TODO additional += tp.getTag() + "=" + tp.getValue() + ";";
// if (additional.length() > 0) {
// additional += ";";
// }
// additional += tp.getTag() + "=" + tp.getValue();
} }
} }
req.setStringFilter(rrs.PROPS.R_ADDITIONAL, additional); req.setStringFilter(rrs.PROPS.R_ADDITIONAL, additional);