-
Notifications
You must be signed in to change notification settings - Fork 31
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Extends shapes to store bounding boxes (#148)
* Move bounding box calculation into nigiri * Make bounding boxes for segments optional Clients are now required to provide a fallback when needed. * Fix duplicated entries * Make filtering more explicit * Delay value calculation until needed This avoids duplicated and unused entries for repeated calls. * Simplify route iteration * Update geo dependency * Fix out of bounds shape offset * Add test case for invalid offset * Improve comment * Unify boxes size * Store stops per shapes to process * Move code into struct * WIP: Perform parallel calculations * Make methods const * Update progress bar * Move nullptr check into struct * Check for execution policy support * Remove unused code * Make nullopt more explicit * Fix MSVC build * Fix formatting * Fix formatting * Add test for routes containing sequential trips * Rename shape result objects * Make intended usage more obvious * Move data on last usage * Update variable names * Renane variable * Add missing const * Apply suggested newline Co-authored-by: Felix Gündling <felix.guendling@gmail.com> * Improve readability * Update parallel computations * Improve method names * Split shape boxes into two files * Simplify parallel usage * Rename variables * WIP: Change code to tasks Warning: Dangling references will cause use after free * Fix use after free * Create offset entries * Create bounding boxes * Remove mutex * Delete old code * Rename variables * Remove intermediate struct * Fix compile issues * Fix invalid range * Fix empty bound boxes * Fix empty bound boxes for sequential trips * Reduce stored data for simple sequential trips * Fix formatting * Fix size type * Attempt to fix macos build * wip * Apply pending changes * Delete old code * Remove unused includes * Cleanup code * Add missing check for end element * Update progress status text --------- Co-authored-by: Felix Gündling <felix.guendling@gmail.com>
- Loading branch information
1 parent
fe8663e
commit 11b8d96
Showing
12 changed files
with
443 additions
and
116 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,24 @@ | ||
139770128757021168 | ||
cista 48210e6925658163952e458a4d13629ffdb0cea3 | ||
5786421993668347507 | ||
cista fabfc0cbcf07343a2e0c2def3009555b22f0ae46 | ||
PEGTL 1c1aa6e650e4d26f10fa398f148ec0cdc5f0808d | ||
res b759b93316afeb529b6cb5b2548b24c41e382fb0 | ||
date ce88cc33b5551f66655614eeebb7c5b7189025fb | ||
googletest 7b64fca6ea0833628d6f86255a81424365f7cc0c | ||
fmt dc10f83be70ac2873d5f8d1ce317596f1fd318a2 | ||
utl 77aac494c45d2b070e65fe712abc34ac74a91d0f | ||
utl 8bfa7fc4edc23f716173bdfbcab8294fcc31e457 | ||
oh d21c30f40e52a83d6dc09bcffd0067598b5ec069 | ||
zlib ee0742244d93c4237154ae16c3db42b5f284b442 | ||
boost 60cae66449fa3c9599b2b7d3d5d44c65301ed3a3 | ||
zlib-ng 68ab3e2d80253ec5dc3c83691d9ff70477b32cd3 | ||
boost 73549ebca677fe6214202a1ab580362b4f80e653 | ||
doctest 70e8f76437b76dd5e9c0a2eb9b907df190ab71a0 | ||
geo 0a14addf42e91b267906a156c9c2564935c03eaf | ||
geo cee17208dba98f5f3ddaf78d0bfff9c083557ba3 | ||
miniz 1edbdece9d71dc65c6ff405572ee37cbdcef7af4 | ||
libressl 24acd9e710fbe842e863572da9d738715fbc74b8 | ||
curl 3358dac21192864ef2ba47c88704d3b8d8203804 | ||
curl 39c8a51e8ee0ab7ea712886df79c068405a2e008 | ||
json 410c74782230daaa15054d6ee0975c0607091cb3 | ||
opentelemetry-proto 1624689398a3226c45994d70cb544a1e781dc032 | ||
abseil-cpp ba5240842d352b4b67a32092453a2fe5fe53a62e | ||
protobuf d8136b9c6a62db6ce09900ecdeb82bb793096cbd | ||
opentelemetry-cpp ec4aef6b17b697052edef5417825ad71947b2ed1 | ||
protobuf df2dd518c68b882c9dce5346393f8c388108e733 | ||
opentelemetry-cpp 60770dc9dc63e3543fc87d605b2e88fd53d7a414 | ||
pugixml 60175e80e2f5e97e027ac78f7e14c5acc009ce50 | ||
unordered_dense 77e91016354e6d8cba24a86c5abb807de2534c02 | ||
wyhash 1e012b57fc2227a9e583a57e2eacb3da99816d99 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,20 @@ | ||
#pragma once | ||
|
||
#include "nigiri/loader/gtfs/shape.h" | ||
#include "nigiri/loader/gtfs/trip.h" | ||
#include "nigiri/types.h" | ||
|
||
namespace nigiri { | ||
struct shape_loader_state; | ||
struct shapes_storage; | ||
struct timetable; | ||
} // namespace nigiri | ||
|
||
namespace nigiri::loader::gtfs { | ||
|
||
void calculate_shape_offsets(timetable const&, | ||
shapes_storage&, | ||
vector_map<gtfs_trip_idx_t, trip> const&, | ||
shape_loader_state const&); | ||
void calculate_shape_offsets_and_bboxes( | ||
timetable const&, | ||
shapes_storage&, | ||
shape_loader_state const&, | ||
vector_map<gtfs_trip_idx_t, trip> const&); | ||
|
||
} // namespace nigiri::loader::gtfs |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.