variable length tag descriptions (downwards compatibility)
This commit is contained in:
parent
c16c242a65
commit
afa498637a
14 changed files with 195 additions and 58 deletions
|
|
@ -23,6 +23,7 @@ public class RelationMerger extends MapCreatorBase
|
|||
private CompactLongSet routesetall;
|
||||
private BExpressionContext expctxReport;
|
||||
private BExpressionContext expctxCheck;
|
||||
private BExpressionContext expctxStat;
|
||||
|
||||
private DataOutputStream wayOutStream;
|
||||
|
||||
|
|
@ -47,6 +48,7 @@ public class RelationMerger extends MapCreatorBase
|
|||
expctxCheck = new BExpressionContext("way");
|
||||
expctxCheck.readMetaData( lookupFile );
|
||||
expctxCheck.parseFile( checkProfile, "global" );
|
||||
expctxStat = new BExpressionContext("way");
|
||||
|
||||
// *** read the relation file into sets for each processed tag
|
||||
routesets = new HashMap<String,CompactLongSet>();
|
||||
|
|
@ -76,6 +78,7 @@ public class RelationMerger extends MapCreatorBase
|
|||
{
|
||||
long wid = readId( dis );
|
||||
if ( wid == -1 ) break;
|
||||
expctxStat.addLookupValue( tagname, "yes", null );
|
||||
if ( routeset != null && !routeset.contains( wid ) )
|
||||
{
|
||||
routeset.add( wid );
|
||||
|
|
@ -92,14 +95,17 @@ public class RelationMerger extends MapCreatorBase
|
|||
{
|
||||
CompactLongSet routeset = new FrozenLongSet( routesets.get( tagname ) );
|
||||
routesets.put( tagname, routeset );
|
||||
System.out.println( "marked " + routeset.size() + " ways for tag: " + tagname );
|
||||
System.out.println( "marked " + routeset.size() + " routes for tag: " + tagname );
|
||||
}
|
||||
|
||||
// *** finally process the way-file
|
||||
wayOutStream = createOutStream( wayFileOut );
|
||||
new WayIterator( this, true ).processFile( wayFileIn );
|
||||
wayOutStream.close();
|
||||
}
|
||||
|
||||
System.out.println( "-------- route-statistics -------- " );
|
||||
expctxStat.dumpStatistics();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void nextWay( WayData data ) throws Exception
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue