1.3.2 preparations
This commit is contained in:
parent
644a5ece80
commit
02bb5675db
8 changed files with 29 additions and 18 deletions
|
@ -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 {}
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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;
|
||||
|
||||
|
|
Binary file not shown.
|
@ -213,12 +213,12 @@ Technical constraints
|
|||
Developing and debugging scripts
|
||||
--------------------------------
|
||||
|
||||
For developing scripts, the "Upload profile" funcionality and the
|
||||
"Export CSV" button of the online version are your friends.
|
||||
The "Export CSV" gives a (tab-separated) list of all way segments
|
||||
with all tag values and with the calulated cost (in "cost per km").
|
||||
|
||||
These CSV-Data can be imported in Excel using "paste content" function.
|
||||
For developing scripts, the "brouter-web" web-application is your
|
||||
friend. You can use that either online at http://brouter/brouter-web
|
||||
or set up a local installation.
|
||||
BRouter-Web has a window at the lower left corner with a "Profile"
|
||||
and a "Data" tab. Here, you can upload profile scripts and see
|
||||
the individual cost calculations per way-section in the "Data"-tab.
|
||||
|
||||
|
||||
Lookup-Table evolution and the the "major" and "minor" versions
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
BRouter - Version 1.3 - Setting up the Android App
|
||||
==================================================
|
||||
BRouter - Version 1.3.2 - Setting up the Android App
|
||||
====================================================
|
||||
|
||||
Choosing and Installing a Map-Tool
|
||||
----------------------------------
|
||||
|
@ -40,7 +40,7 @@ Installing the BRouter App
|
|||
--------------------------
|
||||
|
||||
You can install the BRouter-App either from Google's Play Store
|
||||
or directly from the APK-File contained within the "brouter_1_3.zip"
|
||||
or directly from the APK-File contained within the "brouter_1_3_2.zip"
|
||||
distribution zip-file.
|
||||
|
||||
Choosing a SD-Card Base Directory
|
||||
|
@ -120,7 +120,7 @@ relative to this base directory, so you end up with e.g. the following structure
|
|||
|
||||
|
||||
The "profiles2" and the "modes" directory get some reasonable default-configuration
|
||||
from the installation procedure, but the "segments3" directory is basically empty
|
||||
from the installation procedure, but the "segments4" directory is basically empty
|
||||
(except for the storageconfig.txt file) so you have to get routing-datafiles in
|
||||
order to complete your installation.
|
||||
|
||||
|
@ -202,7 +202,8 @@ No need anymore to create special "to", "from", "via1..via9" points, but they ar
|
|||
and if a "from" and a "to" wayppoint is found in the database, you will not be prompted
|
||||
to select waypoints from the database.
|
||||
|
||||
If a route is calculated, it is stored as "brouter0.gpx" in the map-tools track directory.
|
||||
If a route is calculated, it is stored as "brouter0.gpx" in the map-tools track directory
|
||||
(or, if there is no write-access, in brouter's base directory)
|
||||
If started once more with identical input, BRouter will store a second route broute1.gpx
|
||||
for the first alternative and so on.
|
||||
|
||||
|
|
Loading…
Reference in a new issue