Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
472 commits
Select commit Hold shift + click to select a range
2d1beb0
Fix for #2686
karussell Oct 31, 2022
5ace05c
Improve area check precision (#2684)
otbutz Oct 31, 2022
84c1687
Update maps
easbar Oct 31, 2022
aedc0f4
update translation docs #2686
karussell Oct 31, 2022
525a6cd
force max_slope and average_slope to create SlopeCalculator
karussell Nov 1, 2022
f8d3718
remove that motorroad=yes influences speed or is used as highway tag,…
karussell Nov 1, 2022
4fcee79
CurvatureCalculator: if included in tests that don't set artificial tags
karussell Nov 7, 2022
a0862bc
Treat segments tagged as "lcn=yes" the same way as a bicycle route re…
ratrun Nov 8, 2022
b470886
update maps
easbar Nov 9, 2022
4872a0d
Fix rare NPE in map matching
michaz Nov 9, 2022
978956d
Add support for (single) via-way restrictions (#2689)
easbar Nov 10, 2022
03e64da
Remove outdated comment and rule
michaz Nov 10, 2022
b17d84a
Revert "Remove outdated comment and rule"
michaz Nov 11, 2022
ab5a8b2
value can be no for oneway:bicycle but also for cycleway:right:oneway…
karussell Nov 11, 2022
8bc906f
Replace com.wdtinc MVT library with no.ecc (#2698)
easbar Nov 21, 2022
98be79d
Upgrade to JTS 1.19.0, fix #1803
easbar Nov 21, 2022
45be77c
minor
karussell Nov 21, 2022
93a4571
Support ";" access delimiter for bikes (#2676)
ratrun Nov 21, 2022
43eef6d
Update maps, geocoding is disabled now
easbar Nov 21, 2022
32184ed
Remove LegacyProfileResolver (#2679)
karussell Nov 22, 2022
cb0f72c
add comment
easbar Nov 23, 2022
c1dd843
Update README.md
karussell Nov 24, 2022
4b891fe
Copy no.ecc code, remove no.ecc repository, #2698
easbar Nov 24, 2022
6b54329
Create edges even if flags are empty (#2700)
easbar Nov 29, 2022
ff38f3d
Add OSM way ID encoded value (#2701)
easbar Nov 30, 2022
e93f3e7
remove Bike2WeightTagParser again (#2668)
karussell Nov 30, 2022
33403d6
fix changelog #2703
karussell Dec 1, 2022
ef2937f
Use explicit ignore list for highway values during OSM import (#2702)
easbar Dec 3, 2022
97579b6
Revert "Use explicit ignore list for highway values during OSM import…
easbar Dec 3, 2022
9629f4e
split buildEncodingManagerAndOSMParsers method
easbar Dec 3, 2022
daccf5f
Revert "Revert "Use explicit ignore list for highway values during OS…
easbar Dec 3, 2022
b9b1ed4
Revert "Revert "Revert "Use explicit ignore list for highway values d…
easbar Dec 3, 2022
b8e7770
Revert "Revert "Revert "Revert "Use explicit ignore list for highway …
easbar Dec 3, 2022
8a11f70
Allow ignoring vehicle tag parser name
easbar Dec 3, 2022
38e5049
Add tests to demonstrate that moped=yes etc. does not allow driving o…
easbar Dec 4, 2022
4ecbd61
Keep ways tagged as man_made=pier or platform=railway for foot/bike
easbar Dec 4, 2022
b7c4a0e
Footway encoded value (#2707)
easbar Dec 5, 2022
67ffb79
Add ignored highways to benchmark.sh
easbar Dec 5, 2022
c872780
do not throw an error if Java config is used without config file
karussell Dec 7, 2022
a858e65
Revert "do not throw an error if Java config is used without config f…
easbar Dec 8, 2022
03978b8
Revert ignored highways for now
easbar Dec 8, 2022
0930c16
Use GitHub Actions for Maven Central deployment too (#2709)
karussell Dec 9, 2022
3c7349a
include bus into TransportationMode enum, #2710
karussell Dec 13, 2022
61454fb
log the exception, not just the message
michaz Nov 30, 2022
c9c5550
mapmatching: put visited nodes into log event
michaz Dec 13, 2022
1d672f8
github packages: set permissions
karussell Dec 14, 2022
8f9e3a4
open a few things up
michaz Dec 19, 2022
333303b
vehicle -> profile
michaz Dec 29, 2022
d56aa11
remove unused non-private abstract method
michaz Dec 30, 2022
edf87e6
Implement edge-to-edge routing for unidir AStar
michaz Dec 30, 2022
9f442cb
Revert "Revert ignored highways for now"
easbar Jan 2, 2023
8d8dfc6
Fix test
easbar Jan 2, 2023
39d13f8
Put back test (?)
easbar Jan 3, 2023
b1b3815
Rename publish-github-actions.yml
easbar Jan 3, 2023
fe0834f
Enable LM for small benchmark map and A* measurements for small map
easbar Jan 4, 2023
3ca3b50
Remove name, turnCostEnc and getAccess from VehicleTagParser (#2713)
easbar Jan 5, 2023
e8e75df
make CustomWeighting.Parameters public, #2717
karussell Jan 9, 2023
1ea0a66
distance_influence should not get a default value if no value is spec…
karussell Jan 10, 2023
99d822e
comment
karussell Jan 10, 2023
e77378c
make CustomWeighting.Parameters constructor public too, #2717
karussell Jan 10, 2023
71c1356
pt: push back mapdb
michaz Jan 11, 2023
d3255a6
remove hasDistanceInfluence, #2716
karussell Jan 11, 2023
bb3f908
i18n: updated, #2721
karussell Jan 11, 2023
02574f8
cleanup of ElevationProvider, fixes #2642
karussell Jan 12, 2023
7a87164
average_speed path detail: avoid infinity value (or max JS floats) ne…
karussell Jan 12, 2023
49b0dd1
fixup: pt: push back mapdb
michaz Jan 13, 2023
e1e34c2
bug fix for #2716
karussell Jan 14, 2023
7d55f09
Add GH version to client-hc
easbar Jan 16, 2023
4dca77d
Fix
easbar Jan 16, 2023
f2c5e66
make custom areas available in custom models (#2725)
karussell Jan 16, 2023
ea7ad22
set feature.id from feature.properties.id for our countries.geojson, …
karussell Jan 16, 2023
d668b24
getResourceAsStream implicitly creates a FileSystem required when the…
karussell Jan 16, 2023
ad8270f
specially handle "NO_EDGE"; fixes #2723
michaz Jan 17, 2023
cdd131d
Extract method
easbar Jan 17, 2023
1ed4bee
avoid rounding down small speed (#2726)
karussell Jan 18, 2023
2593298
Maxspeed fix (#2727)
karussell Jan 18, 2023
4cc48ab
Do not check if edge flags are empty before handling node tags
easbar Jan 18, 2023
05a79ad
Return void from TagParser#handleWayTags
easbar Jan 18, 2023
3987f50
Remove some explicit edge flag usage
easbar Jan 19, 2023
b602423
EncodingManager: initializer config is only needed when building
easbar Jan 19, 2023
7b4e735
Fix
easbar Jan 19, 2023
174d269
Use EV factory
easbar Jan 19, 2023
2855919
Test access and speed instead of just flags.isEmpty() for foot and bi…
easbar Jan 20, 2023
b411856
i18n: adding no_NO and updating pl_PL while at it (#2730)
OlafFlebbeBosch Jan 25, 2023
76c3484
areas: don't enforce empty properties, use separate check for areaID,…
karussell Jan 26, 2023
137afdd
increase point_hint limit from 100 to 170, fixes #2732
karussell Jan 26, 2023
ae147f2
Moving Bokmål locale to the correct nb_NO (#2731)
OlafFlebbeBosch Jan 26, 2023
b713008
i18n: lexicographical order, #2731
karussell Jan 27, 2023
928c080
support for foot:backward and forward, fixes #2565
karussell Jan 27, 2023
b9805d0
minor docs update
karussell Jan 27, 2023
5faa5cb
move area/EV name check into relevant classes and fix #2735
karussell Jan 27, 2023
10eb600
fix annoying error message if path details are missing
karussell Jan 28, 2023
57ef0cb
remove comment (hmm-lib is no longer used)
karussell Jan 31, 2023
48e84a9
Split vehicle tag parsers into access, speed and priority (#2738)
easbar Jan 31, 2023
b336780
Use multi-threading for subnetwork preparation (#2737)
easbar Jan 31, 2023
de69896
bike: always use 4km/h for railway=platform, discussion in #2728
karussell Jan 31, 2023
b1f2bd7
use custom_models.directory consistent naming regarding custom_areas.…
karussell Feb 1, 2023
adf9046
Report rank (by distance to network) of chosen snaps
michaz Feb 1, 2023
f6b1a1b
Graph speed measurement
easbar Feb 2, 2023
aa71dc2
Remove block area (#2741)
easbar Feb 7, 2023
b8a010e
Make sure waypoints are not removed during path simplification (#2742)
easbar Feb 7, 2023
c6da16f
use FeatureCollection instead of String,Feature Map (#2734)
karussell Feb 8, 2023
f64c57c
fix #2339 (#2736)
karussell Feb 8, 2023
95565fd
removed unused method (Polygon, #2741)
karussell Feb 9, 2023
2e2eba1
more mapmatching statistics
michaz Feb 10, 2023
52cb04e
Remove no-longer existing extraProfiles field from maps config
easbar Feb 12, 2023
4494875
i18n: updated sv_SE (#2748)
OlafFlebbeBosch Feb 13, 2023
a27fb6a
Revert "removed unused method (Polygon, #2741)"
easbar Feb 13, 2023
86665ab
Revert "Remove block area (#2741)"
easbar Feb 13, 2023
b24a3d7
Allow small tolerance for waypoint consistency check, #2742
easbar Feb 13, 2023
3df30f8
handle 'permit' like 'private', fixes #2712 (#2749)
karussell Feb 14, 2023
3910b02
client-hc: add hints to response
easbar Feb 15, 2023
54191a1
PathDetailsBuilderFactory: avoid modifying request
karussell Feb 15, 2023
c4cbcf7
client-hc: return hints as text
easbar Feb 15, 2023
901bdeb
move to more recent java versions
karussell Feb 15, 2023
a36dfaf
Add request transformer hook to RouteResource
easbar Feb 16, 2023
3089ae9
i18n: updated tr and fix typo in nb_NO (#2750)
OlafFlebbeBosch Feb 16, 2023
cb5abf6
minor fix
karussell Feb 16, 2023
b69aa7f
client-hc: use Helper.toObject
easbar Feb 17, 2023
43792ad
readme: use jar from maven central
karussell Feb 17, 2023
c368573
Improve error message when using another vehicle than the ones used f…
easbar Feb 18, 2023
fe9706c
CustomModelParser: more explicit verification of method calls, fixes …
karussell Feb 19, 2023
e63c5f3
remove StringEncodedValue support from custom model due to insufficie…
karussell Feb 19, 2023
d734238
Extend Heading Documentation (#2714)
lukasalexanderweber Feb 21, 2023
8f144d8
Minor changes for heading docs, #2714
easbar Feb 21, 2023
bae8905
Make sure LM approximation is never worse than beeline (#2756)
easbar Feb 21, 2023
6f5e38c
remove hike vehicle (#2759)
karussell Feb 21, 2023
78fe44a
Remove block_area (again) (#2755)
easbar Feb 21, 2023
ffe2088
Fix snap issue (#2752)
karussell Feb 23, 2023
fbec668
Extract createSolver methods
easbar Feb 24, 2023
d9126a6
add parsers only once if multiple bike/foot profiles
karussell Feb 24, 2023
69a1c59
Extract test method
easbar Feb 24, 2023
b2b955d
Allow adding node-based CH for profiles with turn costs
easbar Feb 25, 2023
6bca4de
protected
easbar Feb 25, 2023
f8f6f23
further lower priority for sidewalk=no, especially for highways not i…
karussell Feb 28, 2023
bed3332
fix bug in conditional handling, #1326
karussell Mar 1, 2023
fd2ee36
fix comment
karussell Mar 1, 2023
f23d1ea
clean up custom models and documentation, #2659
karussell Mar 1, 2023
11c3dee
foot vehicle: important fix regarding barrier nodes, bug introduced i…
karussell Mar 2, 2023
9af3978
Revert "Allow adding node-based CH for profiles with turn costs"
easbar Mar 3, 2023
d6b3ff7
fix bike2.json reference in config example
karussell Mar 2, 2023
2ea7fb2
try older maven
karussell Mar 3, 2023
1e71bc5
improve documentation for windows
karussell Mar 3, 2023
70ea1ca
make mvn deploy to Github Actions working again with a special option…
karussell Mar 3, 2023
ac2a3ff
Use way point indices instead of intervals in ResponsePath, #2742
easbar Mar 7, 2023
ddf2fd2
Clarify test: instruction for two-lane (!) u-turn
easbar Mar 7, 2023
2cbea89
make get+setTags of ReaderElement consistent
karussell Mar 7, 2023
d2cb912
fix follow up snap issue (#2769)
karussell Mar 8, 2023
53d87ae
Allow skipping the creation of ReaderNodes/Ways/Relations for pbfs, s…
easbar Mar 8, 2023
b0a129c
Show u-turn instruction for plain u-turns (#2767)
easbar Mar 9, 2023
a0cddbd
7.0 release - change readme
karussell Mar 13, 2023
0cfe445
use 8.0-SNAPSHOT
karussell Mar 13, 2023
735de7a
Add path details for the time, distance and weight of the single legs…
easbar Mar 14, 2023
d1e00d4
A*: set weight of visited path explicitly
easbar Mar 15, 2023
345904b
changelog: set release date
karussell Mar 15, 2023
33859a0
Reuse the polygon BBox (#2685)
otbutz Mar 15, 2023
d781707
Make use of node tags like 'highway' or 'crossing' (#2705)
easbar Mar 16, 2023
dea59e8
changelog
karussell Mar 17, 2023
ce29ab2
pt: remove hardcoded use of FastestWeighting to avoid problems with f…
michaz Mar 19, 2023
0a89987
New "backward_xy" variable notation in custom models (#2760)
karussell Mar 21, 2023
229e4b0
new test regarding the addition order of (bike) VehicleTagParser and …
karussell Mar 22, 2023
74a3ea5
New signature for encoded values and tag parsers (#2740)
easbar Mar 23, 2023
38cc8d8
Add static creators for enum encoded values
easbar Jan 19, 2023
d0cb557
Rename createIntAccess -> createEdgeIntAccess
easbar Mar 23, 2023
56c7941
bike profile should allow reverse oneway roads and set walking speed …
karussell Mar 24, 2023
528dde4
Never treat a highway tagged with cycleway:both as oneway for bicycle…
ratrun Mar 29, 2023
42f7f80
include permit->private handling in road_access, #2712, #2749
karussell Mar 30, 2023
a9216c7
add 4 more enc values to config description
karussell Mar 30, 2023
4029764
avoid get_off_bike problem for path, fixes #2777
karussell Apr 1, 2023
1856806
fix bug in bike custom model
karussell Apr 2, 2023
ca9b038
Improve bicycle handling: Now prioritise cycleways with SLIGHT_PREFER…
ratrun Apr 3, 2023
8c60d14
custom_model_files arrays (#2787)
karussell Apr 3, 2023
0dc5dab
certain conditional tags allow to ignore max_weight (#2788)
karussell Apr 3, 2023
a4ac7a2
Check cycleway access tags (#2786)
bt90 Apr 3, 2023
be7209b
removed parser options block_private and block_fords (#2780)
karussell Apr 3, 2023
e896267
adjust benchmarks for #2780
karussell Apr 3, 2023
92bd11f
removed motorcycle vehicle (#2781)
karussell Apr 3, 2023
2993296
hike and cargo_bike: exclude private roads
karussell Apr 3, 2023
94a5602
custom models: list priority first for no particular reason
karussell Apr 3, 2023
69b369b
minor tweak
karussell Apr 3, 2023
9f5a499
Revert "removed parser options block_private and block_fords (#2780)"
karussell Apr 4, 2023
8ceab61
A*: infinite approximation means the target is unreachable
easbar Apr 5, 2023
a08eee1
Make the MiniGraphUI working again. (#2793)
ratrun Apr 8, 2023
adc31b2
Use separate logger for OSM warnings
easbar Apr 11, 2023
4014830
osm_warning -> osm_warnings
easbar Apr 11, 2023
a0f20c3
update graphhopper maps to latest
karussell Apr 8, 2023
8832fa2
maps: avoid URI too long for bigger custom models
karussell Apr 8, 2023
409808c
avoid IllegalStateException if duplicate path detail
karussell Apr 11, 2023
1f1709c
bike custom model: fix roundabout
karussell Apr 12, 2023
66e3c9c
Prefer bicycle_road/cycleway (#2790)
bt90 Apr 12, 2023
a5683fa
i18n: update da_DK (#2794)
OlafFlebbeBosch Apr 12, 2023
56a6620
Improve surface parser (#2792)
otbutz Apr 14, 2023
5ffd5f9
avoid config mistakes
karussell Apr 17, 2023
bdc7a3b
Add timeout_ms parameter for routing requests (#2795)
easbar Apr 18, 2023
ec2b7a1
Upgrade to dropwizard 2.1.6 (#2653)
karussell Apr 19, 2023
19dbd97
resurrect appveyor
karussell Apr 19, 2023
064d9b9
appveyor: revert part of the change
karussell Apr 19, 2023
442948c
upgrade commons-io + junit-bom + osmosis-osm-binary
karussell Apr 19, 2023
c2a7b40
bike: differentiate between bad highways (#2796)
karussell Apr 19, 2023
8b293e5
reduce calling PriorityCode.getValue, code review in #2796
karussell Apr 19, 2023
97a7eaa
minor test rename
karussell Apr 20, 2023
9fde3fb
Update nl and cz translations (#2799)
boldtrn Apr 20, 2023
b279af8
upgrade janino to latest version 3.1.9; remove our workaround for 3.1…
karussell Apr 20, 2023
050d56a
cleanup of EnumEncodedValue (#2800)
karussell Apr 22, 2023
c2d4bf3
always use unix LF, related #2791
karussell Apr 22, 2023
7161604
Add root editorconfig (#2791)
otbutz Apr 22, 2023
862faa7
Update CONTRIBUTING.md
karussell Apr 22, 2023
c496fce
Prefer bigger roads for racebike (#2802)
ratrun Apr 24, 2023
d77faa1
changelog for #2796 and #2802
karussell Apr 24, 2023
b0c1d81
This is a 400 user error, not an ERROR in the logging sense
michaz Apr 25, 2023
d8d9c9c
Simplify WaySegmentParser.Builder
easbar Apr 28, 2023
f7fd08a
Release some memory earlier after reading OSM
easbar Apr 28, 2023
3501a45
profile name, not vehicle name
michaz Apr 28, 2023
4637096
Fix
easbar Apr 29, 2023
948294f
Add check for pillar node overflow
easbar May 1, 2023
88fcf94
OSMNodeData.nodeKVStorage: add missing create
karussell May 4, 2023
17dcf52
ferry: hgv=yes allows car even if car tagging is missing
karussell May 6, 2023
aa09e14
B-tree: Make space for values configurable (#2814)
karussell May 8, 2023
ac64643
clarify foot access parser (#2801)
lukasalexanderweber May 8, 2023
6747609
De-prioritise steps for bicycles (#2804)
ratrun May 8, 2023
9a62484
i18n: updated tr (@ihsanguldur) and added new translation for Kazakh kz
karussell May 8, 2023
5472159
differentiate travel time betas for access vs egress
michaz May 12, 2023
84e58c0
Make sure directed edge filter receives real edge
easbar May 14, 2023
51d5c88
public CustomModelParser.createWeightingParameters
karussell May 15, 2023
b791714
hike model: allow private tags that are for motor vehicles only, adds…
karussell May 15, 2023
4ce025e
Update README.md
karussell May 15, 2023
caf27d6
Set empty custom model in custom profile constructor (#2821)
easbar May 17, 2023
796d42b
Update deploy.md
karussell May 19, 2023
7352ec3
number formatting: use ENGLISH instead of FRENCH as it sometimes caus…
karussell May 24, 2023
3470031
Try latest JDK 20 (#2789)
karussell May 26, 2023
dd4271d
Process callables GHUtility.runConcurrently in batches to save memory…
easbar May 27, 2023
a5bd94a
Overhauled Moving Average Elevation Smoothing (#2772)
christophlingg May 31, 2023
b9f06f4
avoid incorrect urban_density classification for the USA (#2832)
karussell May 31, 2023
fdc66fa
Fix QueryGraph#getEdges
easbar Jun 1, 2023
b88eaf5
Country subdivision (state) (#2830)
karussell Jun 5, 2023
069c651
Use ForkJoinPool for concurrent processing (#2833)
otbutz Jun 6, 2023
53b4295
residential should not be ignored but treated as tertiary, #2832
karussell Jun 7, 2023
6748d1d
Remove BitUtilBig (#2811)
easbar Jun 8, 2023
1fb98f7
update GH maps to latest
karussell Jun 9, 2023
8c9c659
Clean up country/state selection logic, #2830
easbar Jun 9, 2023
0930774
default speed limits (#2810)
karussell Jun 12, 2023
866cbec
Update maps
easbar Jun 12, 2023
51602fb
typo
karussell Jun 12, 2023
fb456dd
bike: remove hazmat handling, fixes #2840
karussell Jun 15, 2023
cea958f
bug fix for UK speed limit
karussell Jun 17, 2023
3527752
use unlimited speed constant for DEU
karussell Jun 17, 2023
6155a96
Use junction density to determine road network density (#2842)
easbar Jun 21, 2023
34ac65e
Update config example and skip country requirement, for #2842
easbar Jun 21, 2023
345053a
Merge branch 'gh-master' into changes/gh-8
Jun 22, 2023
b9669fb
Jun 22, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 0 additions & 35 deletions .github/workflows/publish-github-packages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,38 +47,3 @@ jobs:
mvn -Dmaven.resolver.transport=wagon -B -DskipTests -Pskip-shaded-web-jar -Pskip-tools-jar source:jar deploy
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
build-only:
runs-on: ubuntu-20.04
strategy:
fail-fast: false
matrix:
java-version: [ 18 ]
steps:
- uses: actions/checkout@v3
- uses: actions/setup-java@v3
with:
java-version: ${{ matrix.java-version }}
distribution: temurin
- name: Cache Maven artifacts
uses: actions/cache@v3
with:
path: ~/.m2/repository
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
restore-keys: |
${{ runner.os }}-maven-
- name: Cache node
uses: actions/cache@v3
with:
path: web-bundle/node
key: ${{ runner.os }}-node-${{ hashFiles('**/pom.xml') }}
restore-keys: |
${{ runner.os}}-node-
- name: Cache node_modules
uses: actions/cache@v3
with:
path: web-bundle/node_modules
key: ${{ runner.os }}-node-${{ hashFiles('**/pom.xml', '**/package.json') }}
restore-keys: |
${{ runner.os}}-node_modules-
- name: Build ${{ matrix.java-version }}
run: mvn -B clean test
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@
- prefer cycleways, bicycle_road and cyclestreet for bike routing, see #2784 and #2778
- add support for further surfaces like pebblestones or concrete:lanes, see #2751
- reduced memory usage for urban density calculation, see #2828
- urban density is now based on road junctions, so the according parameters need adjustment in case
the config file does not use the defaults, see #2842

### 7.0 [14 Mar 2023]

Expand Down
54 changes: 29 additions & 25 deletions config-example.yml
Original file line number Diff line number Diff line change
Expand Up @@ -137,43 +137,47 @@ graphhopper:

#### Urban density (built-up areas) ####

#### Country-dependent defaults for max speeds ####
#### Country-dependent defaults for max speeds ####

# This features sets a maximum speed in 'max_speed' encoded value if no maxspeed tag was found. It is country-dependent
# and based on several rules. See https://github.com/westnordost/osm-legal-default-speeds
# To use it uncomment the following, then enable urban density below and add 'country' to graph.encoded_values
# max_speed_calculator.enabled: true
# This features sets a maximum speed in 'max_speed' encoded value if no maxspeed tag was found. It is country-dependent
# and based on several rules. See https://github.com/westnordost/osm-legal-default-speeds
# To use it uncomment the following, then enable urban density below and add 'country' to graph.encoded_values
# max_speed_calculator.enabled: true


#### Urban density (built-up areas) ####
#### Urban density (built-up areas) ####

# This feature allows classifying roads into 'rural', 'residential' and 'city' areas (encoded value 'urban_density')
# Use 1 or more threads to enable the feature
# graph.urban_density.threads: 8
# Use higher/lower sensitivities if too little/many roads fall into the according categories.
# Using smaller radii will speed up the classification, but only change these values if you know what you are doing.
# If you do not need the (rather slow) city classification set city_radius to zero.
# graph.urban_density.residential_radius: 300
# graph.urban_density.residential_sensitivity: 60
# graph.urban_density.city_radius: 2000
# graph.urban_density.city_sensitivity: 30
# This feature allows classifying roads into 'rural', 'residential' and 'city' areas (encoded value 'urban_density')
# Use 1 or more threads to enable the feature
# graph.urban_density.threads: 8
# Use higher/lower sensitivities if too little/many roads fall into the according categories.
# Using smaller radii will speed up the classification, but only change these values if you know what you are doing.
# If you do not need the (rather slow) city classification set city_radius to zero.
# graph.urban_density.residential_radius: 400
# graph.urban_density.residential_sensitivity: 6000
# graph.urban_density.city_radius: 1500
# graph.urban_density.city_sensitivity: 1000


#### Subnetworks ####
#### Subnetworks ####

# In many cases the road network consists of independent components without any routes going in between. In
# the most simple case you can imagine an island without a bridge or ferry connection. The following parameter
# allows setting a minimum size (number of edges) for such detached components. This can be used to reduce the number
# of cases where a connection between locations might not be found.
# In many cases the road network consists of independent components without any routes going in between. In
# the most simple case you can imagine an island without a bridge or ferry connection. The following parameter
# allows setting a minimum size (number of edges) for such detached components. This can be used to reduce the number
# of cases where a connection between locations might not be found.
prepare.min_network_size: 200
prepare.subnetworks.threads: 1


#### Routing ####
#### Routing ####

# You can define the maximum visited nodes when routing. This may result in not found connections if there is no
# connection between two points within the given visited nodes. The default is Integer.MAX_VALUE. Useful for flexibility mode
# routing.max_visited_nodes: 1000000

# You can define the maximum visited nodes when routing. This may result in not found connections if there is no
# connection between two points within the given visited nodes. The default is Integer.MAX_VALUE. Useful for flexibility mode
# routing.max_visited_nodes: 1000000
# The maximum time in milliseconds after which a routing request will be aborted. This has some routing algorithm
# specific caveats, but generally it should allow the prevention of long-running requests. The default is Long.MAX_VALUE
# routing.timeout_ms: 300000

# The maximum time in milliseconds after which a routing request will be aborted. This has some routing algorithm
# specific caveats, but generally it should allow the prevention of long-running requests. The default is Long.MAX_VALUE
Expand Down
13 changes: 5 additions & 8 deletions core/src/main/java/com/graphhopper/GraphHopper.java
Original file line number Diff line number Diff line change
Expand Up @@ -114,10 +114,10 @@ public class GraphHopper {
private int minNetworkSize = 200;
private int subnetworksThreads = 1;
// residential areas
private double residentialAreaRadius = 300;
private double residentialAreaSensitivity = 60;
private double cityAreaRadius = 2000;
private double cityAreaSensitivity = 30;
private double residentialAreaRadius = 400;
private double residentialAreaSensitivity = 6000;
private double cityAreaRadius = 1500;
private double cityAreaSensitivity = 1000;
private int urbanDensityCalculationThreads = 0;

// preparation handlers
Expand Down Expand Up @@ -915,12 +915,9 @@ protected void postImport() {
throw new IllegalArgumentException("Urban density calculation requires " + RoadClass.KEY);
if (!encodingManager.hasEncodedValue(RoadClassLink.KEY))
throw new IllegalArgumentException("Urban density calculation requires " + RoadClassLink.KEY);
if (!encodingManager.hasEncodedValue(Country.KEY))
throw new IllegalArgumentException("Urban density calculation requires " + Country.KEY);
EnumEncodedValue<Country> countryEnc = encodingManager.getEnumEncodedValue(Country.KEY, Country.class);
EnumEncodedValue<RoadClass> roadClassEnc = encodingManager.getEnumEncodedValue(RoadClass.KEY, RoadClass.class);
BooleanEncodedValue roadClassLinkEnc = encodingManager.getBooleanEncodedValue(RoadClassLink.KEY);
UrbanDensityCalculator.calcUrbanDensity(baseGraph, urbanDensityEnc, countryEnc, roadClassEnc,
UrbanDensityCalculator.calcUrbanDensity(baseGraph, urbanDensityEnc, roadClassEnc,
roadClassLinkEnc, residentialAreaRadius, residentialAreaSensitivity, cityAreaRadius, cityAreaSensitivity, urbanDensityCalculationThreads);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@

import static com.graphhopper.util.DistancePlaneProjection.DIST_PLANE;

import static com.graphhopper.util.DistancePlaneProjection.DIST_PLANE;

class QueryOverlayBuilder {
private final int firstVirtualNodeId;
private final int firstVirtualEdgeId;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -86,16 +86,15 @@ public double calcRoadDensity(EdgeIteratorState edge, double radius, ToDoubleFun
final double radiusNormalized = DIST_PLANE.calcNormalizedDist(radius);
while (!deque.isEmpty()) {
int node = deque.removeFirst();
double distance = DIST_PLANE.calcNormalizedDist(center.lat, center.lon, na.getLat(node), na.getLon(node));
if (distance > radiusNormalized)
continue;
EdgeIterator iter = edgeExplorer.setBaseNode(node);
while (iter.next()) {
if (visited.contains(iter.getAdjNode()))
continue;
visited.add(iter.getAdjNode());
double distance = DIST_PLANE.calcNormalizedDist(center.lat, center.lon, getLat(na, iter.getBaseNode(), iter.getAdjNode()), getLon(na, iter.getBaseNode(), iter.getAdjNode()));
if (distance > radiusNormalized)
continue;
double roadLength = Math.min(2 * radius, iter.getDistance());
totalRoadWeight += roadLength * calcRoadFactor.applyAsDouble(iter);
totalRoadWeight += calcRoadFactor.applyAsDouble(iter);
deque.addLast(iter.getAdjNode());
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,14 +43,13 @@ public class UrbanDensityCalculator {
* @param threads number of threads used to calculate the road densities
*/
public static void calcUrbanDensity(Graph graph, EnumEncodedValue<UrbanDensity> urbanDensityEnc,
EnumEncodedValue<Country> countryEnc,
EnumEncodedValue<RoadClass> roadClassEnc, BooleanEncodedValue roadClassLinkEnc,
double residentialAreaRadius, double residentialAreaSensitivity,
double cityAreaRadius, double cityAreaSensitivity,
int threads) {
logger.info("Calculating residential areas ..., radius={}, sensitivity={}, threads={}", residentialAreaRadius, residentialAreaSensitivity, threads);
StopWatch sw = StopWatch.started();
calcResidential(graph, urbanDensityEnc, countryEnc, roadClassEnc, roadClassLinkEnc, residentialAreaRadius, residentialAreaSensitivity, threads);
calcResidential(graph, urbanDensityEnc, roadClassEnc, roadClassLinkEnc, residentialAreaRadius, residentialAreaSensitivity, threads);
logger.info("Finished calculating residential areas, took: " + sw.stop().getSeconds() + "s");
if (cityAreaRadius > 1) {
logger.info("Calculating city areas ..., radius={}, sensitivity={}, threads={}", cityAreaRadius, cityAreaSensitivity, threads);
Expand All @@ -61,46 +60,24 @@ public static void calcUrbanDensity(Graph graph, EnumEncodedValue<UrbanDensity>
}

private static void calcResidential(Graph graph, EnumEncodedValue<UrbanDensity> urbanDensityEnc,
EnumEncodedValue<Country> countryEnc,
EnumEncodedValue<RoadClass> roadClassEnc, BooleanEncodedValue roadClassLinkEnc,
double radius, double sensitivity, int threads) {
final ToDoubleFunction<EdgeIteratorState> calcRoadFactor = edge -> {
if (edge.get(roadClassLinkEnc))
// highway exits sometimes have a 'high' density. By excluding them here we try to prevent them from
// being classified as residential areas when they are in the countryside.
return 0;
RoadClass roadClass = edge.get(roadClassEnc);
switch (roadClass) {
// we're interested in the road density of urban roads, so residential areas are particularly interesting
case RESIDENTIAL:
// https://github.com/graphhopper/graphhopper/issues/2829
return edge.get(countryEnc) == Country.USA ? 1 : 2;
case LIVING_STREET:
case FOOTWAY:
case CYCLEWAY:
case STEPS:
return 2;
case MOTORWAY:
case TRUNK:
case PRIMARY:
case SECONDARY:
case TERTIARY:
case SERVICE:
case OTHER:
return 1;
default:
return 0;
}
// we're interested in the road density of 'urban' roads, so dense road clusters of outdoor
// roads like tracks or paths and road class links should not contribute to the residential density
if (edge.get(roadClassLinkEnc) ||
roadClass == RoadClass.TRACK ||
roadClass == RoadClass.SERVICE ||
roadClass == RoadClass.PATH ||
roadClass == RoadClass.BRIDLEWAY)
return 0;
else
return 1;
};
// temporarily write results to an external array for thread-safety
boolean[] isResidential = new boolean[graph.getEdges()];
RoadDensityCalculator.calcRoadDensities(graph, (calculator, edge) -> {
RoadClass roadClass = edge.get(roadClassEnc);
if (roadClass == RoadClass.LIVING_STREET
|| roadClass == RoadClass.RESIDENTIAL && edge.get(countryEnc) != Country.USA) {
isResidential[edge.getEdge()] = true;
return;
}
double roadDensity = calculator.calcRoadDensity(edge, radius, calcRoadFactor);
isResidential[edge.getEdge()] = roadDensity * sensitivity >= 1.0;
}, threads);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -148,13 +148,13 @@ public String getName() {
public String toString() {
return getName();
}



public static VehicleEncodedValues matrixbike(PMap properties) {
return bike(new PMap(properties).putObject("name", properties.getString("name", "matrixbike")));
}

public static VehicleEncodedValues matrixcar(PMap properties) {
return car(new PMap(properties).putObject("name", properties.getString("name", "matrixcar")));
}

}

}
Original file line number Diff line number Diff line change
Expand Up @@ -47,14 +47,6 @@ public static VehicleTagParsers car(EncodedValueLookup lookup, PMap properties)
);
}

public static VehicleTagParsers matrixcar(EncodedValueLookup lookup, PMap properties) {
return new VehicleTagParsers(
new MatrixCarAccessParser(lookup, properties).init(properties.getObject("date_range_parser", new DateRangeParser())),
new MatrixCarAverageSpeedParser(lookup, properties),
null
);
}

public static VehicleTagParsers bike(EncodedValueLookup lookup, PMap properties) {
return new VehicleTagParsers(
new BikeAccessParser(lookup, properties).init(properties.getObject("date_range_parser", new DateRangeParser())),
Expand All @@ -63,14 +55,6 @@ public static VehicleTagParsers bike(EncodedValueLookup lookup, PMap properties)
);
}

public static VehicleTagParsers matrixbike(EncodedValueLookup lookup, PMap properties) {
return new VehicleTagParsers(
new MatrixBikeAccessParser(lookup, properties).init(properties.getObject("date_range_parser", new DateRangeParser())),
new MatrixBikeAverageSpeedParser(lookup, properties),
new MatrixBikePriorityParser(lookup, properties)
);
}

public static VehicleTagParsers racingbike(EncodedValueLookup lookup, PMap properties) {
return new VehicleTagParsers(
new RacingBikeAccessParser(lookup, properties).init(properties.getObject("date_range_parser", new DateRangeParser())),
Expand Down Expand Up @@ -103,7 +87,21 @@ public static VehicleTagParsers wheelchair(EncodedValueLookup lookup, PMap prope
);
}

public static VehicleTagParsers matrixbike(EncodedValueLookup lookup, PMap properties) {
return new VehicleTagParsers(
new MatrixBikeAccessParser(lookup, properties).init(properties.getObject("date_range_parser", new DateRangeParser())),
new MatrixBikeAverageSpeedParser(lookup, properties),
new MatrixBikePriorityParser(lookup, properties)
);
}

public static VehicleTagParsers matrixcar(EncodedValueLookup lookup, PMap properties) {
return new VehicleTagParsers(
new MatrixCarAccessParser(lookup, properties).init(properties.getObject("date_range_parser", new DateRangeParser())),
new MatrixCarAverageSpeedParser(lookup, properties),
null
);
}

public VehicleTagParsers(TagParser accessParser, TagParser speedParser, TagParser priorityParser) {
this.accessParser = accessParser;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -126,4 +126,4 @@ public void handleWayTags(int edgeId, EdgeIntAccess edgeIntAccess, ReaderWay way
accessEnc.setBool(false, edgeId, edgeIntAccess, true);
accessEnc.setBool(true, edgeId, edgeIntAccess, true);
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ public int addShortcutEdgeBased(int a, int b, int accessFlags, double weight, in
}

public int addShortcutEdgeBased(int a, int b, int accessFlags, double weight, double distance, long time,
int skippedEdge1, int skippedEdge2,
int skippedEdge1, int skippedEdge2,
int origFirst, int origLast) {
checkNewShortcut(a, b);
int shortcut = storage.shortcutEdgeBased(a, b, accessFlags, weight, distance,time, skippedEdge1, skippedEdge2, origFirst, origLast);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -670,4 +670,4 @@ private void assertAccess(ReaderWay way, boolean fwd, boolean bwd) {
if (fwd) assertTrue(accessEnc.getBool(false, edge, edgeIntAccess));
if (bwd) assertTrue(accessEnc.getBool(true, edge, edgeIntAccess));
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -596,4 +596,4 @@ public void testAvoidMotorway() {
assertPriority(REACH_DESTINATION, osmWay);
}

}
}
Original file line number Diff line number Diff line change
Expand Up @@ -730,4 +730,4 @@ void footway_etc_not_allowed_despite_vehicle_yes(String vehicle) {
assertEquals(WayAccess.CAN_SKIP, parser.getAccess(way));
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -557,4 +557,4 @@ public void maxSpeed() {
// note that this test made more sense when we used encoders that defined a max speed.
assertEquals(16, speedEnc.getNextStorableValue(15));
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -190,4 +190,4 @@ public void testBarrierAccess() {
assertFalse(accessParser.isBarrier(node));
}

}
}
Original file line number Diff line number Diff line change
Expand Up @@ -291,4 +291,4 @@ public void testClassBicycle() {
way.setTag("class:bicycle", "-2");
assertPriority(BEST, way);
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -588,4 +588,4 @@ public void testApplyWayTags() {
assertEquals(0, edge45.get(wheelchairAvSpeedEnc), 0.1);
assertEquals(0, edge45.getReverse(wheelchairAvSpeedEnc), 0.1);
}
}
}
Loading