Skip to content

Commit 44fc3d7

Browse files
committed
Merge branch 'master' into 0.10
2 parents 1727f5f + 0ee9da7 commit 44fc3d7

File tree

39 files changed

+1018
-438
lines changed

39 files changed

+1018
-438
lines changed

.github/CONTRIBUTING.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,8 @@ keep in mind that this requires storing your Email there. The same applies if yo
3434
Note, our CLA does not influence your rights on your contribution but it makes sure for others that you agree to the Apache License, Version 2.
3535
After this you'll appear in the <a href="CONTRIBUTORS.md">contributors list</a> and your pull request can also be discussed technically.
3636

37+
Read more in [this issue](https://github.com/graphhopper/graphhopper/pull/1129#issuecomment-375820168) why it is not that easy to make this CLA-signing process simpler for first-time contributors and maintainers.
38+
3739
For companies that would like that their developers work for us, we need an additional [corporate CLA signed](https://graphhopper.com/agreements/corporate-cla.html).
3840

3941
## Code formatting

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,4 +43,5 @@ local.properties
4343
/reader-overlay-data/nbproject/
4444
!malta-latest.osm.pbf
4545
/reader-json/nbproject/
46-
/graph-cache
46+
/graph-cache
47+
package-lock.json

README.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,9 @@ We have a prosper community and welcome everyone. Let us know your problems, use
1313

1414
To get started read through our documentation and install the GraphHopper Web Service locally:
1515

16-
* unstable: [docs](https://github.com/graphhopper/graphhopper/blob/master/docs/index.md), [zip](https://oss.sonatype.org/content/groups/public/com/graphhopper/graphhopper-web/0.10-SNAPSHOT/), [Android APK](https://oss.sonatype.org/content/groups/public/com/graphhopper/graphhopper-android/0.10-SNAPSHOT/)
17-
* 0.9.0 latest stable: [announcement](https://www.graphhopper.com/blog/2017/05/31/graphhopper-routing-engine-0-9-released/), [docs](https://github.com/graphhopper/graphhopper/blob/0.9/docs/index.md), [zip](https://graphhopper.com/public/releases/graphhopper-web-0.9.0-bin.zip), [Android APK](https://graphhopper.com/public/releases/graphhopper-android-0.9.0.apk)
16+
* unstable: [docs](https://github.com/graphhopper/graphhopper/blob/master/docs/index.md), [zip](https://oss.sonatype.org/content/groups/public/com/graphhopper/graphhopper-web/0.11-SNAPSHOT/), [Android APK](https://oss.sonatype.org/content/groups/public/com/graphhopper/graphhopper-android/0.11-SNAPSHOT/)
17+
* 0.10.0 latest stable: [announcement](https://www.graphhopper.com/blog/2018/03/08/graphhopper-routing-engine-0-10-released/), [docs](https://github.com/graphhopper/graphhopper/blob/0.10/docs/index.md), [zip](https://graphhopper.com/public/releases/graphhopper-web-0.10.0-bin.zip), [Android APK](https://graphhopper.com/public/releases/graphhopper-android-0.10.0.apk)
18+
* 0.9.0: [announcement](https://www.graphhopper.com/blog/2017/05/31/graphhopper-routing-engine-0-9-released/), [docs](https://github.com/graphhopper/graphhopper/blob/0.9/docs/index.md), [zip](https://graphhopper.com/public/releases/graphhopper-web-0.9.0-bin.zip), [Android APK](https://graphhopper.com/public/releases/graphhopper-android-0.9.0.apk)
1819
* 0.8.2: [announcement](https://www.graphhopper.com/blog/2016/10/18/graphhopper-routing-engine-0-8-released/), [docs](https://github.com/graphhopper/graphhopper/blob/0.8/docs/index.md), [zip](https://graphhopper.com/public/releases/graphhopper-web-0.8.2-bin.zip), [Android APK](https://graphhopper.com/public/releases/graphhopper-android-0.8.2.apk)
1920
* 0.7.0: [announcement](https://www.graphhopper.com/blog/2016/06/15/graphhopper-routing-engine-0-7-released/), [docs](https://github.com/graphhopper/graphhopper/blob/0.7/docs/index.md), [zip](https://graphhopper.com/public/releases/graphhopper-web-0.7.0-bin.zip), [Android APK](https://graphhopper.com/public/releases/graphhopper-android-0.7.0.apk)
2021

android/app/pom.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<modelVersion>4.0.0</modelVersion>
55
<groupId>com.graphhopper</groupId>
66
<artifactId>graphhopper-android</artifactId>
7-
<version>0.10-SNAPSHOT</version>
7+
<version>0.11-SNAPSHOT</version>
88
<name>GraphHopper Android</name>
99
<packaging>apk</packaging>
1010
<organization>
@@ -16,7 +16,7 @@
1616
<relativePath>../..</relativePath>
1717
<groupId>com.graphhopper</groupId>
1818
<artifactId>graphhopper-parent</artifactId>
19-
<version>0.10-SNAPSHOT</version>
19+
<version>0.11-SNAPSHOT</version>
2020
</parent>
2121
<properties>
2222
<vtm.version>0.9.2</vtm.version>

appveyor.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ install:
2222
- cmd: mvn --version
2323
- cmd: java -version
2424
build_script:
25-
- mvn clean package -DskipTest -B
25+
- mvn clean install -DskipTests=true -B
2626
test_script:
2727
- mvn test verify -B && mvn checkstyle:check findbugs:check forbiddenapis:check -B
2828
cache:

client-hc/pom.xml

Lines changed: 3 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -23,22 +23,16 @@
2323

2424
<groupId>com.graphhopper</groupId>
2525
<artifactId>directions-api-client-hc</artifactId>
26-
<version>0.10-SNAPSHOT</version>
26+
<version>0.11-SNAPSHOT</version>
2727
<packaging>jar</packaging>
2828
<name>GraphHopper Directions API hand-crafted Java Client.</name>
2929

3030
<parent>
3131
<groupId>com.graphhopper</groupId>
3232
<artifactId>graphhopper-parent</artifactId>
33-
<version>0.10-SNAPSHOT</version>
33+
<version>0.11-SNAPSHOT</version>
3434
</parent>
3535

36-
<properties>
37-
<slf4j.version>1.7.21</slf4j.version>
38-
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
39-
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
40-
</properties>
41-
4236
<dependencies>
4337
<dependency>
4438
<groupId>com.graphhopper</groupId>
@@ -62,16 +56,13 @@
6256
<dependency>
6357
<groupId>com.fasterxml.jackson.core</groupId>
6458
<artifactId>jackson-databind</artifactId>
65-
<!-- TODO how to sync with GH? -->
66-
<version>2.8.4</version>
59+
<version>${jackson.version}</version>
6760
</dependency>
68-
6961
<dependency>
7062
<groupId>com.squareup.okhttp3</groupId>
7163
<artifactId>okhttp</artifactId>
7264
<version>3.8.0</version>
7365
</dependency>
74-
7566
<dependency>
7667
<groupId>org.slf4j</groupId>
7768
<artifactId>slf4j-api</artifactId>

client-hc/src/main/java/com/graphhopper/api/MatrixResponse.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ public void setDistanceRow(int row, int distanceRow[]) {
8888

8989
public void setWeightRow(int row, double weightRow[]) {
9090
if (weights.length > 0) {
91-
check(weights.length, toCount, "to weights");
91+
check(weightRow.length, toCount, "to weights");
9292
weights[row] = weightRow;
9393
} else {
9494
throw new UnsupportedOperationException("Cannot call setWeightRow if weights are disabled");

client-hc/src/test/java/com/graphhopper/api/GraphHopperWebIT.java

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -67,10 +67,10 @@ public void testSimpleRoute() {
6767

6868
@Test
6969
public void testAlternativeRoute() {
70-
// https://graphhopper.com/maps/?point=52.044124%2C10.378346&point=52.043847%2C10.381994&algorithm=alternative_route&ch.disable=true
70+
// https://graphhopper.com/maps/?point=52.042989%2C10.373926&point=52.042289%2C10.384043&algorithm=alternative_route&ch.disable=true
7171
GHRequest req = new GHRequest().
72-
addPoint(new GHPoint(52.044124,10.378346)).
73-
addPoint(new GHPoint(52.043847,10.381994));
72+
addPoint(new GHPoint(52.042989, 10.373926)).
73+
addPoint(new GHPoint(52.042289, 10.384043));
7474
req.setAlgorithm("alternative_route");
7575
req.getHints().put("instructions", true);
7676
req.getHints().put("calc_points", true);
@@ -82,13 +82,13 @@ public void testAlternativeRoute() {
8282

8383
PathWrapper path = paths.get(0);
8484
isBetween(5, 20, path.getPoints().size());
85-
isBetween(400, 500, path.getDistance());
85+
isBetween(1000, 1100, path.getDistance());
8686
assertEquals("Wiesenstraße", path.getDescription().get(0));
8787

8888
path = paths.get(1);
89-
isBetween(3, 15, path.getPoints().size());
90-
isBetween(350, 450, path.getDistance());
91-
assertEquals("Schlopweg", path.getDescription().get(0));
89+
isBetween(20, 30, path.getPoints().size());
90+
isBetween(800, 900, path.getDistance());
91+
assertEquals("Jacobistraße", path.getDescription().get(0));
9292
}
9393

9494
@Test

core/pom.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
<groupId>com.graphhopper</groupId>
77
<artifactId>graphhopper-core</artifactId>
88
<name>GraphHopper Core</name>
9-
<version>0.10-SNAPSHOT</version>
9+
<version>0.11-SNAPSHOT</version>
1010
<packaging>jar</packaging>
1111
<description>
1212
GraphHopper is a fast and memory efficient Java road routing engine
@@ -15,7 +15,7 @@
1515
<parent>
1616
<groupId>com.graphhopper</groupId>
1717
<artifactId>graphhopper-parent</artifactId>
18-
<version>0.10-SNAPSHOT</version>
18+
<version>0.11-SNAPSHOT</version>
1919
</parent>
2020

2121
<properties>

core/src/main/java/com/graphhopper/routing/lm/LMApproximator.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ public LMApproximator(Graph graph, int maxBaseNodes, LandmarkStorage lms, int ac
7979
this.maxBaseNodes = maxBaseNodes;
8080
int idxVirtNode = maxBaseNodes;
8181
virtNodeMap = new GHIntObjectHashMap(graph.getNodes() - idxVirtNode, 0.5f);
82-
// virtual nodes handling: calculate the minium weight for the virt. nodes, i.e. pick the correct neighbouring node
82+
// virtual nodes handling: calculate the minimum weight for the virtual nodes, i.e. pick the correct neighbouring node
8383
if (graph instanceof QueryGraph) {
8484
QueryGraph qGraph = (QueryGraph) graph;
8585
// there are at least two virtual nodes (start & destination)

core/src/main/java/com/graphhopper/routing/weighting/ShortFastestWeighting.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,8 @@ public ShortFastestWeighting(FlagEncoder encoder, double distanceFactor) {
5555

5656
@Override
5757
public double getMinWeight(double distance) {
58-
return super.getMinWeight(distance * distanceFactor);
58+
// TODO: Should we add the [+ distance * distanceFactor]. It improves the heuristic of the A*.
59+
return super.getMinWeight(distance) * timeFactor + distance * distanceFactor;
5960
}
6061

6162
@Override

core/src/main/java/com/graphhopper/storage/BaseGraph.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -703,6 +703,9 @@ void inPlaceNodeRemove(int removeNodeCount) {
703703
setWayGeometry_(fetchWayGeometry_(edgePointer, true, 0, -1, -1), edgePointer, false);
704704
}
705705

706+
// clear N_EDGE_REF
707+
initNodeRefs((nodeCount - removeNodeCount) * nodeEntryBytes, nodeCount * nodeEntryBytes);
708+
706709
if (removeNodeCount >= nodeCount)
707710
throw new IllegalStateException("graph is empty after in-place removal but was " + removeNodeCount);
708711

core/src/main/java/com/graphhopper/storage/change/ChangeGraphHelper.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,9 @@ public void setLogging(boolean log) {
6666
* @return number of successfully applied edge changes
6767
*/
6868
public long applyChanges(EncodingManager em, Collection<JsonFeature> features) {
69+
if (em == null)
70+
throw new NullPointerException("EncodingManager cannot be null to change existing graph");
71+
6972
long updates = 0;
7073
for (JsonFeature jsonFeature : features) {
7174
if (!jsonFeature.hasProperties())

core/src/main/resources/com/graphhopper/util/ar.txt

Lines changed: 36 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -6,32 +6,32 @@ turn_left=اتجه يساراً
66
turn_right=اتجه يميناً
77
turn_slight_left=إستدر لليسار قليلا
88
turn_slight_right=إستدر لليمين قليلا
9-
turn_sharp_left=اتجه كليلاً لليسار
10-
turn_sharp_right=اتجه كليلاً لليمين
11-
keep_left=
12-
keep_right=
9+
turn_sharp_left=اتجه قليلاً لليسار
10+
turn_sharp_right=اتجه قليلاً لليمين
11+
keep_left=احفظ الشمال
12+
keep_right=احفظ اليمين
1313
turn_onto=%1$s خلال %1$s
14-
u_turn=
15-
unknown=
14+
u_turn=الدوران للإتجاه المعاكس
15+
unknown=علامة غير معرفة '%1$s'
1616
web.search_button=ابحث
1717
web.from_hint=من
1818
web.via_hint=خلال
1919
web.to_hint=إلي
2020
web.more_button=المزيد
2121
web.gpx_export_button=GPX التصدير
2222
web.route_info=%1$s ستاخذ %2$s
23-
web.pt_route_info=
24-
web.pt_route_info_walking=
23+
web.pt_route_info=وصول سعت %1$s من خلال %2$s انتقال (%3$s)
24+
web.pt_route_info_walking=الوصول عند %1$s مشياً (%2$s)
2525
web.locations_not_found=لا يوجد طريق من هذه المنطقة
2626
web.bike=دراجة
2727
web.racingbike=دراجة سباق
2828
web.mtb=دراجة جبلية
2929
web.car=سيارة
3030
web.foot=مشياً
31-
web.hike=
32-
web.small_truck=
33-
web.bus=
34-
web.truck=
31+
web.hike=نزهة
32+
web.small_truck=شاحنة صغيرة
33+
web.bus=باص
34+
web.truck=شاحنة
3535
web.staticlink=رابط ثابت
3636
web.motorcycle=دراجة نارية
3737
via=من خلال
@@ -47,33 +47,33 @@ road=طريق
4747
off_bike=انزل الدراجة
4848
cycleway=طريق دائري
4949
way=طريق
50-
small_way=
50+
small_way=طريق صغير
5151
paved=مرصوف
5252
unpaved=غير مرصوف
5353
stopover=توقف %1$s
5454
roundabout_enter=أدخل الدوران
5555
roundabout_exit=في الدوران ، أتخذ مخرج %1$s
5656
roundabout_exit_onto=في الدوران ، أتخذ مخرج %1$s من خلال %2$s
57-
total_ascend=
58-
total_descend=
59-
way_contains_ford=
60-
pt_start_trip=
61-
pt_end_trip=
62-
pt_transfer_to=
63-
web.start_label=
64-
web.intermediate_label=
65-
web.end_label=
66-
web.set_start=
67-
web.set_intermediate=
68-
web.set_end=
69-
web.center_map=
70-
web.show_coords=
71-
web.route=
72-
web.delete_from_route=
73-
web.marker=
74-
web.gh_offline_info=
75-
web.refresh_button=
76-
web.server_status=
77-
web.zoom_in=
78-
web.zoom_out=
79-
web.drag_to_reorder=
57+
total_ascend=%1$s اجمالى صعود
58+
total_descend=%1$s اجمالى نزول
59+
way_contains_ford=هناك مخاضة على طول الطريق
60+
pt_start_trip=ادخل %1$s
61+
pt_end_trip=مغادرة %1$s
62+
pt_transfer_to=انتقل الى %1$s
63+
web.start_label=البداية
64+
web.intermediate_label=نقطة عبور
65+
web.end_label=النهاية
66+
web.set_start=ادخل نقطة بدء
67+
web.set_intermediate=ادخل نقطة عبور
68+
web.set_end=ادخل نقطة وصول
69+
web.center_map=اجعل وسط الخريطة هنا
70+
web.show_coords=اظهر الاحداثيات
71+
web.route=المسار
72+
web.delete_from_route=احذف من المسار
73+
web.marker=رمز او علامة
74+
web.gh_offline_info= واجهة برمجة التطبيقات (API) بلا اتصال؟
75+
web.refresh_button=اعادة تنشيط
76+
web.server_status=الحالة
77+
web.zoom_in=تكبير
78+
web.zoom_out=تصغير
79+
web.drag_to_reorder=اسحب لاعادة الترتيب

core/src/main/resources/com/graphhopper/util/ca.txt

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -8,20 +8,20 @@ turn_slight_left=gira lleugerament a l'esquerra
88
turn_slight_right=gira lleugerament a la dreta
99
turn_sharp_left=gira just a l'esquerra
1010
turn_sharp_right=gira just a la dreta
11-
keep_left=
12-
keep_right=
11+
keep_left=estigues a l'esquerra
12+
keep_right=estigues a la dreta
1313
turn_onto=%1$s per %2$s
14-
u_turn=
15-
unknown=
14+
u_turn=dona la volta
15+
unknown=instrucció desconeguda «%1$s»
1616
web.search_button=Buscar
1717
web.from_hint=Des de
1818
web.via_hint=passant per
1919
web.to_hint=Cap a
2020
web.more_button=més
2121
web.gpx_export_button=Exportar GPX
2222
web.route_info=%1$s trigaràs %2$s
23-
web.pt_route_info=
24-
web.pt_route_info_walking=
23+
web.pt_route_info=arriba a les %1$s amb %2$s transbordaments (%3$s)
24+
web.pt_route_info_walking=arriba caminant a les %1$s (%2$s)
2525
web.locations_not_found=No hi ha cap ruta. El destí no es troba dins l'àrea.
2626
web.bike=Bicicleta
2727
web.racingbike=Bicicleta de carrera
@@ -56,10 +56,10 @@ roundabout_exit=A la rotonda, agafa la %1$s sortida
5656
roundabout_exit_onto=A la rotonda, agafa la sortida %1$s cap a %2$s
5757
total_ascend=%1$s pujada total
5858
total_descend=%1$s baixada total
59-
way_contains_ford=
60-
pt_start_trip=
61-
pt_end_trip=
62-
pt_transfer_to=
59+
way_contains_ford=hi ha un gual en el camí
60+
pt_start_trip=entra a %1$s
61+
pt_end_trip=surt de %1$s
62+
pt_transfer_to=canvia a %1$s
6363
web.start_label=Punt d'inici
6464
web.intermediate_label=Punt intermig
6565
web.end_label=Punt final

0 commit comments

Comments
 (0)