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 {}
|
public void nodeFileEnd( File nodefile ) throws Exception {}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void wayFileStart( File wayfile ) throws Exception {}
|
public boolean wayFileStart( File wayfile ) throws Exception { return true; }
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void nextWay( WayData data ) throws Exception {}
|
public void nextWay( WayData data ) throws Exception {}
|
||||||
|
|
|
@ -46,7 +46,7 @@ public class WayCutter5 extends MapCreatorBase
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void wayFileStart( File wayfile ) throws Exception
|
public boolean wayFileStart( File wayfile ) throws Exception
|
||||||
{
|
{
|
||||||
// read corresponding node-file into tileIndexMap
|
// read corresponding node-file into tileIndexMap
|
||||||
String name = wayfile.getName();
|
String name = wayfile.getName();
|
||||||
|
@ -57,6 +57,7 @@ public class WayCutter5 extends MapCreatorBase
|
||||||
lonoffset = -1;
|
lonoffset = -1;
|
||||||
latoffset = -1;
|
latoffset = -1;
|
||||||
new NodeIterator( this, false ).processFile( nodefile );
|
new NodeIterator( this, false ).processFile( nodefile );
|
||||||
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -46,7 +46,10 @@ public class WayIterator extends MapCreatorBase
|
||||||
{
|
{
|
||||||
System.out.println( "*** WayIterator reading: " + wayfile );
|
System.out.println( "*** WayIterator reading: " + wayfile );
|
||||||
|
|
||||||
listener.wayFileStart( wayfile );
|
if ( !listener.wayFileStart( wayfile ) )
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
DataInputStream di = new DataInputStream( new BufferedInputStream ( new FileInputStream( wayfile ) ) );
|
DataInputStream di = new DataInputStream( new BufferedInputStream ( new FileInputStream( wayfile ) ) );
|
||||||
try
|
try
|
||||||
|
|
|
@ -110,8 +110,14 @@ public class WayLinker extends MapCreatorBase
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@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
|
// process corresponding node-file, if any
|
||||||
File nodeFile = fileFromTemplate( wayfile, nodeTilesIn, "u5d" );
|
File nodeFile = fileFromTemplate( wayfile, nodeTilesIn, "u5d" );
|
||||||
if ( nodeFile.exists() )
|
if ( nodeFile.exists() )
|
||||||
|
@ -134,12 +140,12 @@ public class WayLinker extends MapCreatorBase
|
||||||
}
|
}
|
||||||
|
|
||||||
// read a traffic-file, if any
|
// read a traffic-file, if any
|
||||||
File trafficFile = fileFromTemplate( wayfile, trafficTilesIn, "trf" );
|
|
||||||
if ( trafficFile.exists() )
|
if ( trafficFile.exists() )
|
||||||
{
|
{
|
||||||
trafficMap = new OsmTrafficMap();
|
trafficMap = new OsmTrafficMap();
|
||||||
trafficMap.load( trafficFile, minLon, minLat, minLon + 5000000, minLat + 5000000, false );
|
trafficMap.load( trafficFile, minLon, minLat, minLon + 5000000, minLat + 5000000, false );
|
||||||
}
|
}
|
||||||
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -9,7 +9,7 @@ import java.io.File;
|
||||||
*/
|
*/
|
||||||
public interface WayListener
|
public interface WayListener
|
||||||
{
|
{
|
||||||
void wayFileStart( File wayfile ) throws Exception;
|
boolean wayFileStart( File wayfile ) throws Exception;
|
||||||
|
|
||||||
void nextWay( WayData data ) throws Exception;
|
void nextWay( WayData data ) throws Exception;
|
||||||
|
|
||||||
|
|
Binary file not shown.
|
@ -213,12 +213,12 @@ Technical constraints
|
||||||
Developing and debugging scripts
|
Developing and debugging scripts
|
||||||
--------------------------------
|
--------------------------------
|
||||||
|
|
||||||
For developing scripts, the "Upload profile" funcionality and the
|
For developing scripts, the "brouter-web" web-application is your
|
||||||
"Export CSV" button of the online version are your friends.
|
friend. You can use that either online at http://brouter/brouter-web
|
||||||
The "Export CSV" gives a (tab-separated) list of all way segments
|
or set up a local installation.
|
||||||
with all tag values and with the calulated cost (in "cost per km").
|
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
|
||||||
These CSV-Data can be imported in Excel using "paste content" function.
|
the individual cost calculations per way-section in the "Data"-tab.
|
||||||
|
|
||||||
|
|
||||||
Lookup-Table evolution and the the "major" and "minor" versions
|
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
|
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
|
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.
|
distribution zip-file.
|
||||||
|
|
||||||
Choosing a SD-Card Base Directory
|
Choosing a SD-Card Base Directory
|
||||||
|
@ -105,7 +105,7 @@ relative to this base directory, so you end up with e.g. the following structure
|
||||||
(depending on base dir and your map-tool choice):
|
(depending on base dir and your map-tool choice):
|
||||||
|
|
||||||
/mnt/sdcard/brouter
|
/mnt/sdcard/brouter
|
||||||
/mnt/sdcard/brouter/segments4 <- ** put routing data files (*.rd5) here **
|
/mnt/sdcard/brouter/segments4 <- ** put routing data files (*.rd5) here **
|
||||||
/mnt/sdcard/brouter/profiles2 <- lookup-table and routing profiles
|
/mnt/sdcard/brouter/profiles2 <- lookup-table and routing profiles
|
||||||
/mnt/sdcard/brouter/modes <- routing-mode/profile mapping
|
/mnt/sdcard/brouter/modes <- routing-mode/profile mapping
|
||||||
|
|
||||||
|
@ -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
|
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
|
(except for the storageconfig.txt file) so you have to get routing-datafiles in
|
||||||
order to complete your installation.
|
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
|
and if a "from" and a "to" wayppoint is found in the database, you will not be prompted
|
||||||
to select waypoints from the database.
|
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
|
If started once more with identical input, BRouter will store a second route broute1.gpx
|
||||||
for the first alternative and so on.
|
for the first alternative and so on.
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue