Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

use homegrown filesystem instead of boost #1466

Merged
merged 4 commits into from Aug 10, 2018
Merged

Conversation

kevinkreiser
Copy link
Member

The point of this was to mock the part of the boost::filesystem that we used in the routing part of the library. this was mostly in baldr/graphreader and skadi/sample. we could go a little further on this can completely replace it even in mjolnir but i think this is enough for now.

@kevinkreiser
Copy link
Member Author

@mloskot would you mind having a quick look at this on windows? i tried out the filesystem header with a test program on widnows myself using minGW but id love to know if this breaks your build.

@mloskot
Copy link
Collaborator

mloskot commented Aug 10, 2018

@kevinkreiser I've quickly tried to build Valhalla with the new CMake to check this, but I've hit some CMake issues on Windows+VS2017 (eg. Protobuf is not being detected for me).
I am going to continue to get this solved next week at latest.

Meanwhile, if you prefer to merge sooner, do as you prefer and I will do the tests on Windows and report any issues post-factum :-)

@kevinkreiser
Copy link
Member Author

@mloskot thank you so much!! i'll merge this and we'll await your findings! i got vs2017 setup on a win10 vm but the learning curve for getting the paths and depedencies setup was more than i could commit to time-wise :(

@kevinkreiser kevinkreiser merged commit 87159e1 into master Aug 10, 2018
mloskot added a commit to mloskot/valhalla that referenced this pull request Nov 5, 2018
Use _mkdir from UCRT subset of POSIX compatibility routines.
Add internal truncate implemented in terms of UCRT _chsize
as equivalent of POSIX function.

Follows valhalla#1466
kevinkreiser pushed a commit that referenced this pull request Nov 6, 2018
Use _mkdir from UCRT subset of POSIX compatibility routines.
Add internal truncate implemented in terms of UCRT _chsize
as equivalent of POSIX function.

Follows #1466
gknisely added a commit that referenced this pull request Nov 6, 2018
* add resize_file and create_directories (#1591)

* add resize_file and create_directories

* Remove log bd (#1609)

* Change LOG_INFO to LOG_DEBUG for path cost and iteration count. Inadvertently
was changed on earlier commit/merge.

* Fix formatting

* hardening for file name to graphid (#1612)

* A timed-turned restriction should not be applied when a non-timed route is executed. (#1615)

* If a user runs a non-time dependent route, then time-dep restrictions should not be enforced.

* added more test cases.

* format

* updated.

* updated to use new trans logic.

* Adjusted dest point of one test

* Add CMakeSettings.json with reasonable defaults [ci skip] (#1606)

CMakeSettings.json is convenient to control build configuration
when using CMake integration with Visual Studio 2017.
Usage:
 - Copy cmake/CMakeSettings.json to top-level directory of
   Valhalla source tree
 - In VS2017 > File > Open > CMake > select top-level CMakeLists.txt
 - Edit CMakeSettings.json, flip options, add options for dependencies, etc.

Ignore user-speciifc local directory managed by CLion IDE.

* Fix float to odin::DirectionsOptions::DateTimeType enum conversion (#1627)

MSVC 19.15 issues error C2440: static_cast: cannot convert from T to DateTimeType
due to conversions between enumeration and floating point values are no
longer allowed.

Fixes #1626

* updated to use transition_count and NodeTransition stuct.  Also, fixed a bug where we walked the wrong way along a way but it never his the short circuit code to try the other direction.

* Update filesystem.h to support compilation with MSVC (#1629)

Use _mkdir from UCRT subset of POSIX compatibility routines.
Add internal truncate implemented in terms of UCRT _chsize
as equivalent of POSIX function.

Follows #1466

* Fix warnings about redefinition of MSVC macros defined in sequence.h (#1628)

The macros are also controlled by CMake configuration, so perhaps they
can be removed completely.
dnesbitt61 added a commit that referenced this pull request Nov 12, 2018
* add resize_file and create_directories (#1591)

* add resize_file and create_directories

* Remove log bd (#1609)

* Change LOG_INFO to LOG_DEBUG for path cost and iteration count. Inadvertently
was changed on earlier commit/merge.

* Fix formatting

* hardening for file name to graphid (#1612)

* A timed-turned restriction should not be applied when a non-timed route is executed. (#1615)

* If a user runs a non-time dependent route, then time-dep restrictions should not be enforced.

* added more test cases.

* format

* updated.

* Adjusted dest point of one test

* Add CMakeSettings.json with reasonable defaults [ci skip] (#1606)

CMakeSettings.json is convenient to control build configuration
when using CMake integration with Visual Studio 2017.
Usage:
 - Copy cmake/CMakeSettings.json to top-level directory of
   Valhalla source tree
 - In VS2017 > File > Open > CMake > select top-level CMakeLists.txt
 - Edit CMakeSettings.json, flip options, add options for dependencies, etc.

Ignore user-speciifc local directory managed by CLion IDE.

* Fix float to odin::DirectionsOptions::DateTimeType enum conversion (#1627)

MSVC 19.15 issues error C2440: static_cast: cannot convert from T to DateTimeType
due to conversions between enumeration and floating point values are no
longer allowed.

Fixes #1626

* Update filesystem.h to support compilation with MSVC (#1629)

Use _mkdir from UCRT subset of POSIX compatibility routines.
Add internal truncate implemented in terms of UCRT _chsize
as equivalent of POSIX function.

Follows #1466

* Fix warnings about redefinition of MSVC macros defined in sequence.h (#1628)

The macros are also controlled by CMake configuration, so perhaps they
can be removed completely.

* Fix transition penalties for bicycle costing. Missed adding penalty when ported to return a Cost structure. (#1636)

* Fix comment

* Add GraphFilter and config options to filter/remove edges for specific access modes. This
is a new stage of the Valhalla tile generation process. It occurs after GraphEnhancer.
This should allow the long running stages (parsing, tile building, enhancement) to be done
once and the cut different tile versions with different filtering, hierarchy generation,
presence of transit and traffic.

* Check that node has transitions before getting the first transition node from the tile.

* Update log messages in GraphFilter.
dgearhart pushed a commit that referenced this pull request Nov 21, 2018
* Remove transition edges from SIF edge filters

* Remove transition edges from directed edge and Use

* Remove transition edges from apps and tests

* Add transition count and index to NodeInfo. Rearrange struct for future split into routing
needs vs. guidance needs.

* Tile building changes to add node transitions and remove directed edge transitions

* Algorithm changes to use NodeTransition rather than directed edge transitions

* Add method to get tiling system given a hierarchy level.

* Add the tile's base lat,lon (SW corner) to the graph tile header.

* Add convenience method to get a node's lat,lon given the node Id. Added this to GraphTile
since the node LL now needs the tile base LL.

* Update the node lat,lon methods to either pass in the tile base LL or use the
new GraphTile get_node_ll method.

* Use offsets from the base lat,lon of hte tile to store node lat,lon. This can
save some bits and also should pave the way for extended precision.

* Add methods to store node lat,lon as offsets from tile base.

* Update nodeinfo tests

* Use tile_id rather than ID (fixes bug with LatLng on newly created hierarchies).

* Add base LL to transit tiles in valhalla_build_transit.

* Fix some tests.

* Update some comments and note how to support 7 digit precision

* Remove using midgard namespace within .h file.

* Fix a couple of tests. Do not use midgard namespace within nodeinfo.h

* Test fixes continue...

* Fix node search

* NodeInfo size increased to 40 bytes in this first iteration

* Remove traffic matcher test

* Reduce IntersectionType to 4 bits.

* Add missing NodeTransition files

* Regnerate the test tile for astar

* Fix UpdatePredictedSpeeds - needed to copy from the transitions (structure inserted after
the directed edges).

* Fix isochrone to expand from end of node transition.

* Make sure we use the transition endnode not the directededge endnode

* Make sure the transition endnode is used (was using de->endnode)

* Update depth_first in loki search to use node transitions.

* Remove osmlr (#1599)

* Remove OSMLR from proto CMakeLists

* Remove traffic segment matcher from Python bindings

* Comment out use of transition edges in multimodal

* Order node transition by hierarchy.

* Name consistency (#1610)

* Move name consistency from NodeInfo to DirectedEdge (name consistency with up to
8 local edges at the start node).

* Update to set name consistency on the directed edge.

* Change costing use of name consistency (now on the directed edge)

* Update intersecting edge name consistency logic (now gets name consistency from
the directed edge).

* add resize_file and create_directories (#1591)

* add resize_file and create_directories

* Merge from master.

* Remove unused code.

* Fix depth_first - store the start_tile since it can be changed in the initial loop. When
iterating transitions use that start tile to get the set of transition edges.

* De changes (#1624)

* Move drive_on_right flag from DirectedEdge to NodeInfo (all outbound edges have the
same drive on right flag).

* Remove unreachable flag (not used - reachability is computed in loki at runtime based
on the mode of travel/costing).

* Comment to make known there is a spare access bit

* Add spare access bit (or comment that 1 is available).

* Re-order bits - make room for 10 consecutive bits so we can move max slopes from Edge Elevation.

* Remove EdgeElevation - move max upward and downward slopes to DirectedEdge. TODO-
move mean elevation to EdgeInfo

* Remove EdgeElevation. max slopes was added to DirectedEdge, mean elevation added to
EdgeInfo (using bits from wayid).

* Remove edge_elevation.h

* V3 restriction updates (#1633)

* add resize_file and create_directories (#1591)

* add resize_file and create_directories

* Remove log bd (#1609)

* Change LOG_INFO to LOG_DEBUG for path cost and iteration count. Inadvertently
was changed on earlier commit/merge.

* Fix formatting

* hardening for file name to graphid (#1612)

* A timed-turned restriction should not be applied when a non-timed route is executed. (#1615)

* If a user runs a non-time dependent route, then time-dep restrictions should not be enforced.

* added more test cases.

* format

* updated.

* updated to use new trans logic.

* Adjusted dest point of one test

* Add CMakeSettings.json with reasonable defaults [ci skip] (#1606)

CMakeSettings.json is convenient to control build configuration
when using CMake integration with Visual Studio 2017.
Usage:
 - Copy cmake/CMakeSettings.json to top-level directory of
   Valhalla source tree
 - In VS2017 > File > Open > CMake > select top-level CMakeLists.txt
 - Edit CMakeSettings.json, flip options, add options for dependencies, etc.

Ignore user-speciifc local directory managed by CLion IDE.

* Fix float to odin::DirectionsOptions::DateTimeType enum conversion (#1627)

MSVC 19.15 issues error C2440: static_cast: cannot convert from T to DateTimeType
due to conversions between enumeration and floating point values are no
longer allowed.

Fixes #1626

* updated to use transition_count and NodeTransition stuct.  Also, fixed a bug where we walked the wrong way along a way but it never his the short circuit code to try the other direction.

* Update filesystem.h to support compilation with MSVC (#1629)

Use _mkdir from UCRT subset of POSIX compatibility routines.
Add internal truncate implemented in terms of UCRT _chsize
as equivalent of POSIX function.

Follows #1466

* Fix warnings about redefinition of MSVC macros defined in sequence.h (#1628)

The macros are also controlled by CMake configuration, so perhaps they
can be removed completely.

* Turnlanes (#1634)

* Add stub for a DirectedEdgeExt - extended directed edge attributes.

* Use bit fields for some counts - check limits. For example, nodecount cannot be more than
kMaxGraphId, so use only 21 bits for this field and check for exceeding the limit.

* Update GraphTileHeader tests and no_bin graph tiles

* Reorder some fields in the GraphTiles. Move turnlanes to be after signs (they are both fixed size
structures and both are indexed by edgeId). Add some support for extended directed edge attributes.
This would be 1:1 structures with DirectedEdge and would allow extra, custom attributes.

* Check has_elevation in trip path builder. Edge elevation flags are not longer
needed in hierarchy builder.

* Move turnlanes. Trim graph tile header by using some bit fields. Make bike_network
a flag in directed edge, and a bit mask in EdgeInfo.

* Use simpler way to get node lat,lon in map matching. Update frontage road
top-k test to allow the 3 edge case with transition onto secondary road.

* Update to reachability with node transitions. Comment out the predictive traffic from the Utrecht data.

* Use version of StopExpanding that takes distance from destination when checking node transitions

* Move speed limit from DirectedEdge to EdgeInfo. Make wayid 32 bits (throw an exception (#1637)

if any are found greater than that - but there should be plenty of rrom for growth).

* Mode filters (#1642)

* add resize_file and create_directories (#1591)

* add resize_file and create_directories

* Remove log bd (#1609)

* Change LOG_INFO to LOG_DEBUG for path cost and iteration count. Inadvertently
was changed on earlier commit/merge.

* Fix formatting

* hardening for file name to graphid (#1612)

* A timed-turned restriction should not be applied when a non-timed route is executed. (#1615)

* If a user runs a non-time dependent route, then time-dep restrictions should not be enforced.

* added more test cases.

* format

* updated.

* Adjusted dest point of one test

* Add CMakeSettings.json with reasonable defaults [ci skip] (#1606)

CMakeSettings.json is convenient to control build configuration
when using CMake integration with Visual Studio 2017.
Usage:
 - Copy cmake/CMakeSettings.json to top-level directory of
   Valhalla source tree
 - In VS2017 > File > Open > CMake > select top-level CMakeLists.txt
 - Edit CMakeSettings.json, flip options, add options for dependencies, etc.

Ignore user-speciifc local directory managed by CLion IDE.

* Fix float to odin::DirectionsOptions::DateTimeType enum conversion (#1627)

MSVC 19.15 issues error C2440: static_cast: cannot convert from T to DateTimeType
due to conversions between enumeration and floating point values are no
longer allowed.

Fixes #1626

* Update filesystem.h to support compilation with MSVC (#1629)

Use _mkdir from UCRT subset of POSIX compatibility routines.
Add internal truncate implemented in terms of UCRT _chsize
as equivalent of POSIX function.

Follows #1466

* Fix warnings about redefinition of MSVC macros defined in sequence.h (#1628)

The macros are also controlled by CMake configuration, so perhaps they
can be removed completely.

* Fix transition penalties for bicycle costing. Missed adding penalty when ported to return a Cost structure. (#1636)

* Fix comment

* Add GraphFilter and config options to filter/remove edges for specific access modes. This
is a new stage of the Valhalla tile generation process. It occurs after GraphEnhancer.
This should allow the long running stages (parsing, tile building, enhancement) to be done
once and the cut different tile versions with different filtering, hierarchy generation,
presence of transit and traffic.

* Check that node has transitions before getting the first transition node from the tile.

* Update log messages in GraphFilter.

* Do not count any aggregation that will remove a simple loop.

* Make sure wayId does not exceed 32 bits when parsing PBF. Change wayId to 32 (#1647)

bits internally.

* Update tiles for node binding tests

* V3 remove endmap (#1650)

* removed the osm_data.end_map and moved the end restrictions into a squence.

* updated tests to use new to and from complex files.

* format.

* format.

* Fix trace debug method

* updated wayids to be uint32_t instead of uint64_t in order to reduce the sequence file size. (#1655)

* Add a tagged flag to EdgeInfo and Sign to support future "tagged" or … (#1656)

* Add a tagged flag to EdgeInfo and Sign to support future "tagged" or special text information
(such as different languages)

* Fix formatting

* V3 comments to change log.

* Update README to note that V3.0 is incompatible with 2.x.

* Add back the actor test

* Update version

* Added more roundabout test cases for auto and bicycle

* Fixed the transition intersecting edge assignment for bike/walk
@kevinkreiser kevinkreiser deleted the kk_lesserdeps branch January 11, 2019 15:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants