variable length tag descriptions (downwards compatibility)
This commit is contained in:
parent
c16c242a65
commit
afa498637a
14 changed files with 195 additions and 58 deletions
|
|
@ -46,6 +46,9 @@ public class OsmCutter extends MapCreatorBase
|
|||
private BExpressionContext _expctxWay;
|
||||
private BExpressionContext _expctxNode;
|
||||
|
||||
private BExpressionContext _expctxWayStat;
|
||||
private BExpressionContext _expctxNodeStat;
|
||||
|
||||
public void process (File lookupFile, File outTileDir, File wayFile, File relFile, File mapFile) throws Exception
|
||||
{
|
||||
if ( !lookupFile.exists() )
|
||||
|
|
@ -55,9 +58,11 @@ public class OsmCutter extends MapCreatorBase
|
|||
|
||||
_expctxWay = new BExpressionContext("way");
|
||||
_expctxWay.readMetaData( lookupFile );
|
||||
_expctxWayStat = new BExpressionContext("way");
|
||||
|
||||
_expctxNode = new BExpressionContext("node");
|
||||
_expctxNode.readMetaData( lookupFile );
|
||||
_expctxNodeStat = new BExpressionContext("node");
|
||||
|
||||
this.outTileDir = outTileDir;
|
||||
if ( !outTileDir.isDirectory() ) throw new RuntimeException( "out tile directory " + outTileDir + " does not exist" );
|
||||
|
|
@ -77,11 +82,11 @@ public class OsmCutter extends MapCreatorBase
|
|||
wayDos.close();
|
||||
cyclewayDos.close();
|
||||
|
||||
/* System.out.println( "-------- way-statistics -------- " );
|
||||
_expctxWay.dumpStatistics();
|
||||
System.out.println( "-------- way-statistics -------- " );
|
||||
_expctxWayStat.dumpStatistics();
|
||||
System.out.println( "-------- node-statistics -------- " );
|
||||
_expctxNode.dumpStatistics();
|
||||
*/
|
||||
_expctxNodeStat.dumpStatistics();
|
||||
|
||||
System.out.println( statsLine() );
|
||||
}
|
||||
|
||||
|
|
@ -109,6 +114,7 @@ public class OsmCutter extends MapCreatorBase
|
|||
{
|
||||
String value = n.getTag( key );
|
||||
_expctxNode.addLookupValue( key, value, lookupData );
|
||||
_expctxNodeStat.addLookupValue( key, value, null );
|
||||
}
|
||||
n.description = _expctxNode.encode(lookupData);
|
||||
}
|
||||
|
|
@ -155,6 +161,7 @@ public class OsmCutter extends MapCreatorBase
|
|||
{
|
||||
String value = w.getTag( key );
|
||||
_expctxWay.addLookupValue( key, value, lookupData );
|
||||
_expctxWayStat.addLookupValue( key, value, null );
|
||||
}
|
||||
w.description = _expctxWay.encode(lookupData);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue