version 1.4.9

This commit is contained in:
Arndt Brenschede 2017-09-24 17:11:04 +02:00
parent 0171ba39a0
commit c517ccc2df
43 changed files with 2002 additions and 508 deletions

View file

@ -1,8 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
android:versionCode="20"
android:versionName="1.4.8" package="btools.routingapp">
android:versionCode="21"
android:versionName="1.4.9" package="btools.routingapp">
<application android:icon="@drawable/icon" android:label="@string/app_name">
<activity android:name=".BRouterActivity"
android:label="@string/app_name"

Binary file not shown.

View file

@ -5,7 +5,7 @@
<parent>
<groupId>org.btools</groupId>
<artifactId>brouter</artifactId>
<version>1.4.8</version>
<version>1.4.9</version>
<relativePath>../pom.xml</relativePath>
</parent>
<artifactId>brouter-routing-app</artifactId>

View file

@ -28,10 +28,9 @@ import android.os.Environment;
import android.util.DisplayMetrics;
import android.view.View;
import android.widget.Toast;
import btools.expressions.BExpressionContextGlobal;
import btools.expressions.BExpressionContextWay;
import btools.expressions.BExpressionMetaData;
import btools.mapaccess.OsmNode;
import btools.mapaccess.StorageConfigHelper;
import btools.router.OsmNodeNamed;
import btools.router.OsmTrack;
import btools.router.RoutingContext;
@ -171,7 +170,7 @@ public class BRouterView extends View
String basedir = fbd.getAbsolutePath();
AppLogger.log( "using basedir: " + basedir );
String version = "v1.4.7";
String version = "v1.4.9";
// create missing directories
assertDirectoryExists( "project directory", basedir + "/brouter", null, null );
@ -185,7 +184,7 @@ public class BRouterView extends View
profileDir = basedir + "/brouter/profiles2";
assertDirectoryExists( "profile directory", profileDir, "profiles2.zip", version );
modesDir = basedir + "/brouter/modes";
assertDirectoryExists( "modes directory", modesDir, "modes.zip", null );
assertDirectoryExists( "modes directory", modesDir, "modes.zip", version );
assertDirectoryExists( "readmes directory", basedir + "/brouter/readmes", "readmes.zip", version );
cor = CoordinateReader.obtainValidReader( basedir, segmentDir );
@ -564,7 +563,7 @@ public class BRouterView extends View
{
exists = !vtag.createNewFile();
}
catch( IOException io ) { throw new RuntimeException( "error checking version tag " + vtag ); }
catch( IOException io ) { } // well..
}
if ( !exists )
@ -767,7 +766,7 @@ public class BRouterView extends View
else
{
String memstat = memoryClass + "mb pathPeak " + ((cr.getPathPeak()+500)/1000) + "k";
String result = "version = BRouter-1.4.8\n" + "mem = " + memstat + "\ndistance = " + cr.getDistance() / 1000. + " km\n" + "filtered ascend = " + cr.getAscend()
String result = "version = BRouter-1.4.9\n" + "mem = " + memstat + "\ndistance = " + cr.getDistance() / 1000. + " km\n" + "filtered ascend = " + cr.getAscend()
+ " m\n" + "plain ascend = " + cr.getPlainAscend();
rawTrack = cr.getFoundRawTrack();
@ -920,13 +919,13 @@ public class BRouterView extends View
// parse global section of profile for mode preselection
BExpressionMetaData meta = new BExpressionMetaData();
BExpressionContextGlobal expctxGlobal = new BExpressionContextGlobal( meta );
BExpressionContextWay expctx = new BExpressionContextWay( meta );
meta.readMetaData( new File( profileDir, "lookups.dat" ) );
expctxGlobal.parseFile( new File( profilePath ), null );
expctxGlobal.evaluate( new int[0] );
boolean isFoot = 0.f != expctxGlobal.getVariableValue( "validForFoot", 0.f );
boolean isBike = 0.f != expctxGlobal.getVariableValue( "validForBikes", 0.f );
boolean isCar = 0.f != expctxGlobal.getVariableValue( "validForCars", 0.f );
expctx.parseFile( new File( profilePath ), "global" );
boolean isFoot = 0.f != expctx.getVariableValue( "validForFoot", 0.f );
boolean isBike = 0.f != expctx.getVariableValue( "validForBikes", 0.f );
boolean isCar = 0.f != expctx.getVariableValue( "validForCars", 0.f );
if ( isFoot || isBike || isCar )
{