Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
H
HRDF Routing Engine
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
florian.burgener
HRDF Routing Engine
Commits
ca6fac15
Commit
ca6fac15
authored
Sep 3, 2024
by
Florian Burgener
Browse files
Options
Downloads
Patches
Plain Diff
Quality of life update
parent
b4206076
No related branches found
No related tags found
No related merge requests found
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
src/isochrone.rs
+5
-5
5 additions, 5 deletions
src/isochrone.rs
src/lib.rs
+2
-0
2 additions, 0 deletions
src/lib.rs
src/routing.rs
+4
-4
4 additions, 4 deletions
src/routing.rs
with
11 additions
and
9 deletions
src/isochrone.rs
+
5
−
5
View file @
ca6fac15
...
...
@@ -6,8 +6,8 @@ mod utils;
use
crate
::
isochrone
::
utils
::
haversine_distance
;
use
crate
::
routing
::
find_reachable_stops_within_time_limit
;
use
crate
::
routing
::
Route
Result
;
use
crate
::
routing
::
RouteSection
Result
;
use
crate
::
routing
::
Route
;
use
crate
::
routing
::
RouteSection
;
use
constants
::
WALKING_SPEED_IN_KILOMETERS_PER_HOUR
;
use
hrdf_parser
::
CoordinateSystem
;
use
hrdf_parser
::
Coordinates
;
...
...
@@ -72,10 +72,10 @@ pub fn compute_isochrones(
// A false route is created to represent the point of origin in the results.
let
(
easting
,
northing
)
=
wgs84_to_lv95
(
origin_point_latitude
,
origin_point_longitude
);
let
route
=
Route
Result
::
new
(
let
route
=
Route
::
new
(
NaiveDateTime
::
default
(),
departure_at
,
vec!
[
RouteSection
Result
::
new
(
vec!
[
RouteSection
::
new
(
None
,
0
,
Some
(
Coordinates
::
default
()),
...
...
@@ -190,7 +190,7 @@ fn adjust_departure_at(
(
adjusted_departure_at
,
adjusted_time_limit
)
}
fn
get_data
(
routes
:
Vec
<
Route
Result
>
,
departure_at
:
NaiveDateTime
)
->
Vec
<
(
Coordinates
,
Duration
)
>
{
fn
get_data
(
routes
:
Vec
<
Route
>
,
departure_at
:
NaiveDateTime
)
->
Vec
<
(
Coordinates
,
Duration
)
>
{
routes
.iter
()
.filter_map
(|
route
|
{
...
...
This diff is collapsed.
Click to expand it.
src/lib.rs
+
2
−
0
View file @
ca6fac15
...
...
@@ -7,6 +7,8 @@ mod utils;
pub
use
isochrone
::
compute_isochrones
;
pub
use
routing
::
find_reachable_stops_within_time_limit
;
pub
use
routing
::
plan_journey
;
pub
use
routing
::
Route
;
pub
use
routing
::
RouteSection
;
use
std
::{
env
,
error
::
Error
};
...
...
This diff is collapsed.
Click to expand it.
src/routing.rs
+
4
−
4
View file @
ca6fac15
...
...
@@ -8,8 +8,8 @@ mod route_impl;
mod
utils
;
use
hrdf_parser
::
Hrdf
;
pub
use
models
::
RouteResult
;
pub
use
models
::
RouteSectionResult
;
pub
use
models
::
RouteResult
as
Route
;
pub
use
models
::
RouteSectionResult
as
RouteSection
;
use
core
::
compute_routing
;
...
...
@@ -24,7 +24,7 @@ pub fn plan_journey(
arrival_stop_id
:
i32
,
departure_at
:
NaiveDateTime
,
verbose
:
bool
,
)
->
Option
<
Route
Result
>
{
)
->
Option
<
Route
>
{
let
result
=
compute_routing
(
hrdf
.data_storage
(),
departure_stop_id
,
...
...
@@ -53,7 +53,7 @@ pub fn find_reachable_stops_within_time_limit(
departure_at
:
NaiveDateTime
,
time_limit
:
Duration
,
verbose
:
bool
,
)
->
Vec
<
Route
Result
>
{
)
->
Vec
<
Route
>
{
let
routes
=
compute_routing
(
hrdf
.data_storage
(),
departure_stop_id
,
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
sign in
to comment