1.3.2 preparations

This commit is contained in:
Arndt 2015-11-01 11:55:28 +01:00
parent 644a5ece80
commit 02bb5675db
8 changed files with 29 additions and 18 deletions

View file

@ -154,7 +154,7 @@ public abstract class MapCreatorBase implements WayListener, NodeListener, Relat
public void nodeFileEnd( File nodefile ) throws Exception {}
@Override
public void wayFileStart( File wayfile ) throws Exception {}
public boolean wayFileStart( File wayfile ) throws Exception { return true; }
@Override
public void nextWay( WayData data ) throws Exception {}

View file

@ -46,7 +46,7 @@ public class WayCutter5 extends MapCreatorBase
}
@Override
public void wayFileStart( File wayfile ) throws Exception
public boolean wayFileStart( File wayfile ) throws Exception
{
// read corresponding node-file into tileIndexMap
String name = wayfile.getName();
@ -57,6 +57,7 @@ public class WayCutter5 extends MapCreatorBase
lonoffset = -1;
latoffset = -1;
new NodeIterator( this, false ).processFile( nodefile );
return true;
}
@Override

View file

@ -46,7 +46,10 @@ public class WayIterator extends MapCreatorBase
{
System.out.println( "*** WayIterator reading: " + wayfile );
listener.wayFileStart( wayfile );
if ( !listener.wayFileStart( wayfile ) )
{
return;
}
DataInputStream di = new DataInputStream( new BufferedInputStream ( new FileInputStream( wayfile ) ) );
try

View file

@ -110,8 +110,14 @@ public class WayLinker extends MapCreatorBase
}
@Override
public void wayFileStart( File wayfile ) throws Exception
public boolean wayFileStart( File wayfile ) throws Exception
{
File trafficFile = fileFromTemplate( wayfile, trafficTilesIn, "trf" );
if ( trafficTilesIn.isDirectory() && !trafficFile.exists() )
{
return false;
}
// process corresponding node-file, if any
File nodeFile = fileFromTemplate( wayfile, nodeTilesIn, "u5d" );
if ( nodeFile.exists() )
@ -134,12 +140,12 @@ public class WayLinker extends MapCreatorBase
}
// read a traffic-file, if any
File trafficFile = fileFromTemplate( wayfile, trafficTilesIn, "trf" );
if ( trafficFile.exists() )
{
trafficMap = new OsmTrafficMap();
trafficMap.load( trafficFile, minLon, minLat, minLon + 5000000, minLat + 5000000, false );
}
return true;
}
@Override

View file

@ -9,7 +9,7 @@ import java.io.File;
*/
public interface WayListener
{
void wayFileStart( File wayfile ) throws Exception;
boolean wayFileStart( File wayfile ) throws Exception;
void nextWay( WayData data ) throws Exception;