preprocessor speedup using more memory
This commit is contained in:
parent
76e4ef8cab
commit
ba34488447
10 changed files with 236 additions and 69 deletions
|
|
@ -31,14 +31,25 @@ public class WayCutter extends MapCreatorBase
|
|||
|
||||
public void process( File nodeTilesIn, File wayFileIn, File wayTilesOut ) throws Exception
|
||||
{
|
||||
this.outTileDir = wayTilesOut;
|
||||
init( wayTilesOut );
|
||||
|
||||
// *** read all nodes into tileIndexMap
|
||||
tileIndexMap = Boolean.getBoolean( "useDenseMaps" ) ? new DenseLongMap() : new TinyDenseLongMap();
|
||||
new NodeIterator( this, false ).processDir( nodeTilesIn, ".tlf" );
|
||||
|
||||
// *** finally process the way-file, cutting into pieces
|
||||
new WayIterator( this, true ).processFile( wayFileIn );
|
||||
finish();
|
||||
}
|
||||
|
||||
public void init( File wayTilesOut ) throws Exception
|
||||
{
|
||||
this.outTileDir = wayTilesOut;
|
||||
|
||||
// *** read all nodes into tileIndexMap
|
||||
tileIndexMap = Boolean.getBoolean( "useDenseMaps" ) ? new DenseLongMap() : new TinyDenseLongMap();
|
||||
}
|
||||
|
||||
public void finish() throws Exception
|
||||
{
|
||||
closeTileOutStreams();
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue