added startway check

This commit is contained in:
afischerdev 2024-09-07 14:42:10 +02:00
parent 6b4d989868
commit d2d639666e
8 changed files with 64 additions and 5 deletions

View file

@ -161,7 +161,8 @@ public final class MicroCache2 extends MicroCache {
int ilontarget = ilon + dlon_remaining;
int ilattarget = ilat + dlat_remaining;
if (matcher != null) {
if (!matcher.start(ilon, ilat, ilontarget, ilattarget)) {
boolean useAsStartWay = wayValidator.checkStartWay(wayTags.data);
if (!matcher.start(ilon, ilat, ilontarget, ilattarget, useAsStartWay)) {
matcher = null;
}
}

View file

@ -13,4 +13,6 @@ public interface TagValueValidator {
boolean isLookupIdxUsed(int idx);
void setDecodeForbidden(boolean decodeForbidden);
boolean checkStartWay(byte[] ab);
}

View file

@ -6,7 +6,7 @@ package btools.codec;
* matches to the waypoints
*/
public interface WaypointMatcher {
boolean start(int ilonStart, int ilatStart, int ilonTarget, int ilatTarget);
boolean start(int ilonStart, int ilatStart, int ilonTarget, int ilatTarget, boolean useAsStartWay);
void transferNode(int ilon, int ilat);