parameter to avoid supression of unused tags
This commit is contained in:
parent
dd07a1bf57
commit
8c530c87cd
5 changed files with 22 additions and 0 deletions
|
@ -75,6 +75,11 @@ public final class ProfileCache
|
|||
rc.expctxWay.parseFile( profileFile, "global" );
|
||||
rc.expctxNode.parseFile( profileFile, "global" );
|
||||
|
||||
if ( rc.processUnusedTags )
|
||||
{
|
||||
rc.expctxWay.setAllTagsUsed();
|
||||
}
|
||||
|
||||
lastProfileTimestamp = profileFile.lastModified();
|
||||
lastLookupTimestamp = lookupFile.lastModified();
|
||||
lastProfileFile = profileFile;
|
||||
|
|
|
@ -54,6 +54,7 @@ public final class RoutingContext
|
|||
public boolean carMode;
|
||||
public boolean bikeMode;
|
||||
public boolean considerTurnRestrictions;
|
||||
public boolean processUnusedTags;
|
||||
public boolean forceSecondaryData;
|
||||
public double pass1coefficient;
|
||||
public double pass2coefficient;
|
||||
|
@ -84,6 +85,9 @@ public final class RoutingContext
|
|||
// turn-restrictions used per default for car profiles
|
||||
considerTurnRestrictions = 0.f != expctxGlobal.getVariableValue( "considerTurnRestrictions", carMode ? 1.f : 0.f );
|
||||
|
||||
// process tags not used in the profile (to have them in the data-tab)
|
||||
processUnusedTags = 0.f != expctxGlobal.getVariableValue( "processUnusedTags", 0.f );
|
||||
|
||||
forceSecondaryData = 0.f != expctxGlobal.getVariableValue( "forceSecondaryData", 0.f );
|
||||
pass1coefficient = expctxGlobal.getVariableValue( "pass1coefficient", 1.5f );
|
||||
pass2coefficient = expctxGlobal.getVariableValue( "pass2coefficient", 0.f );
|
||||
|
|
|
@ -777,6 +777,14 @@ public abstract class BExpressionContext implements IByteArrayUnifier
|
|||
return idx < lookupIdxUsed.length ? lookupIdxUsed[idx] : false;
|
||||
}
|
||||
|
||||
public final void setAllTagsUsed()
|
||||
{
|
||||
for( int i=0; i<lookupIdxUsed.length; i++ )
|
||||
{
|
||||
lookupIdxUsed[i] = true;
|
||||
}
|
||||
}
|
||||
|
||||
int getLookupValueIdx( int nameIdx, String value )
|
||||
{
|
||||
BExpressionLookupValue[] values = lookupValues.get( nameIdx );
|
||||
|
|
|
@ -14,6 +14,7 @@ assign uphillcost 0
|
|||
assign uphillcutoff 0
|
||||
|
||||
assign validForCars 1
|
||||
assign considerTurnRestrictions = false
|
||||
|
||||
assign pass1coefficient 0.
|
||||
assign pass2coefficient -1
|
||||
|
|
|
@ -1,4 +1,8 @@
|
|||
---context:global # following code refers to global config
|
||||
|
||||
# this prevents suppression of unused tags, so they are visibly in the data tab
|
||||
assign processUnusedTags = true
|
||||
|
||||
---context:way # following code refers to way-tags
|
||||
|
||||
assign costfactor
|
||||
|
|
Loading…
Reference in a new issue