├── .babelrc ├── .clang-format ├── .clang-tidy ├── .cncc.style ├── .dockerignore ├── .editorconfig ├── .gitattributes ├── .github ├── ISSUE_TEMPLATE │ ├── bug_report.md │ └── feature.md ├── PULL_REQUEST_TEMPLATE.md └── workflows │ ├── osrm-backend-docker.yml │ ├── osrm-backend.yml │ └── stale.yml ├── .gitignore ├── .gitmodules ├── .npmignore ├── CHANGELOG.md ├── CMakeLists.txt ├── CODE-OF-CONDUCT.md ├── CONTRIBUTING.md ├── Doxyfile.in ├── LICENSE.TXT ├── README.md ├── cmake ├── CPackConfig.cmake ├── FindDebArch.cmake ├── FindLua.cmake ├── FindTBB.cmake ├── JSONParser.cmake ├── cmake_options_script.py ├── cmake_uninstall.cmake.in ├── pkgconfig.in └── warnings.cmake ├── conanfile.py ├── cucumber.js ├── data ├── driving_side.geojson └── maxheight.geojson ├── docker ├── Dockerfile ├── Dockerfile-alpine ├── Dockerfile-debian └── hooks │ └── build ├── docs ├── developing.md ├── http.md ├── images │ └── example-tile-response.png ├── nodejs │ └── api.md ├── profiles.md ├── releasing.md ├── routed.md ├── src │ ├── content.js │ ├── index.html │ └── index.js ├── testing.md └── windows-deps.md ├── eslint.config.js ├── example ├── CMakeLists.txt └── example.js ├── features ├── bicycle │ ├── access.feature │ ├── access_node.feature │ ├── alley.feature │ ├── area.feature │ ├── barrier.feature │ ├── bridge.feature │ ├── classes.feature │ ├── cycleway.feature │ ├── destination.feature │ ├── distance.feature │ ├── exclude.feature │ ├── ferry.feature │ ├── maxspeed.feature │ ├── mode.feature │ ├── names.feature │ ├── oneway.feature │ ├── pushing.feature │ ├── restrictions.feature │ ├── safety.feature │ ├── startpoint.feature │ ├── stop_area.feature │ ├── surface.feature │ ├── train.feature │ ├── turn_penalty.feature │ └── way.feature ├── car │ ├── access.feature │ ├── advisory.feature │ ├── avoid.feature │ ├── barrier.feature │ ├── bridge.feature │ ├── classes.feature │ ├── conditional_restrictions.feature │ ├── construction.feature │ ├── destination.feature │ ├── ferry.feature │ ├── hov.feature │ ├── link.feature │ ├── maxspeed.feature │ ├── multi_via_restrictions.feature │ ├── names.feature │ ├── obstacle_penalties.feature │ ├── oneway.feature │ ├── physical_limitation.feature │ ├── restrictions.feature │ ├── route_relations.feature │ ├── service.feature │ ├── shuttle_train.feature │ ├── side_bias.feature │ ├── speed.feature │ ├── startpoint.feature │ ├── summaries.feature │ ├── surface.feature │ ├── traffic_light_penalties.feature │ ├── traffic_turn_penalties.feature │ ├── turning_loop.feature │ ├── via.feature │ ├── way.feature │ └── weight.feature ├── foot │ ├── access.feature │ ├── access_node.feature │ ├── area.feature │ ├── barrier.feature │ ├── distance.feature │ ├── ferry.feature │ ├── intersection.feature │ ├── maxspeed.feature │ ├── names.feature │ ├── oneway.feature │ ├── restrictions.feature │ ├── roundabout.feature │ ├── startpoint.feature │ ├── surface.feature │ └── way.feature ├── guidance │ ├── advanced-lanes.feature │ ├── anticipate-lanes.feature │ ├── bicycle-sliproads.feature │ ├── bike-staggered-intersections.feature │ ├── bridges_and_tunnels.feature │ ├── bugs.feature │ ├── circular.feature │ ├── collapse-detail.feature │ ├── collapse-ferry.feature │ ├── collapse.feature │ ├── continue.feature │ ├── dedicated-turn-roads.feature │ ├── destination-signs.feature │ ├── directional-destination-signs.feature │ ├── directional-ref-destination-signs.feature │ ├── divided-highways.feature │ ├── driveway.feature │ ├── end-of-road.feature │ ├── exit-numbers-names.feature │ ├── fork.feature │ ├── internal-intersections.feature │ ├── intersections.feature │ ├── low-priority.feature │ ├── maneuver-tag.feature │ ├── merge-segregated-roads.feature │ ├── merge.feature │ ├── motorway.feature │ ├── new-name.feature │ ├── notification.feature │ ├── obvious-turn-discovery.feature │ ├── perception.feature │ ├── post-processing.feature │ ├── ramp.feature │ ├── rotary.feature │ ├── roundabout-bike.feature │ ├── roundabout-left-sided.feature │ ├── roundabout-turn-bike.feature │ ├── roundabout-turn.feature │ ├── roundabout.feature │ ├── staggered-intersections.feature │ ├── suffix-changes.feature │ ├── suppressed.feature │ ├── trimming.feature │ ├── turn-angles.feature │ ├── turn-lanes.feature │ ├── turn-location.feature │ └── turn.feature ├── lib │ ├── hash.js │ ├── osm.js │ ├── osrm_loader.js │ ├── table_diff.js │ ├── try_connect.js │ └── utils.js ├── nearest │ ├── pick.feature │ └── projection.feature ├── options │ ├── contract │ │ ├── edge-weight-updates-over-factor.feature │ │ ├── files.feature │ │ └── version.feature │ ├── customize │ │ ├── files.feature │ │ ├── invalid.feature │ │ └── version.feature │ ├── data │ │ └── disabled_dataset.feature │ ├── datastore │ │ └── datastore.feature │ ├── extract │ │ ├── files.feature │ │ ├── invalid.feature │ │ ├── lua.feature │ │ ├── turn_function.feature │ │ ├── verbosity.feature │ │ └── version.feature │ ├── partition │ │ ├── files.feature │ │ ├── invalid.feature │ │ └── version.feature │ ├── profiles │ │ ├── invalid_version.feature │ │ ├── version0.feature │ │ ├── version1.feature │ │ ├── version2.feature │ │ └── version3.feature │ └── routed │ │ ├── files.feature │ │ ├── invalid.feature │ │ └── version.feature ├── raster │ ├── extract.feature │ └── weights.feature ├── step_definitions │ ├── data.js │ ├── distance_matrix.js │ ├── matching.js │ ├── nearest.js │ ├── options.js │ ├── requests.js │ ├── routability.js │ ├── routing.js │ ├── timestamp.js │ └── trip.js ├── stress │ ├── large_request.feature │ └── launch.feature ├── support │ ├── cache.js │ ├── data.js │ ├── data_classes.js │ ├── env.js │ ├── fbresult_generated.js │ ├── flatbuffers.js │ ├── fuzzy.js │ ├── hooks.js │ ├── http.js │ ├── route.js │ ├── run.js │ └── shared_steps.js └── testbot │ ├── 64bit.feature │ ├── alternative.feature │ ├── alternative_loop.feature │ ├── annotations.feature │ ├── approaches.feature │ ├── bad.feature │ ├── basic.feature │ ├── bearing.feature │ ├── bearing_param.feature │ ├── compression.feature │ ├── continue_straight.feature │ ├── distance.feature │ ├── distance_matrix.feature │ ├── duration.feature │ ├── duration_matrix.feature │ ├── example.feature │ ├── exclude.feature │ ├── exclude_regressions.feature │ ├── fastest.feature │ ├── ferry.feature │ ├── fixed.feature │ ├── force_step.feature │ ├── geometry.feature │ ├── graph.feature │ ├── impedance.feature │ ├── load.feature │ ├── loop.feature │ ├── matching.feature │ ├── maxspeed.feature │ ├── mode.feature │ ├── multi_level_routing.feature │ ├── nil.feature │ ├── oneway.feature │ ├── oneway_phantom.feature │ ├── opposite.feature │ ├── origin.feature │ ├── overlap.feature │ ├── penalty.feature │ ├── planetary.feature │ ├── projection.feature │ ├── routes.feature │ ├── snap.feature │ ├── snap_intersection.feature │ ├── speed.feature │ ├── status.feature │ ├── summary.feature │ ├── time.feature │ ├── traffic_speeds.feature │ ├── traffic_speeds_overflow.feature │ ├── traffic_turn_penalties.feature │ ├── trip.feature │ ├── turn_penalty.feature │ ├── utf.feature │ ├── via.feature │ ├── weight.feature │ └── zero-speed-updates.feature ├── fuzz ├── CMakeLists.txt ├── escape_json.cc ├── match_parameters.cc ├── nearest_parameters.cc ├── request_parser.cc ├── route_parameters.cc ├── table_parameters.cc ├── tile_parameters.cc ├── trip_parameters.cc ├── uri_decode.cc ├── url_parser.cc └── util.hpp ├── generated └── include │ └── engine │ └── api │ └── flatbuffers │ ├── fbresult_generated.h │ ├── position_generated.h │ ├── route_generated.h │ ├── table_generated.h │ └── waypoint_generated.h ├── include ├── contractor │ ├── contract_excludable_graph.hpp │ ├── contracted_edge_container.hpp │ ├── contracted_metric.hpp │ ├── contractor.hpp │ ├── contractor_config.hpp │ ├── contractor_graph.hpp │ ├── contractor_heap.hpp │ ├── contractor_search.hpp │ ├── files.hpp │ ├── graph_contractor.hpp │ ├── graph_contractor_adaptors.hpp │ ├── query_edge.hpp │ ├── query_graph.hpp │ └── serialization.hpp ├── customizer │ ├── cell_customizer.hpp │ ├── cell_metric.hpp │ ├── customizer.hpp │ ├── customizer_config.hpp │ ├── edge_based_graph.hpp │ ├── files.hpp │ └── serialization.hpp ├── engine │ ├── algorithm.hpp │ ├── api │ │ ├── base_api.hpp │ │ ├── base_parameters.hpp │ │ ├── base_result.hpp │ │ ├── flatbuffers │ │ │ ├── fbresult.fbs │ │ │ ├── position.fbs │ │ │ ├── route.fbs │ │ │ ├── table.fbs │ │ │ └── waypoint.fbs │ │ ├── json_factory.hpp │ │ ├── match_api.hpp │ │ ├── match_parameters.hpp │ │ ├── match_parameters_tidy.hpp │ │ ├── nearest_api.hpp │ │ ├── nearest_parameters.hpp │ │ ├── route_api.hpp │ │ ├── route_parameters.hpp │ │ ├── table_api.hpp │ │ ├── table_parameters.hpp │ │ ├── tile_parameters.hpp │ │ ├── trip_api.hpp │ │ └── trip_parameters.hpp │ ├── approach.hpp │ ├── base64.hpp │ ├── bearing.hpp │ ├── data_watchdog.hpp │ ├── datafacade.hpp │ ├── datafacade │ │ ├── algorithm_datafacade.hpp │ │ ├── contiguous_block_allocator.hpp │ │ ├── contiguous_internalmem_datafacade.hpp │ │ ├── datafacade_base.hpp │ │ ├── mmap_memory_allocator.hpp │ │ ├── process_memory_allocator.hpp │ │ └── shared_memory_allocator.hpp │ ├── datafacade_factory.hpp │ ├── datafacade_provider.hpp │ ├── douglas_peucker.hpp │ ├── engine.hpp │ ├── engine_config.hpp │ ├── geospatial_query.hpp │ ├── guidance │ │ ├── assemble_geometry.hpp │ │ ├── assemble_leg.hpp │ │ ├── assemble_overview.hpp │ │ ├── assemble_route.hpp │ │ ├── assemble_steps.hpp │ │ ├── collapse_scenario_detection.hpp │ │ ├── collapse_turns.hpp │ │ ├── collapsing_utility.hpp │ │ ├── lane_processing.hpp │ │ ├── leg_geometry.hpp │ │ ├── post_processing.hpp │ │ ├── postprocessing_toolkit.hpp │ │ ├── route.hpp │ │ ├── route_leg.hpp │ │ ├── route_step.hpp │ │ ├── step_maneuver.hpp │ │ └── verbosity_reduction.hpp │ ├── hint.hpp │ ├── internal_route_result.hpp │ ├── map_matching │ │ ├── bayes_classifier.hpp │ │ ├── hidden_markov_model.hpp │ │ ├── matching_confidence.hpp │ │ └── sub_matching.hpp │ ├── phantom_node.hpp │ ├── plugins │ │ ├── match.hpp │ │ ├── nearest.hpp │ │ ├── plugin_base.hpp │ │ ├── table.hpp │ │ ├── tile.hpp │ │ ├── trip.hpp │ │ └── viaroute.hpp │ ├── polyline_compressor.hpp │ ├── routing_algorithms.hpp │ ├── routing_algorithms │ │ ├── alternative_path.hpp │ │ ├── direct_shortest_path.hpp │ │ ├── many_to_many.hpp │ │ ├── map_matching.hpp │ │ ├── routing_base.hpp │ │ ├── routing_base_ch.hpp │ │ ├── routing_base_mld.hpp │ │ ├── shortest_path.hpp │ │ ├── shortest_path_impl.hpp │ │ └── tile_turns.hpp │ ├── search_engine_data.hpp │ ├── status.hpp │ └── trip │ │ ├── trip_brute_force.hpp │ │ ├── trip_farthest_insertion.hpp │ │ └── trip_nearest_neighbour.hpp ├── extractor │ ├── class_data.hpp │ ├── compressed_edge_container.hpp │ ├── compressed_node_based_graph_edge.hpp │ ├── conditional_turn_penalty.hpp │ ├── datasources.hpp │ ├── edge_based_edge.hpp │ ├── edge_based_graph_factory.hpp │ ├── edge_based_node.hpp │ ├── edge_based_node_segment.hpp │ ├── extraction_containers.hpp │ ├── extraction_helper_functions.hpp │ ├── extraction_node.hpp │ ├── extraction_relation.hpp │ ├── extraction_segment.hpp │ ├── extraction_turn.hpp │ ├── extraction_way.hpp │ ├── extractor.hpp │ ├── extractor_callbacks.hpp │ ├── extractor_config.hpp │ ├── files.hpp │ ├── graph_compressor.hpp │ ├── internal_extractor_edge.hpp │ ├── intersection │ │ ├── constants.hpp │ │ ├── coordinate_extractor.hpp │ │ ├── have_identical_names.hpp │ │ ├── intersection_analysis.hpp │ │ ├── intersection_edge.hpp │ │ ├── intersection_view.hpp │ │ ├── mergable_road_detector.hpp │ │ └── node_based_graph_walker.hpp │ ├── intersection_bearings_container.hpp │ ├── location_dependent_data.hpp │ ├── maneuver_override.hpp │ ├── maneuver_override_relation_parser.hpp │ ├── name_table.hpp │ ├── nbg_to_ebg.hpp │ ├── node_based_edge.hpp │ ├── node_based_graph_factory.hpp │ ├── node_data_container.hpp │ ├── node_restriction_map.hpp │ ├── nodes_of_way.hpp │ ├── obstacles.hpp │ ├── packed_osm_ids.hpp │ ├── profile_properties.hpp │ ├── query_node.hpp │ ├── raster_source.hpp │ ├── restriction.hpp │ ├── restriction_graph.hpp │ ├── restriction_parser.hpp │ ├── road_classification.hpp │ ├── scripting_environment.hpp │ ├── scripting_environment_lua.hpp │ ├── segment_data_container.hpp │ ├── serialization.hpp │ ├── suffix_table.hpp │ ├── travel_mode.hpp │ ├── turn_lane_types.hpp │ ├── turn_path.hpp │ ├── turn_path_compressor.hpp │ ├── turn_path_filter.hpp │ └── way_restriction_map.hpp ├── guidance │ ├── constants.hpp │ ├── driveway_handler.hpp │ ├── files.hpp │ ├── guidance_processing.hpp │ ├── intersection.hpp │ ├── intersection_handler.hpp │ ├── is_through_street.hpp │ ├── motorway_handler.hpp │ ├── parsing_toolkit.hpp │ ├── roundabout_handler.hpp │ ├── roundabout_type.hpp │ ├── segregated_intersection_classification.hpp │ ├── serialization.hpp │ ├── sliproad_handler.hpp │ ├── statistics_handler.hpp │ ├── suppress_mode_handler.hpp │ ├── turn_analysis.hpp │ ├── turn_bearing.hpp │ ├── turn_classification.hpp │ ├── turn_data_container.hpp │ ├── turn_discovery.hpp │ ├── turn_handler.hpp │ ├── turn_instruction.hpp │ ├── turn_lane_augmentation.hpp │ ├── turn_lane_data.hpp │ ├── turn_lane_handler.hpp │ └── turn_lane_matcher.hpp ├── nodejs │ ├── json_v8_renderer.hpp │ ├── node_osrm.hpp │ └── node_osrm_support.hpp ├── osrm │ ├── approach.hpp │ ├── bearing.hpp │ ├── contractor.hpp │ ├── contractor_config.hpp │ ├── coordinate.hpp │ ├── customizer.hpp │ ├── customizer_config.hpp │ ├── datasets.hpp │ ├── engine_config.hpp │ ├── error_codes.hpp │ ├── exception.hpp │ ├── extractor.hpp │ ├── extractor_config.hpp │ ├── json_container.hpp │ ├── match_parameters.hpp │ ├── nearest_parameters.hpp │ ├── osrm.hpp │ ├── osrm_fwd.hpp │ ├── partitioner.hpp │ ├── partitioner_config.hpp │ ├── route_parameters.hpp │ ├── status.hpp │ ├── storage_config.hpp │ ├── table_parameters.hpp │ ├── tile_parameters.hpp │ └── trip_parameters.hpp ├── partitioner │ ├── bisection_graph.hpp │ ├── bisection_graph_view.hpp │ ├── bisection_to_partition.hpp │ ├── cell_statistics.hpp │ ├── cell_storage.hpp │ ├── dinic_max_flow.hpp │ ├── edge_based_graph.hpp │ ├── edge_based_graph_reader.hpp │ ├── files.hpp │ ├── inertial_flow.hpp │ ├── multi_level_graph.hpp │ ├── multi_level_partition.hpp │ ├── partition_graph.hpp │ ├── partitioner.hpp │ ├── partitioner_config.hpp │ ├── recursive_bisection.hpp │ ├── recursive_bisection_state.hpp │ ├── remove_unconnected.hpp │ ├── renumber.hpp │ ├── reorder_first_last.hpp │ ├── serialization.hpp │ └── tarjan_graph_wrapper.hpp ├── server │ ├── api │ │ ├── base_parameters_grammar.hpp │ │ ├── match_parameter_grammar.hpp │ │ ├── nearest_parameter_grammar.hpp │ │ ├── parameters_parser.hpp │ │ ├── parsed_url.hpp │ │ ├── route_parameters_grammar.hpp │ │ ├── table_parameter_grammar.hpp │ │ ├── tile_parameter_grammar.hpp │ │ ├── trip_parameter_grammar.hpp │ │ └── url_parser.hpp │ ├── connection.hpp │ ├── http │ │ ├── compression_type.hpp │ │ ├── header.hpp │ │ ├── reply.hpp │ │ └── request.hpp │ ├── request_handler.hpp │ ├── request_parser.hpp │ ├── server.hpp │ ├── service │ │ ├── base_service.hpp │ │ ├── match_service.hpp │ │ ├── nearest_service.hpp │ │ ├── route_service.hpp │ │ ├── table_service.hpp │ │ ├── tile_service.hpp │ │ ├── trip_service.hpp │ │ └── utils.hpp │ └── service_handler.hpp ├── storage │ ├── block.hpp │ ├── io.hpp │ ├── io_config.hpp │ ├── io_fwd.hpp │ ├── serialization.hpp │ ├── shared_data_index.hpp │ ├── shared_datatype.hpp │ ├── shared_memory.hpp │ ├── shared_memory_ownership.hpp │ ├── shared_monitor.hpp │ ├── storage.hpp │ ├── storage_config.hpp │ ├── tar.hpp │ ├── tar_fwd.hpp │ └── view_factory.hpp ├── updater │ ├── csv_file_parser.hpp │ ├── csv_source.hpp │ ├── source.hpp │ ├── updater.hpp │ └── updater_config.hpp └── util │ ├── alias.hpp │ ├── assert.hpp │ ├── bearing.hpp │ ├── binary_heap.hpp │ ├── bit_range.hpp │ ├── cheap_ruler.hpp │ ├── concurrent_id_map.hpp │ ├── conditional_restrictions.hpp │ ├── connectivity_checksum.hpp │ ├── coordinate.hpp │ ├── coordinate_calculation.hpp │ ├── d_ary_heap.hpp │ ├── deallocating_vector.hpp │ ├── debug.hpp │ ├── dist_table_wrapper.hpp │ ├── dynamic_graph.hpp │ ├── exception.hpp │ ├── exception_utils.hpp │ ├── exclude_flag.hpp │ ├── filtered_graph.hpp │ ├── filtered_integer_range.hpp │ ├── fingerprint.hpp │ ├── for_each_indexed.hpp │ ├── for_each_pair.hpp │ ├── for_each_range.hpp │ ├── geojson_debug_logger.hpp │ ├── geojson_debug_policies.hpp │ ├── geojson_debug_policy_toolkit.hpp │ ├── geojson_validation.hpp │ ├── graph_traits.hpp │ ├── graph_utils.hpp │ ├── group_by.hpp │ ├── guidance │ ├── bearing_class.hpp │ ├── entry_class.hpp │ ├── name_announcements.hpp │ └── turn_lanes.hpp │ ├── hilbert_value.hpp │ ├── indexed_data.hpp │ ├── integer_range.hpp │ ├── isatty.hpp │ ├── json_container.hpp │ ├── json_deep_compare.hpp │ ├── json_renderer.hpp │ ├── json_util.hpp │ ├── log.hpp │ ├── lua_util.hpp │ ├── meminfo.hpp │ ├── mmap_file.hpp │ ├── mmap_tar.hpp │ ├── msb.hpp │ ├── node_based_graph.hpp │ ├── opening_hours.hpp │ ├── packed_vector.hpp │ ├── percent.hpp │ ├── permutation.hpp │ ├── query_heap.hpp │ ├── range_table.hpp │ ├── rectangle.hpp │ ├── serialization.hpp │ ├── static_assert.hpp │ ├── static_graph.hpp │ ├── static_rtree.hpp │ ├── std_hash.hpp │ ├── string_util.hpp │ ├── tarjan_scc.hpp │ ├── timed_histogram.hpp │ ├── timezones.hpp │ ├── timing_util.hpp │ ├── to_osm_link.hpp │ ├── trigonometry_table.hpp │ ├── typedefs.hpp │ ├── vector_tile.hpp │ ├── vector_view.hpp │ ├── version.hpp.in │ ├── viewport.hpp │ ├── web_mercator.hpp │ ├── xor_fast_hash.hpp │ └── xor_fast_hash_storage.hpp ├── lib ├── binding │ └── .gitkeep ├── binding_napi_v8 └── index.js ├── package-lock.json ├── package.json ├── profiles ├── bicycle.lua ├── car.lua ├── debug_example.lua ├── debug_way.lua ├── examples │ └── postgis.lua ├── foot.lua ├── lib │ ├── access.lua │ ├── destination.lua │ ├── guidance.lua │ ├── maxspeed.lua │ ├── measure.lua │ ├── obstacles.lua │ ├── pprint.lua │ ├── profile_debugger.lua │ ├── relations.lua │ ├── sequence.lua │ ├── set.lua │ ├── tags.lua │ ├── traffic_signal.lua │ ├── utils.lua │ └── way_handlers.lua ├── rasterbot.lua ├── rasterbotinterp.lua ├── test.lua ├── testbot.lua └── turnbot.lua ├── scripts ├── analyze.sh ├── bisect_cucumber.sh ├── build_api_docs.sh ├── check_taginfo.py ├── ci │ ├── addresssanitizer.conf │ ├── bench.js │ ├── download_gps_traces.py │ ├── e2e_benchmark.py │ ├── is_pr_merge.sh │ ├── leaksanitizer.conf │ ├── node_package.sh │ ├── post_benchmark_results.py │ ├── run_benchmarks.sh │ ├── travis_helper.sh │ ├── undefinedsanitizer.conf │ └── windows-build.bat ├── cucumber_test_matrix.sh ├── error_on_dirty.sh ├── format.sh ├── gdb_printers.py ├── md5sum.js ├── node_install.sh ├── osm2cucumber.js ├── osrm-runner.js ├── poly2req.js ├── tidy.sh ├── timer.js ├── update_dependencies.sh └── validate_changelog.js ├── src ├── benchmarks │ ├── CMakeLists.txt │ ├── alias.cpp │ ├── bench.cpp │ ├── json_render.cpp │ ├── match.cpp │ ├── packed_vector.cpp │ ├── route.cpp │ └── static_rtree.cpp ├── contractor │ ├── contractor.cpp │ ├── contractor_search.cpp │ └── graph_contractor.cpp ├── customize │ └── customizer.cpp ├── engine │ ├── api │ │ └── json_factory.cpp │ ├── datafacade │ │ ├── mmap_memory_allocator.cpp │ │ ├── process_memory_allocator.cpp │ │ └── shared_memory_allocator.cpp │ ├── douglas_peucker.cpp │ ├── engine_config.cpp │ ├── guidance │ │ ├── assemble_overview.cpp │ │ ├── assemble_route.cpp │ │ ├── assemble_steps.cpp │ │ ├── collapse_scenario_detection.cpp │ │ ├── collapse_turns.cpp │ │ ├── lane_processing.cpp │ │ ├── post_processing.cpp │ │ └── verbosity_reduction.cpp │ ├── hint.cpp │ ├── plugins │ │ ├── match.cpp │ │ ├── nearest.cpp │ │ ├── table.cpp │ │ ├── tile.cpp │ │ ├── trip.cpp │ │ └── viaroute.cpp │ ├── polyline_compressor.cpp │ ├── routing_algorithms │ │ ├── alternative_path_ch.cpp │ │ ├── alternative_path_mld.cpp │ │ ├── direct_shortest_path.cpp │ │ ├── many_to_many_ch.cpp │ │ ├── many_to_many_mld.cpp │ │ ├── map_matching.cpp │ │ ├── routing_base.cpp │ │ ├── routing_base_ch.cpp │ │ ├── routing_base_mld.cpp │ │ ├── shortest_path.cpp │ │ └── tile_turns.cpp │ └── search_engine_data.cpp ├── extractor │ ├── compressed_edge_container.cpp │ ├── edge_based_graph_factory.cpp │ ├── extraction_containers.cpp │ ├── extractor.cpp │ ├── extractor_callbacks.cpp │ ├── graph_compressor.cpp │ ├── intersection │ │ ├── coordinate_extractor.cpp │ │ ├── have_identical_names.cpp │ │ ├── intersection.cpp │ │ ├── intersection_analysis.cpp │ │ ├── mergable_road_detector.cpp │ │ └── node_based_graph_walker.cpp │ ├── location_dependent_data.cpp │ ├── maneuver_override_relation_parser.cpp │ ├── node_based_graph_factory.cpp │ ├── obstacles.cpp │ ├── raster_source.cpp │ ├── restriction_graph.cpp │ ├── restriction_parser.cpp │ ├── scripting_environment_lua.cpp │ ├── suffix_table.cpp │ ├── turn_path_compressor.cpp │ ├── turn_path_filter.cpp │ └── way_restriction_map.cpp ├── guidance │ ├── driveway_handler.cpp │ ├── guidance_processing.cpp │ ├── intersection_handler.cpp │ ├── motorway_handler.cpp │ ├── roundabout_handler.cpp │ ├── segregated_intersection_classification.cpp │ ├── sliproad_handler.cpp │ ├── suppress_mode_handler.cpp │ ├── turn_analysis.cpp │ ├── turn_classification.cpp │ ├── turn_discovery.cpp │ ├── turn_handler.cpp │ ├── turn_lane_augmentation.cpp │ ├── turn_lane_data.cpp │ ├── turn_lane_handler.cpp │ └── turn_lane_matcher.cpp ├── nodejs │ ├── CMakeLists.txt │ └── node_osrm.cpp ├── osrm │ ├── contractor.cpp │ ├── customizer.cpp │ ├── extractor.cpp │ ├── osrm.cpp │ └── partitioner.cpp ├── partitioner │ ├── bisection_graph_view.cpp │ ├── bisection_to_partition.cpp │ ├── dinic_max_flow.cpp │ ├── inertial_flow.cpp │ ├── partitioner.cpp │ ├── recursive_bisection.cpp │ ├── recursive_bisection_state.cpp │ ├── renumber.cpp │ └── tarjan_graph_wrapper.cpp ├── server │ ├── api │ │ ├── parameters_parser.cpp │ │ └── url_parser.cpp │ ├── connection.cpp │ ├── http │ │ └── reply.cpp │ ├── request_handler.cpp │ ├── request_parser.cpp │ ├── service │ │ ├── match_service.cpp │ │ ├── nearest_service.cpp │ │ ├── route_service.cpp │ │ ├── table_service.cpp │ │ ├── tile_service.cpp │ │ └── trip_service.cpp │ └── service_handler.cpp ├── storage │ ├── io_config.cpp │ ├── storage.cpp │ └── storage_config.cpp ├── tools │ ├── .gitignore │ ├── components.cpp │ ├── contract.cpp │ ├── customize.cpp │ ├── extract.cpp │ ├── io-benchmark.cpp │ ├── partition.cpp │ ├── routed.cpp │ └── store.cpp ├── updater │ ├── csv_source.cpp │ └── updater.cpp └── util │ ├── assert.cpp │ ├── conditional_restrictions.cpp │ ├── coordinate.cpp │ ├── coordinate_calculation.cpp │ ├── exception.cpp │ ├── fingerprint.cpp │ ├── geojson_debug_policies.cpp │ ├── guidance │ ├── bearing_class.cpp │ ├── entry_class.cpp │ └── turn_lanes.cpp │ ├── log.cpp │ ├── opening_hours.cpp │ ├── timed_histogram.cpp │ └── timezones.cpp ├── taginfo.json ├── test ├── .gitignore ├── data │ ├── Makefile │ ├── berlin_gps_traces.csv.gz │ ├── data.md5sum │ ├── monaco.osm.pbf │ ├── monaco.poly │ ├── poland_gps_traces.csv.gz │ ├── portugal_to_korea.json │ ├── profiles │ │ ├── bad_node.lua │ │ ├── bad_segment.lua │ │ ├── bad_setup.lua │ │ ├── bad_turn.lua │ │ └── bad_way.lua │ ├── regions │ │ ├── hong-kong.geojson │ │ └── null-island.geojson │ ├── tar_test.tar │ └── tz │ │ ├── iana │ │ ├── dc.geojson │ │ ├── guinea.geojson │ │ ├── liverpool.geojson │ │ └── london.geojson │ │ └── win │ │ ├── dc.geojson │ │ ├── guinea.geojson │ │ ├── liverpool.geojson │ │ └── london.geojson ├── nodejs │ ├── benchmark.js │ ├── constants.js │ ├── index.js │ ├── match.js │ ├── nearest.js │ ├── route.js │ ├── table.js │ ├── tile.js │ └── trip.js └── rastersource.asc ├── third_party ├── flatbuffers │ ├── .bazelci │ │ └── presubmit.yml │ ├── .bazelignore │ ├── .bazelrc │ ├── .clang-format │ ├── .clang-tidy │ ├── .editorconfig │ ├── .eslintrc.js │ ├── .gitattributes │ ├── .gitignore │ ├── .npmrc │ ├── BUILD.bazel │ ├── CHANGELOG.md │ ├── CMake │ │ ├── BuildFlatBuffers.cmake │ │ ├── DESCRIPTION.txt │ │ ├── FindFlatBuffers.cmake │ │ ├── PackageDebian.cmake │ │ ├── PackageRedhat.cmake │ │ ├── Version.cmake │ │ ├── flatbuffers-config-version.cmake.in │ │ ├── flatbuffers-config.cmake │ │ └── flatbuffers.pc.in │ ├── CMakeLists.txt │ ├── CONTRIBUTING.md │ ├── FlatBuffers.podspec │ ├── Formatters.md │ ├── LICENSE │ ├── Package.swift │ ├── Package@swift-5.5.swift │ ├── README.md │ ├── SECURITY.md │ ├── WORKSPACE │ ├── build_defs.bzl │ ├── composer.json │ ├── conan │ │ ├── CMakeLists.txt │ │ ├── build.py │ │ └── test_package │ │ │ ├── CMakeLists.txt │ │ │ ├── conanfile.py │ │ │ └── test_package.cpp │ ├── conanfile.py │ ├── grpc │ │ ├── BUILD.bazel │ │ ├── README.md │ │ ├── boringssl.patch │ │ ├── build_grpc.sh │ │ ├── build_grpc_with_cxx14.patch │ │ ├── examples │ │ │ ├── README.md │ │ │ ├── go │ │ │ │ ├── format.sh │ │ │ │ └── greeter │ │ │ │ │ ├── .gitignore │ │ │ │ │ ├── README.md │ │ │ │ │ ├── client │ │ │ │ │ ├── go.mod │ │ │ │ │ └── main.go │ │ │ │ │ ├── models │ │ │ │ │ ├── Greeter_grpc.go │ │ │ │ │ ├── HelloReply.go │ │ │ │ │ ├── HelloRequest.go │ │ │ │ │ └── go.mod │ │ │ │ │ └── server │ │ │ │ │ ├── go.mod │ │ │ │ │ └── main.go │ │ │ ├── greeter.fbs │ │ │ ├── python │ │ │ │ └── greeter │ │ │ │ │ ├── README.md │ │ │ │ │ ├── client.py │ │ │ │ │ ├── models │ │ │ │ │ ├── HelloReply.py │ │ │ │ │ ├── HelloRequest.py │ │ │ │ │ ├── __init__.py │ │ │ │ │ └── greeter_grpc_fb.py │ │ │ │ │ └── server.py │ │ │ ├── swift │ │ │ │ └── Greeter │ │ │ │ │ ├── Package.swift │ │ │ │ │ ├── README.md │ │ │ │ │ └── Sources │ │ │ │ │ ├── Model │ │ │ │ │ ├── greeter.grpc.swift │ │ │ │ │ └── greeter_generated.swift │ │ │ │ │ ├── client │ │ │ │ │ └── main.swift │ │ │ │ │ └── server │ │ │ │ │ └── main.swift │ │ │ └── ts │ │ │ │ └── greeter │ │ │ │ ├── README.md │ │ │ │ ├── package.json │ │ │ │ ├── src │ │ │ │ ├── client.ts │ │ │ │ ├── greeter.ts │ │ │ │ ├── greeter_generated.ts │ │ │ │ ├── greeter_grpc.d.ts │ │ │ │ ├── greeter_grpc.js │ │ │ │ ├── models.ts │ │ │ │ ├── models │ │ │ │ │ ├── hello-reply.ts │ │ │ │ │ └── hello-request.ts │ │ │ │ └── server.ts │ │ │ │ └── tsconfig.json │ │ ├── flatbuffers-java-grpc │ │ │ ├── pom.xml │ │ │ └── src │ │ │ │ └── main │ │ │ │ └── java │ │ │ │ └── com │ │ │ │ └── google │ │ │ │ └── flatbuffers │ │ │ │ └── grpc │ │ │ │ └── FlatbuffersUtils.java │ │ ├── pom.xml │ │ ├── samples │ │ │ └── greeter │ │ │ │ ├── Makefile │ │ │ │ ├── client.cpp │ │ │ │ ├── greeter.fbs │ │ │ │ └── server.cpp │ │ ├── src │ │ │ └── compiler │ │ │ │ ├── BUILD.bazel │ │ │ │ ├── cpp_generator.cc │ │ │ │ ├── cpp_generator.h │ │ │ │ ├── go_generator.cc │ │ │ │ ├── go_generator.h │ │ │ │ ├── java_generator.cc │ │ │ │ ├── java_generator.h │ │ │ │ ├── python_generator.cc │ │ │ │ ├── python_generator.h │ │ │ │ ├── schema_interface.h │ │ │ │ ├── swift_generator.cc │ │ │ │ ├── swift_generator.h │ │ │ │ ├── ts_generator.cc │ │ │ │ └── ts_generator.h │ │ └── tests │ │ │ ├── BUILD │ │ │ ├── GameFactory.java │ │ │ ├── JavaGrpcTest.java │ │ │ ├── go_test.go │ │ │ ├── grpctest.cpp │ │ │ ├── grpctest.py │ │ │ ├── java-grpc-test.sh │ │ │ ├── message_builder_test.cpp │ │ │ └── pom.xml │ ├── include │ │ └── flatbuffers │ │ │ ├── allocator.h │ │ │ ├── array.h │ │ │ ├── base.h │ │ │ ├── buffer.h │ │ │ ├── buffer_ref.h │ │ │ ├── code_generator.h │ │ │ ├── code_generators.h │ │ │ ├── default_allocator.h │ │ │ ├── detached_buffer.h │ │ │ ├── file_manager.h │ │ │ ├── flatbuffer_builder.h │ │ │ ├── flatbuffers.h │ │ │ ├── flatc.h │ │ │ ├── flex_flat_util.h │ │ │ ├── flexbuffers.h │ │ │ ├── grpc.h │ │ │ ├── hash.h │ │ │ ├── idl.h │ │ │ ├── minireflect.h │ │ │ ├── pch │ │ │ ├── flatc_pch.h │ │ │ └── pch.h │ │ │ ├── reflection.h │ │ │ ├── reflection_generated.h │ │ │ ├── registry.h │ │ │ ├── stl_emulation.h │ │ │ ├── string.h │ │ │ ├── struct.h │ │ │ ├── table.h │ │ │ ├── util.h │ │ │ ├── vector.h │ │ │ ├── vector_downward.h │ │ │ └── verifier.h │ ├── lobster │ │ └── flatbuffers.lobster │ ├── lua │ │ ├── flatbuffers.lua │ │ └── flatbuffers │ │ │ ├── binaryarray.lua │ │ │ ├── builder.lua │ │ │ ├── compat.lua │ │ │ ├── compat_5_1.lua │ │ │ ├── compat_5_3.lua │ │ │ ├── compat_luajit.lua │ │ │ ├── numTypes.lua │ │ │ └── view.lua │ ├── mjs │ │ └── README.md │ ├── net │ │ └── FlatBuffers │ │ │ ├── ByteBuffer.cs │ │ │ ├── ByteBufferUtil.cs │ │ │ ├── FlatBufferBuilder.cs │ │ │ ├── FlatBufferConstants.cs │ │ │ ├── FlatBufferVerify.cs │ │ │ ├── Google.FlatBuffers.csproj │ │ │ ├── IFlatbufferObject.cs │ │ │ ├── Offset.cs │ │ │ ├── Struct.cs │ │ │ ├── Table.cs │ │ │ ├── flatbuffers.png │ │ │ └── flatbuffers.snk │ ├── package.json │ ├── pnpm-lock.yaml │ ├── reflection │ │ ├── BUILD.bazel │ │ ├── reflection.fbs │ │ └── ts │ │ │ └── BUILD.bazel │ ├── samples │ │ ├── SampleBinary.cs │ │ ├── SampleBinary.java │ │ ├── SampleBinary.kt │ │ ├── SampleBinary.php │ │ ├── csharp_sample.sh │ │ ├── dart_sample.sh │ │ ├── go.mod │ │ ├── go_sample.sh │ │ ├── java_sample.sh │ │ ├── javascript_sample.sh │ │ ├── kotlin_sample.sh │ │ ├── lua │ │ │ └── MyGame │ │ │ │ └── Sample │ │ │ │ ├── Color.lua │ │ │ │ ├── Equipment.lua │ │ │ │ ├── Monster.lua │ │ │ │ ├── Vec3.lua │ │ │ │ └── Weapon.lua │ │ ├── monster.bfbs │ │ ├── monster.fbs │ │ ├── monster_generated.h │ │ ├── monster_generated.lobster │ │ ├── monster_generated.swift │ │ ├── monsterdata.json │ │ ├── php_sample.sh │ │ ├── python_sample.sh │ │ ├── rust_generated │ │ │ ├── mod.rs │ │ │ └── my_game │ │ │ │ └── sample │ │ │ │ ├── color_generated.rs │ │ │ │ ├── equipment_generated.rs │ │ │ │ ├── monster_generated.rs │ │ │ │ ├── vec_3_generated.rs │ │ │ │ └── weapon_generated.rs │ │ ├── sample_bfbs.cpp │ │ ├── sample_binary.cpp │ │ ├── sample_binary.go │ │ ├── sample_binary.lobster │ │ ├── sample_binary.lua │ │ ├── sample_binary.py │ │ ├── sample_binary.rs │ │ ├── sample_binary.swift │ │ ├── sample_flexbuffers.rs │ │ ├── sample_flexbuffers_serde.rs │ │ ├── sample_text.cpp │ │ └── sample_text.lobster │ ├── scripts │ │ ├── check-grpc-generated-code.py │ │ ├── check_generate_code.py │ │ ├── clang-format-all.sh │ │ ├── clang-format-git.sh │ │ ├── clang-tidy-git.sh │ │ ├── generate_code.py │ │ ├── generate_grpc_examples.py │ │ ├── release.sh │ │ └── util.py │ ├── snap │ │ └── snapcraft.yaml │ ├── src │ │ ├── BUILD.bazel │ │ ├── annotated_binary_text_gen.cpp │ │ ├── annotated_binary_text_gen.h │ │ ├── bfbs_gen.h │ │ ├── bfbs_gen_lua.cpp │ │ ├── bfbs_gen_lua.h │ │ ├── bfbs_gen_nim.cpp │ │ ├── bfbs_gen_nim.h │ │ ├── bfbs_namer.h │ │ ├── binary_annotator.cpp │ │ ├── binary_annotator.h │ │ ├── code_generators.cpp │ │ ├── file_binary_writer.cpp │ │ ├── file_name_saving_file_manager.cpp │ │ ├── file_writer.cpp │ │ ├── flatc.cpp │ │ ├── flatc_main.cpp │ │ ├── flathash.cpp │ │ ├── idl_gen_binary.cpp │ │ ├── idl_gen_binary.h │ │ ├── idl_gen_cpp.cpp │ │ ├── idl_gen_cpp.h │ │ ├── idl_gen_csharp.cpp │ │ ├── idl_gen_csharp.h │ │ ├── idl_gen_dart.cpp │ │ ├── idl_gen_dart.h │ │ ├── idl_gen_fbs.cpp │ │ ├── idl_gen_fbs.h │ │ ├── idl_gen_go.cpp │ │ ├── idl_gen_go.h │ │ ├── idl_gen_grpc.cpp │ │ ├── idl_gen_java.cpp │ │ ├── idl_gen_java.h │ │ ├── idl_gen_json_schema.cpp │ │ ├── idl_gen_json_schema.h │ │ ├── idl_gen_kotlin.cpp │ │ ├── idl_gen_kotlin.h │ │ ├── idl_gen_kotlin_kmp.cpp │ │ ├── idl_gen_lobster.cpp │ │ ├── idl_gen_lobster.h │ │ ├── idl_gen_php.cpp │ │ ├── idl_gen_php.h │ │ ├── idl_gen_python.cpp │ │ ├── idl_gen_python.h │ │ ├── idl_gen_rust.cpp │ │ ├── idl_gen_rust.h │ │ ├── idl_gen_swift.cpp │ │ ├── idl_gen_swift.h │ │ ├── idl_gen_text.cpp │ │ ├── idl_gen_text.h │ │ ├── idl_gen_ts.cpp │ │ ├── idl_gen_ts.h │ │ ├── idl_namer.h │ │ ├── idl_parser.cpp │ │ ├── namer.h │ │ ├── reflection.cpp │ │ └── util.cpp │ ├── swift.swiftformat │ ├── tsconfig.json │ ├── tsconfig.mjs.json │ └── typescript.bzl ├── fmt │ ├── .clang-format │ ├── .github │ │ ├── dependabot.yml │ │ ├── issue_template.md │ │ ├── pull_request_template.md │ │ └── workflows │ │ │ ├── cifuzz.yml │ │ │ ├── doc.yml │ │ │ ├── lint.yml │ │ │ ├── linux.yml │ │ │ ├── macos.yml │ │ │ ├── scorecard.yml │ │ │ └── windows.yml │ ├── .gitignore │ ├── CMakeLists.txt │ ├── CONTRIBUTING.md │ ├── ChangeLog.md │ ├── LICENSE │ ├── README.md │ ├── doc │ │ ├── CMakeLists.txt │ │ ├── _static │ │ │ ├── bootstrap.min.js │ │ │ ├── breathe.css │ │ │ └── fonts │ │ │ │ ├── glyphicons-halflings-regular.eot │ │ │ │ ├── glyphicons-halflings-regular.svg │ │ │ │ ├── glyphicons-halflings-regular.ttf │ │ │ │ └── glyphicons-halflings-regular.woff │ │ ├── _templates │ │ │ ├── layout.html │ │ │ └── search.html │ │ ├── api.rst │ │ ├── basic-bootstrap │ │ │ ├── README │ │ │ ├── layout.html │ │ │ └── theme.conf │ │ ├── bootstrap │ │ │ ├── alerts.less │ │ │ ├── badges.less │ │ │ ├── bootstrap.less │ │ │ ├── breadcrumbs.less │ │ │ ├── button-groups.less │ │ │ ├── buttons.less │ │ │ ├── carousel.less │ │ │ ├── close.less │ │ │ ├── code.less │ │ │ ├── component-animations.less │ │ │ ├── dropdowns.less │ │ │ ├── forms.less │ │ │ ├── glyphicons.less │ │ │ ├── grid.less │ │ │ ├── input-groups.less │ │ │ ├── jumbotron.less │ │ │ ├── labels.less │ │ │ ├── list-group.less │ │ │ ├── media.less │ │ │ ├── mixins.less │ │ │ ├── mixins │ │ │ │ ├── alerts.less │ │ │ │ ├── background-variant.less │ │ │ │ ├── border-radius.less │ │ │ │ ├── buttons.less │ │ │ │ ├── center-block.less │ │ │ │ ├── clearfix.less │ │ │ │ ├── forms.less │ │ │ │ ├── gradients.less │ │ │ │ ├── grid-framework.less │ │ │ │ ├── grid.less │ │ │ │ ├── hide-text.less │ │ │ │ ├── image.less │ │ │ │ ├── labels.less │ │ │ │ ├── list-group.less │ │ │ │ ├── nav-divider.less │ │ │ │ ├── nav-vertical-align.less │ │ │ │ ├── opacity.less │ │ │ │ ├── pagination.less │ │ │ │ ├── panels.less │ │ │ │ ├── progress-bar.less │ │ │ │ ├── reset-filter.less │ │ │ │ ├── resize.less │ │ │ │ ├── responsive-visibility.less │ │ │ │ ├── size.less │ │ │ │ ├── tab-focus.less │ │ │ │ ├── table-row.less │ │ │ │ ├── text-emphasis.less │ │ │ │ ├── text-overflow.less │ │ │ │ └── vendor-prefixes.less │ │ │ ├── modals.less │ │ │ ├── navbar.less │ │ │ ├── navs.less │ │ │ ├── normalize.less │ │ │ ├── pager.less │ │ │ ├── pagination.less │ │ │ ├── panels.less │ │ │ ├── popovers.less │ │ │ ├── print.less │ │ │ ├── progress-bars.less │ │ │ ├── responsive-embed.less │ │ │ ├── responsive-utilities.less │ │ │ ├── scaffolding.less │ │ │ ├── tables.less │ │ │ ├── theme.less │ │ │ ├── thumbnails.less │ │ │ ├── tooltip.less │ │ │ ├── type.less │ │ │ ├── utilities.less │ │ │ ├── variables.less │ │ │ └── wells.less │ │ ├── build.py │ │ ├── conf.py │ │ ├── contents.rst │ │ ├── fmt.less │ │ ├── index.rst │ │ ├── python-license.txt │ │ ├── syntax.rst │ │ └── usage.rst │ ├── include │ │ └── fmt │ │ │ ├── args.h │ │ │ ├── chrono.h │ │ │ ├── color.h │ │ │ ├── compile.h │ │ │ ├── core.h │ │ │ ├── format-inl.h │ │ │ ├── format.h │ │ │ ├── os.h │ │ │ ├── ostream.h │ │ │ ├── printf.h │ │ │ ├── ranges.h │ │ │ ├── std.h │ │ │ └── xchar.h │ ├── src │ │ ├── fmt.cc │ │ ├── format.cc │ │ └── os.cc │ ├── support │ │ ├── Android.mk │ │ ├── AndroidManifest.xml │ │ ├── C++.sublime-syntax │ │ ├── README │ │ ├── Vagrantfile │ │ ├── bazel │ │ │ ├── .bazelversion │ │ │ ├── BUILD.bazel │ │ │ ├── README.md │ │ │ └── WORKSPACE.bazel │ │ ├── build-docs.py │ │ ├── build.gradle │ │ ├── cmake │ │ │ ├── FindSetEnv.cmake │ │ │ ├── JoinPaths.cmake │ │ │ ├── fmt-config.cmake.in │ │ │ └── fmt.pc.in │ │ ├── compute-powers.py │ │ ├── docopt.py │ │ ├── manage.py │ │ ├── printable.py │ │ └── rtd │ │ │ ├── conf.py │ │ │ ├── index.rst │ │ │ └── theme │ │ │ ├── layout.html │ │ │ └── theme.conf │ └── test │ │ ├── CMakeLists.txt │ │ ├── add-subdirectory-test │ │ ├── CMakeLists.txt │ │ └── main.cc │ │ ├── args-test.cc │ │ ├── assert-test.cc │ │ ├── chrono-test.cc │ │ ├── color-test.cc │ │ ├── compile-error-test │ │ └── CMakeLists.txt │ │ ├── compile-fp-test.cc │ │ ├── compile-test.cc │ │ ├── core-test.cc │ │ ├── cuda-test │ │ ├── CMakeLists.txt │ │ ├── cpp14.cc │ │ └── cuda-cpp14.cu │ │ ├── detect-stdfs.cc │ │ ├── enforce-checks-test.cc │ │ ├── find-package-test │ │ ├── CMakeLists.txt │ │ └── main.cc │ │ ├── format-impl-test.cc │ │ ├── format-test.cc │ │ ├── fuzzing │ │ ├── .gitignore │ │ ├── CMakeLists.txt │ │ ├── README.md │ │ ├── build.sh │ │ ├── chrono-duration.cc │ │ ├── chrono-timepoint.cc │ │ ├── float.cc │ │ ├── fuzzer-common.h │ │ ├── main.cc │ │ ├── named-arg.cc │ │ ├── one-arg.cc │ │ └── two-args.cc │ │ ├── gtest-extra-test.cc │ │ ├── gtest-extra.cc │ │ ├── gtest-extra.h │ │ ├── gtest │ │ ├── .clang-format │ │ ├── CMakeLists.txt │ │ ├── gmock-gtest-all.cc │ │ ├── gmock │ │ │ └── gmock.h │ │ └── gtest │ │ │ ├── gtest-spi.h │ │ │ └── gtest.h │ │ ├── header-only-test.cc │ │ ├── mock-allocator.h │ │ ├── module-test.cc │ │ ├── noexception-test.cc │ │ ├── os-test.cc │ │ ├── ostream-test.cc │ │ ├── posix-mock-test.cc │ │ ├── posix-mock.h │ │ ├── printf-test.cc │ │ ├── ranges-odr-test.cc │ │ ├── ranges-test.cc │ │ ├── scan-test.cc │ │ ├── scan.h │ │ ├── static-export-test │ │ ├── CMakeLists.txt │ │ ├── library.cc │ │ └── main.cc │ │ ├── std-test.cc │ │ ├── test-assert.h │ │ ├── test-main.cc │ │ ├── unicode-test.cc │ │ ├── util.cc │ │ ├── util.h │ │ └── xchar-test.cc ├── libosmium │ ├── .clang-tidy │ ├── .codecov.yml │ ├── .github │ │ ├── FUNDING.yml │ │ ├── ISSUE_TEMPLATE │ │ │ ├── bug-report.md │ │ │ └── config.yml │ │ ├── actions │ │ │ ├── build-windows │ │ │ │ └── action.yml │ │ │ ├── build │ │ │ │ └── action.yml │ │ │ ├── cmake-windows │ │ │ │ └── action.yml │ │ │ ├── cmake │ │ │ │ └── action.yml │ │ │ ├── ctest-windows │ │ │ │ └── action.yml │ │ │ ├── ctest │ │ │ │ └── action.yml │ │ │ ├── install-macos │ │ │ │ └── action.yml │ │ │ ├── install-protozero │ │ │ │ └── action.yml │ │ │ ├── install-ubuntu │ │ │ │ └── action.yml │ │ │ └── install-windows │ │ │ │ └── action.yml │ │ └── workflows │ │ │ ├── ci.yml │ │ │ └── clang-tidy.yml │ ├── .gitignore │ ├── .gitmodules │ ├── CHANGELOG.md │ ├── CMakeLists.txt │ ├── CONTRIBUTING.md │ ├── LICENSE │ ├── NOTES_FOR_DEVELOPERS.md │ ├── README.md │ ├── benchmarks │ │ ├── CMakeLists.txt │ │ ├── README.md │ │ ├── download_data.sh │ │ ├── osmium_benchmark_count.cpp │ │ ├── osmium_benchmark_count_tag.cpp │ │ ├── osmium_benchmark_index_map.cpp │ │ ├── osmium_benchmark_mercator.cpp │ │ ├── osmium_benchmark_static_vs_dynamic_index.cpp │ │ ├── osmium_benchmark_write_pbf.cpp │ │ ├── run_benchmark_count.sh │ │ ├── run_benchmark_count_tag.sh │ │ ├── run_benchmark_index_map.sh │ │ ├── run_benchmark_mercator.sh │ │ ├── run_benchmark_static_vs_dynamic_index.sh │ │ ├── run_benchmark_write_pbf.sh │ │ ├── run_benchmarks.sh │ │ └── setup.sh │ ├── build-appveyor.bat │ ├── build-local.bat │ ├── build-msys2.bat │ ├── cmake │ │ ├── FindGem.cmake │ │ ├── FindLZ4.cmake │ │ ├── FindOsmium.cmake │ │ ├── FindProtozero.cmake │ │ ├── README │ │ └── iwyu.sh │ ├── doc │ │ ├── CMakeLists.txt │ │ ├── Doxyfile.in │ │ ├── README.md │ │ ├── doc.md │ │ ├── header.html │ │ └── osmium.css │ ├── examples │ │ ├── CMakeLists.txt │ │ ├── README.md │ │ ├── osmium_amenity_list.cpp │ │ ├── osmium_area_test.cpp │ │ ├── osmium_change_tags.cpp │ │ ├── osmium_convert.cpp │ │ ├── osmium_count.cpp │ │ ├── osmium_create_pois.cpp │ │ ├── osmium_debug.cpp │ │ ├── osmium_dump_internal.cpp │ │ ├── osmium_filter_discussions.cpp │ │ ├── osmium_index_lookup.cpp │ │ ├── osmium_location_cache_create.cpp │ │ ├── osmium_location_cache_use.cpp │ │ ├── osmium_pub_names.cpp │ │ ├── osmium_read.cpp │ │ ├── osmium_read_with_progress.cpp │ │ ├── osmium_road_length.cpp │ │ ├── osmium_tags_filter.cpp │ │ └── osmium_tiles.cpp │ ├── include │ │ ├── gdalcpp.hpp │ │ └── osmium │ │ │ ├── area │ │ │ ├── assembler.hpp │ │ │ ├── assembler_config.hpp │ │ │ ├── assembler_legacy.hpp │ │ │ ├── detail │ │ │ │ ├── basic_assembler.hpp │ │ │ │ ├── basic_assembler_with_tags.hpp │ │ │ │ ├── node_ref_segment.hpp │ │ │ │ ├── proto_ring.hpp │ │ │ │ ├── segment_list.hpp │ │ │ │ └── vector.hpp │ │ │ ├── geom_assembler.hpp │ │ │ ├── multipolygon_collector.hpp │ │ │ ├── multipolygon_manager.hpp │ │ │ ├── multipolygon_manager_legacy.hpp │ │ │ ├── problem_reporter.hpp │ │ │ ├── problem_reporter_exception.hpp │ │ │ ├── problem_reporter_ogr.hpp │ │ │ ├── problem_reporter_stream.hpp │ │ │ └── stats.hpp │ │ │ ├── builder │ │ │ ├── attr.hpp │ │ │ ├── builder.hpp │ │ │ └── osm_object_builder.hpp │ │ │ ├── diff_handler.hpp │ │ │ ├── diff_iterator.hpp │ │ │ ├── diff_visitor.hpp │ │ │ ├── dynamic_handler.hpp │ │ │ ├── experimental │ │ │ └── flex_reader.hpp │ │ │ ├── fwd.hpp │ │ │ ├── geom │ │ │ ├── coordinates.hpp │ │ │ ├── factory.hpp │ │ │ ├── geojson.hpp │ │ │ ├── geos.hpp │ │ │ ├── haversine.hpp │ │ │ ├── mercator_projection.hpp │ │ │ ├── ogr.hpp │ │ │ ├── projection.hpp │ │ │ ├── rapid_geojson.hpp │ │ │ ├── relations.hpp │ │ │ ├── tile.hpp │ │ │ ├── util.hpp │ │ │ ├── wkb.hpp │ │ │ └── wkt.hpp │ │ │ ├── handler.hpp │ │ │ ├── handler │ │ │ ├── chain.hpp │ │ │ ├── check_order.hpp │ │ │ ├── disk_store.hpp │ │ │ ├── dump.hpp │ │ │ ├── node_locations_for_ways.hpp │ │ │ └── object_relations.hpp │ │ │ ├── index │ │ │ ├── detail │ │ │ │ ├── create_map_with_fd.hpp │ │ │ │ ├── mmap_vector_anon.hpp │ │ │ │ ├── mmap_vector_base.hpp │ │ │ │ ├── mmap_vector_file.hpp │ │ │ │ ├── tmpfile.hpp │ │ │ │ ├── vector_map.hpp │ │ │ │ └── vector_multimap.hpp │ │ │ ├── id_set.hpp │ │ │ ├── index.hpp │ │ │ ├── map.hpp │ │ │ ├── map │ │ │ │ ├── all.hpp │ │ │ │ ├── dense_file_array.hpp │ │ │ │ ├── dense_mem_array.hpp │ │ │ │ ├── dense_mmap_array.hpp │ │ │ │ ├── dummy.hpp │ │ │ │ ├── flex_mem.hpp │ │ │ │ ├── sparse_file_array.hpp │ │ │ │ ├── sparse_mem_array.hpp │ │ │ │ ├── sparse_mem_map.hpp │ │ │ │ └── sparse_mmap_array.hpp │ │ │ ├── multimap.hpp │ │ │ ├── multimap │ │ │ │ ├── all.hpp │ │ │ │ ├── hybrid.hpp │ │ │ │ ├── sparse_file_array.hpp │ │ │ │ ├── sparse_mem_array.hpp │ │ │ │ ├── sparse_mem_multimap.hpp │ │ │ │ └── sparse_mmap_array.hpp │ │ │ ├── node_locations_map.hpp │ │ │ ├── nwr_array.hpp │ │ │ └── relations_map.hpp │ │ │ ├── io │ │ │ ├── any_compression.hpp │ │ │ ├── any_input.hpp │ │ │ ├── any_output.hpp │ │ │ ├── bzip2_compression.hpp │ │ │ ├── compression.hpp │ │ │ ├── debug_output.hpp │ │ │ ├── detail │ │ │ │ ├── debug_output_format.hpp │ │ │ │ ├── ids_output_format.hpp │ │ │ │ ├── input_format.hpp │ │ │ │ ├── lz4.hpp │ │ │ │ ├── o5m_input_format.hpp │ │ │ │ ├── opl_input_format.hpp │ │ │ │ ├── opl_output_format.hpp │ │ │ │ ├── opl_parser_functions.hpp │ │ │ │ ├── output_format.hpp │ │ │ │ ├── pbf.hpp │ │ │ │ ├── pbf_decoder.hpp │ │ │ │ ├── pbf_input_format.hpp │ │ │ │ ├── pbf_output_format.hpp │ │ │ │ ├── protobuf_tags.hpp │ │ │ │ ├── queue_util.hpp │ │ │ │ ├── read_thread.hpp │ │ │ │ ├── read_write.hpp │ │ │ │ ├── string_table.hpp │ │ │ │ ├── string_util.hpp │ │ │ │ ├── write_thread.hpp │ │ │ │ ├── xml_input_format.hpp │ │ │ │ ├── xml_output_format.hpp │ │ │ │ └── zlib.hpp │ │ │ ├── error.hpp │ │ │ ├── file.hpp │ │ │ ├── file_compression.hpp │ │ │ ├── file_format.hpp │ │ │ ├── gzip_compression.hpp │ │ │ ├── header.hpp │ │ │ ├── ids_output.hpp │ │ │ ├── input_iterator.hpp │ │ │ ├── o5m_input.hpp │ │ │ ├── opl_input.hpp │ │ │ ├── opl_output.hpp │ │ │ ├── output_iterator.hpp │ │ │ ├── overwrite.hpp │ │ │ ├── pbf.hpp │ │ │ ├── pbf_input.hpp │ │ │ ├── pbf_output.hpp │ │ │ ├── reader.hpp │ │ │ ├── reader_iterator.hpp │ │ │ ├── reader_with_progress_bar.hpp │ │ │ ├── writer.hpp │ │ │ ├── writer_options.hpp │ │ │ ├── xml_input.hpp │ │ │ └── xml_output.hpp │ │ │ ├── memory │ │ │ ├── buffer.hpp │ │ │ ├── callback_buffer.hpp │ │ │ ├── collection.hpp │ │ │ ├── item.hpp │ │ │ └── item_iterator.hpp │ │ │ ├── object_pointer_collection.hpp │ │ │ ├── opl.hpp │ │ │ ├── osm.hpp │ │ │ ├── osm │ │ │ ├── area.hpp │ │ │ ├── box.hpp │ │ │ ├── changeset.hpp │ │ │ ├── crc.hpp │ │ │ ├── crc_zlib.hpp │ │ │ ├── diff_object.hpp │ │ │ ├── entity.hpp │ │ │ ├── entity_bits.hpp │ │ │ ├── item_type.hpp │ │ │ ├── location.hpp │ │ │ ├── metadata_options.hpp │ │ │ ├── node.hpp │ │ │ ├── node_ref.hpp │ │ │ ├── node_ref_list.hpp │ │ │ ├── object.hpp │ │ │ ├── object_comparisons.hpp │ │ │ ├── relation.hpp │ │ │ ├── segment.hpp │ │ │ ├── tag.hpp │ │ │ ├── timestamp.hpp │ │ │ ├── types.hpp │ │ │ ├── types_from_string.hpp │ │ │ ├── undirected_segment.hpp │ │ │ └── way.hpp │ │ │ ├── relations │ │ │ ├── collector.hpp │ │ │ ├── detail │ │ │ │ ├── member_meta.hpp │ │ │ │ └── relation_meta.hpp │ │ │ ├── manager_util.hpp │ │ │ ├── members_database.hpp │ │ │ ├── relations_database.hpp │ │ │ └── relations_manager.hpp │ │ │ ├── storage │ │ │ └── item_stash.hpp │ │ │ ├── tags │ │ │ ├── filter.hpp │ │ │ ├── matcher.hpp │ │ │ ├── regex_filter.hpp │ │ │ ├── taglist.hpp │ │ │ └── tags_filter.hpp │ │ │ ├── thread │ │ │ ├── function_wrapper.hpp │ │ │ ├── pool.hpp │ │ │ ├── queue.hpp │ │ │ └── util.hpp │ │ │ ├── util │ │ │ ├── compatibility.hpp │ │ │ ├── config.hpp │ │ │ ├── delta.hpp │ │ │ ├── double.hpp │ │ │ ├── endian.hpp │ │ │ ├── file.hpp │ │ │ ├── iterator.hpp │ │ │ ├── memory.hpp │ │ │ ├── memory_mapping.hpp │ │ │ ├── minmax.hpp │ │ │ ├── misc.hpp │ │ │ ├── options.hpp │ │ │ ├── progress_bar.hpp │ │ │ ├── string.hpp │ │ │ ├── string_matcher.hpp │ │ │ ├── timer.hpp │ │ │ └── verbose_output.hpp │ │ │ ├── version.hpp │ │ │ └── visitor.hpp │ ├── osmium.imp │ └── test │ │ ├── CMakeLists.txt │ │ ├── README │ │ ├── catch │ │ └── catch.hpp │ │ ├── data-tests │ │ ├── .gitignore │ │ ├── CMakeLists.txt │ │ ├── README.md │ │ ├── include │ │ │ ├── check_basics_handler.hpp │ │ │ ├── check_wkt_handler.hpp │ │ │ ├── common.hpp │ │ │ └── testdata-testcases.hpp │ │ ├── multipolygon.qgs │ │ ├── run-testdata-multipolygon.cmake │ │ ├── testcases │ │ │ ├── test-100.cpp │ │ │ ├── test-101.cpp │ │ │ ├── test-102.cpp │ │ │ ├── test-110.cpp │ │ │ ├── test-111.cpp │ │ │ ├── test-112.cpp │ │ │ ├── test-113.cpp │ │ │ ├── test-114.cpp │ │ │ ├── test-115.cpp │ │ │ ├── test-116.cpp │ │ │ ├── test-120.cpp │ │ │ ├── test-121.cpp │ │ │ ├── test-122.cpp │ │ │ ├── test-123.cpp │ │ │ └── test-124.cpp │ │ ├── testdata-multipolygon.cpp │ │ ├── testdata-overview.cpp │ │ ├── testdata-testcases.cpp │ │ └── testdata-xml.cpp │ │ ├── examples │ │ ├── CMakeLists.txt │ │ └── t │ │ │ ├── amenity_list │ │ │ ├── CMakeLists.txt │ │ │ ├── area.osm │ │ │ └── node.osm │ │ │ ├── area_test │ │ │ ├── CMakeLists.txt │ │ │ └── data.osm │ │ │ ├── change_tags │ │ │ ├── .gitattributes │ │ │ ├── CMakeLists.txt │ │ │ ├── data.osm │ │ │ └── result.osm │ │ │ ├── convert │ │ │ ├── CMakeLists.txt │ │ │ └── data.osm │ │ │ ├── count │ │ │ ├── CMakeLists.txt │ │ │ └── data.osm │ │ │ ├── create_pois │ │ │ └── CMakeLists.txt │ │ │ ├── debug │ │ │ ├── CMakeLists.txt │ │ │ ├── changesets.osm │ │ │ └── data.osm │ │ │ ├── dump_internal │ │ │ ├── CMakeLists.txt │ │ │ └── data.osm │ │ │ ├── filter_discussions │ │ │ ├── CMakeLists.txt │ │ │ └── changesets.osm │ │ │ ├── index_lookup │ │ │ └── CMakeLists.txt │ │ │ ├── location_cache │ │ │ ├── CMakeLists.txt │ │ │ ├── data.osm │ │ │ └── way.osm │ │ │ ├── pub_names │ │ │ ├── CMakeLists.txt │ │ │ ├── pub-addr.osm │ │ │ ├── pub-node.osm │ │ │ ├── pub-noname.osm │ │ │ └── pub-way.osm │ │ │ ├── read │ │ │ ├── CMakeLists.txt │ │ │ └── data.osm │ │ │ ├── read_with_progress │ │ │ ├── CMakeLists.txt │ │ │ └── data.osm │ │ │ ├── road_length │ │ │ ├── CMakeLists.txt │ │ │ └── road.osm │ │ │ └── tiles │ │ │ └── CMakeLists.txt │ │ ├── include │ │ ├── test_crc.hpp │ │ ├── utils.hpp │ │ └── win_mkstemp.hpp │ │ ├── t │ │ ├── area │ │ │ ├── test_area_id.cpp │ │ │ ├── test_assembler.cpp │ │ │ └── test_node_ref_segment.cpp │ │ ├── builder │ │ │ ├── test_attr.cpp │ │ │ └── test_object_builder.cpp │ │ ├── geom │ │ │ ├── area_helper.hpp │ │ │ ├── test_coordinates.cpp │ │ │ ├── test_crs.cpp │ │ │ ├── test_exception.cpp │ │ │ ├── test_factory_with_projection.cpp │ │ │ ├── test_geojson.cpp │ │ │ ├── test_geos.cpp │ │ │ ├── test_mercator.cpp │ │ │ ├── test_ogr.cpp │ │ │ ├── test_ogr_wkb.cpp │ │ │ ├── test_projection.cpp │ │ │ ├── test_tile.cpp │ │ │ ├── test_tile_data.hpp │ │ │ ├── test_wkb.cpp │ │ │ ├── test_wkt.cpp │ │ │ └── wnl_helper.hpp │ │ ├── handler │ │ │ ├── test_apply.cpp │ │ │ ├── test_check_order_handler.cpp │ │ │ └── test_dynamic_handler.cpp │ │ ├── index │ │ │ ├── test_dump_and_load_index.cpp │ │ │ ├── test_dump_sparse_as_array.cpp │ │ │ ├── test_file_based_index.cpp │ │ │ ├── test_id_set.cpp │ │ │ ├── test_id_to_location.cpp │ │ │ ├── test_nwr_array.cpp │ │ │ ├── test_object_pointer_collection.cpp │ │ │ └── test_relations_map.cpp │ │ ├── io │ │ │ ├── corrupt_data_bzip2.txt.bz2 │ │ │ ├── corrupt_data_gzip.txt.gz │ │ │ ├── data-cr.opl │ │ │ ├── data-n0w1r3.osm │ │ │ ├── data-n0w1r3.osm.o5m │ │ │ ├── data-n0w1r3.osm.opl │ │ │ ├── data-n5w0r3.osm │ │ │ ├── data-n5w0r3.osm.o5m │ │ │ ├── data-n5w0r3.osm.opl │ │ │ ├── data-n5w1r0.osm │ │ │ ├── data-n5w1r0.osm.o5m │ │ │ ├── data-n5w1r0.osm.opl │ │ │ ├── data-n5w1r3.osm │ │ │ ├── data-n5w1r3.osm.o5m │ │ │ ├── data-n5w1r3.osm.opl │ │ │ ├── data-nonl.opl │ │ │ ├── data.opl │ │ │ ├── data.osm │ │ │ ├── data.osm.bz2 │ │ │ ├── data.osm.gz │ │ │ ├── data.txt │ │ │ ├── data_bzip2.txt.bz2 │ │ │ ├── data_gzip.txt.gz │ │ │ ├── data_pbf_version-1-densenodes.osm.pbf │ │ │ ├── data_pbf_version-1.osm │ │ │ ├── data_pbf_version-1.osm.pbf │ │ │ ├── deleted_nodes.osh │ │ │ ├── deleted_nodes.osh.pbf │ │ │ ├── empty_file │ │ │ ├── test_bzip2.cpp │ │ │ ├── test_compression_factory.cpp │ │ │ ├── test_file_formats.cpp │ │ │ ├── test_gzip.cpp │ │ │ ├── test_nocompression.cpp │ │ │ ├── test_opl_parser.cpp │ │ │ ├── test_output_iterator.cpp │ │ │ ├── test_output_utils.cpp │ │ │ ├── test_pbf.cpp │ │ │ ├── test_reader.cpp │ │ │ ├── test_reader_fileformat.cpp │ │ │ ├── test_reader_with_mock_decompression.cpp │ │ │ ├── test_reader_with_mock_parser.cpp │ │ │ ├── test_string_table.cpp │ │ │ ├── test_writer.cpp │ │ │ ├── test_writer_with_mock_compression.cpp │ │ │ └── test_writer_with_mock_encoder.cpp │ │ ├── memory │ │ │ ├── test_buffer_basics.cpp │ │ │ ├── test_buffer_node.cpp │ │ │ ├── test_buffer_purge.cpp │ │ │ ├── test_callback_buffer.cpp │ │ │ ├── test_item.cpp │ │ │ └── test_type_is_compatible.cpp │ │ ├── osm │ │ │ ├── test_area.cpp │ │ │ ├── test_box.cpp │ │ │ ├── test_changeset.cpp │ │ │ ├── test_crc.cpp │ │ │ ├── test_entity_bits.cpp │ │ │ ├── test_location.cpp │ │ │ ├── test_metadata.cpp │ │ │ ├── test_node.cpp │ │ │ ├── test_node_ref.cpp │ │ │ ├── test_object_comparisons.cpp │ │ │ ├── test_relation.cpp │ │ │ ├── test_timestamp.cpp │ │ │ ├── test_types_from_string.cpp │ │ │ └── test_way.cpp │ │ ├── relations │ │ │ ├── data.osm │ │ │ ├── dupl_member.osm │ │ │ ├── missing_members.osm │ │ │ ├── test_members_database.cpp │ │ │ ├── test_read_relations.cpp │ │ │ ├── test_relations_database.cpp │ │ │ └── test_relations_manager.cpp │ │ ├── storage │ │ │ └── test_item_stash.cpp │ │ ├── tags │ │ │ ├── test_filter.cpp │ │ │ ├── test_operators.cpp │ │ │ ├── test_tag_list.cpp │ │ │ ├── test_tag_matcher.cpp │ │ │ └── test_tags_filter.cpp │ │ ├── thread │ │ │ ├── test_pool.cpp │ │ │ ├── test_queue.cpp │ │ │ └── test_util.cpp │ │ └── util │ │ │ ├── .gitattributes │ │ │ ├── known_file_size │ │ │ ├── test_config.cpp │ │ │ ├── test_delta.cpp │ │ │ ├── test_double.cpp │ │ │ ├── test_file.cpp │ │ │ ├── test_memory.cpp │ │ │ ├── test_memory_mapping.cpp │ │ │ ├── test_minmax.cpp │ │ │ ├── test_misc.cpp │ │ │ ├── test_options.cpp │ │ │ ├── test_string.cpp │ │ │ ├── test_string_matcher.cpp │ │ │ ├── test_timer_disabled.cpp │ │ │ └── test_timer_enabled.cpp │ │ ├── test_main.cpp │ │ └── valgrind.supp ├── microtar │ ├── LICENSE │ ├── README.md │ └── src │ │ ├── microtar.c │ │ └── microtar.h ├── protozero │ ├── .clang-tidy │ ├── .gitattributes │ ├── .travis.yml │ ├── CHANGELOG.md │ ├── CMakeLists.txt │ ├── CONTRIBUTING.md │ ├── FUZZING.md │ ├── LICENSE.from_folly │ ├── LICENSE.md │ ├── README.md │ ├── UPGRADING.md │ ├── appveyor.yml │ ├── bench │ │ └── data │ │ │ ├── README.md │ │ │ ├── enf-14-4824-6157.vector.pbf │ │ │ └── mapbox-streets-v6-14-8714-8017.vector.pbf │ ├── cmake │ │ └── FindProtozero.cmake │ ├── doc │ │ ├── CMakeLists.txt │ │ ├── Doxyfile.in │ │ ├── advanced.md │ │ ├── cheatsheet.md │ │ └── tutorial.md │ ├── include │ │ └── protozero │ │ │ ├── basic_pbf_builder.hpp │ │ │ ├── basic_pbf_writer.hpp │ │ │ ├── buffer_fixed.hpp │ │ │ ├── buffer_string.hpp │ │ │ ├── buffer_tmpl.hpp │ │ │ ├── buffer_vector.hpp │ │ │ ├── byteswap.hpp │ │ │ ├── config.hpp │ │ │ ├── data_view.hpp │ │ │ ├── exception.hpp │ │ │ ├── iterators.hpp │ │ │ ├── pbf_builder.hpp │ │ │ ├── pbf_message.hpp │ │ │ ├── pbf_reader.hpp │ │ │ ├── pbf_writer.hpp │ │ │ ├── types.hpp │ │ │ ├── varint.hpp │ │ │ └── version.hpp │ └── tools │ │ ├── CMakeLists.txt │ │ └── pbf-decoder.cpp ├── rapidjson │ ├── .gitattributes │ ├── .gitignore │ ├── .gitmodules │ ├── .travis.yml │ ├── CHANGELOG.md │ ├── CMakeLists.txt │ ├── CMakeModules │ │ └── FindGTestSrc.cmake │ ├── RapidJSON.pc.in │ ├── RapidJSONConfig.cmake.in │ ├── RapidJSONConfigVersion.cmake.in │ ├── appveyor.yml │ ├── bin │ │ ├── data │ │ │ ├── abcde.txt │ │ │ ├── glossary.json │ │ │ ├── menu.json │ │ │ ├── readme.txt │ │ │ ├── sample.json │ │ │ ├── webapp.json │ │ │ └── widget.json │ │ ├── draft-04 │ │ │ └── schema │ │ ├── encodings │ │ │ ├── utf16be.json │ │ │ ├── utf16bebom.json │ │ │ ├── utf16le.json │ │ │ ├── utf16lebom.json │ │ │ ├── utf32be.json │ │ │ ├── utf32bebom.json │ │ │ ├── utf32le.json │ │ │ ├── utf32lebom.json │ │ │ ├── utf8.json │ │ │ └── utf8bom.json │ │ ├── jsonchecker │ │ │ ├── fail1.json │ │ │ ├── fail10.json │ │ │ ├── fail11.json │ │ │ ├── fail12.json │ │ │ ├── fail13.json │ │ │ ├── fail14.json │ │ │ ├── fail15.json │ │ │ ├── fail16.json │ │ │ ├── fail17.json │ │ │ ├── fail18.json │ │ │ ├── fail19.json │ │ │ ├── fail2.json │ │ │ ├── fail20.json │ │ │ ├── fail21.json │ │ │ ├── fail22.json │ │ │ ├── fail23.json │ │ │ ├── fail24.json │ │ │ ├── fail25.json │ │ │ ├── fail26.json │ │ │ ├── fail27.json │ │ │ ├── fail28.json │ │ │ ├── fail29.json │ │ │ ├── fail3.json │ │ │ ├── fail30.json │ │ │ ├── fail31.json │ │ │ ├── fail32.json │ │ │ ├── fail33.json │ │ │ ├── fail4.json │ │ │ ├── fail5.json │ │ │ ├── fail6.json │ │ │ ├── fail7.json │ │ │ ├── fail8.json │ │ │ ├── fail9.json │ │ │ ├── pass1.json │ │ │ ├── pass2.json │ │ │ ├── pass3.json │ │ │ └── readme.txt │ │ ├── jsonschema │ │ │ ├── .gitignore │ │ │ ├── .travis.yml │ │ │ ├── LICENSE │ │ │ ├── README.md │ │ │ ├── bin │ │ │ │ └── jsonschema_suite │ │ │ ├── remotes │ │ │ │ ├── folder │ │ │ │ │ └── folderInteger.json │ │ │ │ ├── integer.json │ │ │ │ └── subSchemas.json │ │ │ ├── tests │ │ │ │ ├── draft3 │ │ │ │ │ ├── additionalItems.json │ │ │ │ │ ├── additionalProperties.json │ │ │ │ │ ├── default.json │ │ │ │ │ ├── dependencies.json │ │ │ │ │ ├── disallow.json │ │ │ │ │ ├── divisibleBy.json │ │ │ │ │ ├── enum.json │ │ │ │ │ ├── extends.json │ │ │ │ │ ├── items.json │ │ │ │ │ ├── maxItems.json │ │ │ │ │ ├── maxLength.json │ │ │ │ │ ├── maximum.json │ │ │ │ │ ├── minItems.json │ │ │ │ │ ├── minLength.json │ │ │ │ │ ├── minimum.json │ │ │ │ │ ├── optional │ │ │ │ │ │ ├── bignum.json │ │ │ │ │ │ ├── format.json │ │ │ │ │ │ ├── jsregex.json │ │ │ │ │ │ └── zeroTerminatedFloats.json │ │ │ │ │ ├── pattern.json │ │ │ │ │ ├── patternProperties.json │ │ │ │ │ ├── properties.json │ │ │ │ │ ├── ref.json │ │ │ │ │ ├── refRemote.json │ │ │ │ │ ├── required.json │ │ │ │ │ ├── type.json │ │ │ │ │ └── uniqueItems.json │ │ │ │ └── draft4 │ │ │ │ │ ├── additionalItems.json │ │ │ │ │ ├── additionalProperties.json │ │ │ │ │ ├── allOf.json │ │ │ │ │ ├── anyOf.json │ │ │ │ │ ├── default.json │ │ │ │ │ ├── definitions.json │ │ │ │ │ ├── dependencies.json │ │ │ │ │ ├── enum.json │ │ │ │ │ ├── items.json │ │ │ │ │ ├── maxItems.json │ │ │ │ │ ├── maxLength.json │ │ │ │ │ ├── maxProperties.json │ │ │ │ │ ├── maximum.json │ │ │ │ │ ├── minItems.json │ │ │ │ │ ├── minLength.json │ │ │ │ │ ├── minProperties.json │ │ │ │ │ ├── minimum.json │ │ │ │ │ ├── multipleOf.json │ │ │ │ │ ├── not.json │ │ │ │ │ ├── oneOf.json │ │ │ │ │ ├── optional │ │ │ │ │ ├── bignum.json │ │ │ │ │ ├── format.json │ │ │ │ │ └── zeroTerminatedFloats.json │ │ │ │ │ ├── pattern.json │ │ │ │ │ ├── patternProperties.json │ │ │ │ │ ├── properties.json │ │ │ │ │ ├── ref.json │ │ │ │ │ ├── refRemote.json │ │ │ │ │ ├── required.json │ │ │ │ │ ├── type.json │ │ │ │ │ └── uniqueItems.json │ │ │ └── tox.ini │ │ ├── types │ │ │ ├── alotofkeys.json │ │ │ ├── booleans.json │ │ │ ├── floats.json │ │ │ ├── guids.json │ │ │ ├── integers.json │ │ │ ├── mixed.json │ │ │ ├── nulls.json │ │ │ ├── paragraphs.json │ │ │ └── readme.txt │ │ └── unittestschema │ │ │ ├── address.json │ │ │ ├── allOf_address.json │ │ │ ├── anyOf_address.json │ │ │ ├── idandref.json │ │ │ └── oneOf_address.json │ ├── contrib │ │ └── natvis │ │ │ ├── LICENSE │ │ │ ├── README.md │ │ │ └── rapidjson.natvis │ ├── doc │ │ ├── CMakeLists.txt │ │ ├── Doxyfile.in │ │ ├── Doxyfile.zh-cn.in │ │ ├── diagram │ │ │ ├── architecture.dot │ │ │ ├── architecture.png │ │ │ ├── insituparsing.dot │ │ │ ├── insituparsing.png │ │ │ ├── iterative-parser-states-diagram.dot │ │ │ ├── iterative-parser-states-diagram.png │ │ │ ├── makefile │ │ │ ├── move1.dot │ │ │ ├── move1.png │ │ │ ├── move2.dot │ │ │ ├── move2.png │ │ │ ├── move3.dot │ │ │ ├── move3.png │ │ │ ├── normalparsing.dot │ │ │ ├── normalparsing.png │ │ │ ├── simpledom.dot │ │ │ ├── simpledom.png │ │ │ ├── tutorial.dot │ │ │ ├── tutorial.png │ │ │ ├── utilityclass.dot │ │ │ └── utilityclass.png │ │ ├── dom.md │ │ ├── dom.zh-cn.md │ │ ├── encoding.md │ │ ├── encoding.zh-cn.md │ │ ├── faq.md │ │ ├── faq.zh-cn.md │ │ ├── features.md │ │ ├── features.zh-cn.md │ │ ├── internals.md │ │ ├── internals.zh-cn.md │ │ ├── logo │ │ │ ├── rapidjson.png │ │ │ └── rapidjson.svg │ │ ├── misc │ │ │ ├── DoxygenLayout.xml │ │ │ ├── doxygenextra.css │ │ │ ├── footer.html │ │ │ └── header.html │ │ ├── npm.md │ │ ├── performance.md │ │ ├── performance.zh-cn.md │ │ ├── pointer.md │ │ ├── pointer.zh-cn.md │ │ ├── sax.md │ │ ├── sax.zh-cn.md │ │ ├── schema.md │ │ ├── schema.zh-cn.md │ │ ├── stream.md │ │ ├── stream.zh-cn.md │ │ ├── tutorial.md │ │ └── tutorial.zh-cn.md │ ├── docker │ │ └── debian │ │ │ └── Dockerfile │ ├── example │ │ ├── CMakeLists.txt │ │ ├── archiver │ │ │ ├── archiver.cpp │ │ │ ├── archiver.h │ │ │ └── archivertest.cpp │ │ ├── capitalize │ │ │ └── capitalize.cpp │ │ ├── condense │ │ │ └── condense.cpp │ │ ├── filterkey │ │ │ └── filterkey.cpp │ │ ├── filterkeydom │ │ │ └── filterkeydom.cpp │ │ ├── jsonx │ │ │ └── jsonx.cpp │ │ ├── lookaheadparser │ │ │ └── lookaheadparser.cpp │ │ ├── messagereader │ │ │ └── messagereader.cpp │ │ ├── parsebyparts │ │ │ └── parsebyparts.cpp │ │ ├── pretty │ │ │ └── pretty.cpp │ │ ├── prettyauto │ │ │ └── prettyauto.cpp │ │ ├── schemavalidator │ │ │ └── schemavalidator.cpp │ │ ├── serialize │ │ │ └── serialize.cpp │ │ ├── simpledom │ │ │ └── simpledom.cpp │ │ ├── simplepullreader │ │ │ └── simplepullreader.cpp │ │ ├── simplereader │ │ │ └── simplereader.cpp │ │ ├── simplewriter │ │ │ └── simplewriter.cpp │ │ ├── sortkeys │ │ │ └── sortkeys.cpp │ │ ├── traverseaspointer.cpp │ │ └── tutorial │ │ │ └── tutorial.cpp │ ├── include │ │ └── rapidjson │ │ │ ├── allocators.h │ │ │ ├── cursorstreamwrapper.h │ │ │ ├── document.h │ │ │ ├── encodedstream.h │ │ │ ├── encodings.h │ │ │ ├── error │ │ │ ├── en.h │ │ │ └── error.h │ │ │ ├── filereadstream.h │ │ │ ├── filewritestream.h │ │ │ ├── fwd.h │ │ │ ├── internal │ │ │ ├── biginteger.h │ │ │ ├── clzll.h │ │ │ ├── diyfp.h │ │ │ ├── dtoa.h │ │ │ ├── ieee754.h │ │ │ ├── itoa.h │ │ │ ├── meta.h │ │ │ ├── pow10.h │ │ │ ├── regex.h │ │ │ ├── stack.h │ │ │ ├── strfunc.h │ │ │ ├── strtod.h │ │ │ └── swap.h │ │ │ ├── istreamwrapper.h │ │ │ ├── memorybuffer.h │ │ │ ├── memorystream.h │ │ │ ├── msinttypes │ │ │ ├── inttypes.h │ │ │ └── stdint.h │ │ │ ├── ostreamwrapper.h │ │ │ ├── pointer.h │ │ │ ├── prettywriter.h │ │ │ ├── rapidjson.h │ │ │ ├── reader.h │ │ │ ├── schema.h │ │ │ ├── stream.h │ │ │ ├── stringbuffer.h │ │ │ ├── uri.h │ │ │ └── writer.h │ ├── include_dirs.js │ ├── library.json │ ├── license.txt │ ├── package.json │ ├── rapidjson.autopkg │ ├── readme.md │ ├── readme.zh-cn.md │ ├── test │ │ ├── CMakeLists.txt │ │ ├── perftest │ │ │ ├── CMakeLists.txt │ │ │ ├── misctest.cpp │ │ │ ├── perftest.cpp │ │ │ ├── perftest.h │ │ │ ├── platformtest.cpp │ │ │ ├── rapidjsontest.cpp │ │ │ └── schematest.cpp │ │ ├── unittest │ │ │ ├── CMakeLists.txt │ │ │ ├── allocatorstest.cpp │ │ │ ├── bigintegertest.cpp │ │ │ ├── clzlltest.cpp │ │ │ ├── cursorstreamwrappertest.cpp │ │ │ ├── documenttest.cpp │ │ │ ├── dtoatest.cpp │ │ │ ├── encodedstreamtest.cpp │ │ │ ├── encodingstest.cpp │ │ │ ├── filestreamtest.cpp │ │ │ ├── fwdtest.cpp │ │ │ ├── istreamwrappertest.cpp │ │ │ ├── itoatest.cpp │ │ │ ├── jsoncheckertest.cpp │ │ │ ├── namespacetest.cpp │ │ │ ├── ostreamwrappertest.cpp │ │ │ ├── platformtest.cpp │ │ │ ├── pointertest.cpp │ │ │ ├── prettywritertest.cpp │ │ │ ├── readertest.cpp │ │ │ ├── regextest.cpp │ │ │ ├── schematest.cpp │ │ │ ├── simdtest.cpp │ │ │ ├── strfunctest.cpp │ │ │ ├── stringbuffertest.cpp │ │ │ ├── strtodtest.cpp │ │ │ ├── unittest.cpp │ │ │ ├── unittest.h │ │ │ ├── uritest.cpp │ │ │ ├── valuetest.cpp │ │ │ └── writertest.cpp │ │ └── valgrind.supp │ └── travis-doxygen.sh ├── sol2 │ └── include │ │ └── sol │ │ ├── config.hpp │ │ ├── forward.hpp │ │ └── sol.hpp └── vtzero │ ├── .clang-tidy │ ├── .gitignore │ ├── .gitmodules │ ├── .travis.yml │ ├── .ycm_extra_conf.py │ ├── CHANGELOG.md │ ├── CMakeLists.txt │ ├── CONTRIBUTING.md │ ├── EXTERNAL_LICENSES.txt │ ├── LICENSE │ ├── README.md │ ├── appveyor.yml │ ├── build-appveyor.bat │ ├── build-msys2.bat │ ├── cmake │ └── FindProtozero.cmake │ ├── codecov.yml │ ├── doc │ ├── CMakeLists.txt │ ├── Doxyfile.in │ ├── advanced.md │ ├── doc.md │ ├── reading.md │ ├── tutorial.md │ └── writing.md │ ├── examples │ ├── CMakeLists.txt │ ├── utils.cpp │ ├── utils.hpp │ ├── vtzero-check.cpp │ ├── vtzero-create.cpp │ ├── vtzero-encode-geom.cpp │ ├── vtzero-filter.cpp │ ├── vtzero-show.cpp │ ├── vtzero-stats.cpp │ └── vtzero-streets.cpp │ ├── include-external │ └── clara.hpp │ ├── include │ └── vtzero │ │ ├── builder.hpp │ │ ├── builder_impl.hpp │ │ ├── encoded_property_value.hpp │ │ ├── exception.hpp │ │ ├── feature.hpp │ │ ├── feature_builder_impl.hpp │ │ ├── geometry.hpp │ │ ├── index.hpp │ │ ├── layer.hpp │ │ ├── output.hpp │ │ ├── property.hpp │ │ ├── property_mapper.hpp │ │ ├── property_value.hpp │ │ ├── types.hpp │ │ ├── vector_tile.hpp │ │ └── version.hpp │ └── test │ ├── CMakeLists.txt │ ├── catch │ └── catch.hpp │ ├── data │ └── mapbox-streets-v6-14-8714-8017.mvt │ ├── fixture_tests.cpp │ ├── include │ └── test.hpp │ ├── t │ ├── test_builder.cpp │ ├── test_builder_linestring.cpp │ ├── test_builder_point.cpp │ ├── test_builder_polygon.cpp │ ├── test_exceptions.cpp │ ├── test_feature.cpp │ ├── test_geometry.cpp │ ├── test_geometry_linestring.cpp │ ├── test_geometry_point.cpp │ ├── test_geometry_polygon.cpp │ ├── test_index.cpp │ ├── test_layer.cpp │ ├── test_output.cpp │ ├── test_point.cpp │ ├── test_property_map.cpp │ ├── test_property_value.cpp │ ├── test_types.cpp │ └── test_vector_tile.cpp │ └── test_main.cpp └── unit_tests ├── CMakeLists.txt ├── common ├── range_tools.hpp └── temporary_file.hpp ├── contractor ├── contracted_edge_container.cpp ├── files.cpp ├── graph_contractor.cpp └── helper.hpp ├── contractor_tests.cpp ├── customizer └── cell_customization.cpp ├── customizer_tests.cpp ├── engine ├── base64.cpp ├── collapse_internal_route_result.cpp ├── douglas_peucker.cpp ├── geometry_string.cpp ├── guidance_assembly.cpp ├── json_factory.cpp ├── offline_facade.cpp ├── polyline_compressor.cpp └── tidy.cpp ├── engine_tests.cpp ├── extractor ├── compressed_edge_container.cpp ├── graph_compressor.cpp ├── intersection_analysis_tests.cpp ├── location_dependent_data_tests.cpp ├── name_table.cpp ├── raster_source.cpp └── restriction_graph.cpp ├── extractor_tests.cpp ├── fixtures └── raster_data.asc ├── library ├── algorithm.cpp ├── contract.cpp ├── coordinates.hpp ├── customize.cpp ├── equal_json.hpp ├── extract.cpp ├── fixture.hpp ├── json.cpp ├── limits.cpp ├── match.cpp ├── nearest.cpp ├── options.cpp ├── partition.cpp ├── route.cpp ├── table.cpp ├── tile.cpp ├── trip.cpp └── waypoint_check.hpp ├── library_tests.cpp ├── mocks ├── mock_datafacade.hpp └── mock_scripting_environment.hpp ├── partitioner ├── bisection_graph.cpp ├── bisection_graph_view.cpp ├── bisection_to_partition.cpp ├── cell_storage.cpp ├── dinic.cpp ├── graph_generator.hpp ├── multi_level_graph.cpp ├── multi_level_partition.cpp ├── recursive_bisection.cpp ├── remove_unconnected.cpp ├── renumber.cpp ├── reorder_first_last.cpp └── scc_integration.cpp ├── partitioner_tests.cpp ├── server ├── parameters_io.hpp ├── parameters_parser.cpp └── url_parser.cpp ├── server_tests.cpp ├── storage ├── data_layout.cpp ├── serialization.cpp └── tar.cpp ├── storage_tests.cpp ├── updater ├── test.geojson ├── timezoner.cpp └── validation.cpp ├── updater_tests.cpp ├── util ├── bearing.cpp ├── binary_heap.cpp ├── bit_range.cpp ├── conditional_restrictions_parsing.cpp ├── connectivity_checksum.cpp ├── coordinate_calculation.cpp ├── d_ary_heap.cpp ├── duration_parsing.cpp ├── dynamic_graph.cpp ├── filtered_integer_range.cpp ├── group_by.cpp ├── hilbert_values.cpp ├── indexed_data.cpp ├── io.cpp ├── json_render.cpp ├── opening_hours_parsing.cpp ├── packed_vector.cpp ├── permutation.cpp ├── query_heap.cpp ├── range_table.cpp ├── rectangle.cpp ├── serialization.cpp ├── static_graph.cpp ├── static_rtree.cpp ├── string_util.cpp ├── vector_view.cpp ├── viewport.cpp └── web_mercator.cpp └── util_tests.cpp /.babelrc: -------------------------------------------------------------------------------- 1 | { 2 | "plugins": ["transform-class-properties"], 3 | "presets": [ 4 | "@babel/preset-env", 5 | "@babel/preset-react" 6 | ] 7 | } 8 | -------------------------------------------------------------------------------- /.cncc.style: -------------------------------------------------------------------------------- 1 | # Kind-specific patterns to check AST nodes against. Both python-clang and 2 | # libclang docs explain CursorKind, with differences in detail. See also: 3 | # - https://github.com/llvm-mirror/clang/blob/aca4fe314a55cacae29e1548cb7bfd2119c6df4c/bindings/python/clang/cindex.py#L599 4 | # - http://clang.llvm.org/doxygen/group__CINDEX.html#gaaccc432245b4cd9f2d470913f9ef0013 5 | # - https://docs.python.org/2/library/re.html#regular-expression-syntax 6 | 7 | class_decl: '^([A-Z]+[a-z]+)+$' 8 | struct_decl: '^([A-Z]+[a-z]+)+$' 9 | field_decl: '^[a-z_]+$' 10 | var_decl: '^[a-z]+[a-z0-9_]*$' 11 | parm_decl: '^[a-z]*[a-z0-9_]*$' 12 | namespace: '^[a-z_]*$' 13 | cxx_method: '^([A-Z]+[a-z]+)+$' 14 | function_decl: '^[a-z]+([A-Z]+[a-z]+)*$' 15 | -------------------------------------------------------------------------------- /.dockerignore: -------------------------------------------------------------------------------- 1 | test 2 | build 3 | -------------------------------------------------------------------------------- /.editorconfig: -------------------------------------------------------------------------------- 1 | # EditorConfig is awesome: http://EditorConfig.org 2 | # 3 | # NOTE: Keep settings in sync with the master .clang-format file 4 | # 5 | # top-most EditorConfig file 6 | root = true 7 | 8 | # CMake configuration files 9 | [{CMakeLists.txt,CMakeSettings.json,*.cmake}] 10 | indent_size = 2 11 | indent_style = space 12 | trim_trailing_whitespace = true 13 | 14 | # CI configuration files 15 | [{.travis.yml,appveyor.yml}] 16 | indent_size = 2 17 | indent_style = space 18 | trim_trailing_whitespace = true 19 | 20 | # Unix shell scripts 21 | [*.sh] 22 | end_of_line = lf 23 | indent_style = space 24 | trim_trailing_whitespace = true 25 | 26 | # Windows shell scripts 27 | [*.bat] 28 | end_of_line = crlf 29 | indent_style = space 30 | trim_trailing_whitespace = true 31 | -------------------------------------------------------------------------------- /.gitattributes: -------------------------------------------------------------------------------- 1 | # Set the default behavior, in case people don't have core.autocrlf set. 2 | * text=auto 3 | 4 | # Explicitly declare text files you want to always be normalized and converted 5 | # to native line endings on checkout. 6 | *.cpp text 7 | *.hpp text 8 | 9 | # Declare files that will always have CRLF line endings on checkout. 10 | *.bat text eol=crlf 11 | *.cmd text eol=crlf 12 | *.ps1 text eol=crlf 13 | 14 | # Declare files that will always have LF line endings on checkout. 15 | *.sh text eol=lf 16 | 17 | # https://eslint.org/docs/latest/rules/linebreak-style#using-this-rule-with-version-control-systems 18 | *.js text eol=lf 19 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/feature.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Feature Request 3 | about: Request a new feature in osrm-backend 4 | labels: Feature Request 5 | --- 6 | 7 | # Feature 8 | 9 | Please describe the feature you would like to see in OSRM. 10 | Images are often a good way to illustrate your requested feature. 11 | -------------------------------------------------------------------------------- /.gitmodules: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Project-OSRM/osrm-backend/560ed5c0e82d7bd6a0887eb58188bf4fa8662372/.gitmodules -------------------------------------------------------------------------------- /.npmignore: -------------------------------------------------------------------------------- 1 | * 2 | !README.md 3 | !CHANGELOG.md 4 | !CONTRIBUTING.MD 5 | !LICENCE.TXT 6 | !package.json 7 | !package-lock.json 8 | !yarn.lock 9 | !docs 10 | !example 11 | !taginfo.json 12 | !lib/*.js 13 | !profiles/* 14 | !profiles/lib/* 15 | !profiles/examples/* 16 | !scripts/node_install.sh 17 | -------------------------------------------------------------------------------- /CODE-OF-CONDUCT.md: -------------------------------------------------------------------------------- 1 | # Code of conduct 2 | 3 | Everyone is invited to participate in Project OSRM’s open source projects and public discussions: we want to create a welcoming and friendly environment. Harassment of participants or other unethical and unprofessional behavior will not be tolerated in our spaces. The [Contributor Covenant](http://contributor-covenant.org) applies to all projects under the Project-OSRM organization and we ask that you please read [the full text](http://contributor-covenant.org/version/1/2/0/). 4 | -------------------------------------------------------------------------------- /cmake/FindDebArch.cmake: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (C) 2013 Emmanuel Roullit 3 | # 4 | 5 | IF(NOT CPACK_DEBIAN_PACKAGE_ARCHITECTURE) 6 | FIND_PROGRAM(DPKG_CMD dpkg) 7 | IF(NOT DPKG_CMD) 8 | EXECUTE_PROCESS(COMMAND uname -p 9 | OUTPUT_VARIABLE CPACK_DEBIAN_PACKAGE_ARCHITECTURE 10 | OUTPUT_STRIP_TRAILING_WHITESPACE 11 | ) 12 | MESSAGE(STATUS "Can not find dpkg in your path, default to uname -p: ${CPACK_DEBIAN_PACKAGE_ARCHITECTURE}.") 13 | ELSE(NOT DPKG_CMD) 14 | EXECUTE_PROCESS(COMMAND "${DPKG_CMD}" --print-architecture 15 | OUTPUT_VARIABLE CPACK_DEBIAN_PACKAGE_ARCHITECTURE 16 | OUTPUT_STRIP_TRAILING_WHITESPACE 17 | ) 18 | ENDIF(NOT DPKG_CMD) 19 | ENDIF(NOT CPACK_DEBIAN_PACKAGE_ARCHITECTURE) 20 | -------------------------------------------------------------------------------- /cmake/pkgconfig.in: -------------------------------------------------------------------------------- 1 | prefix=@CMAKE_INSTALL_PREFIX@ 2 | includedir=@PKGCONFIG_INCLUDE_DIR@ 3 | libdir=@PKGCONFIG_LIBRARY_DIR@ 4 | 5 | Name: libOSRM 6 | Description: Project OSRM library 7 | Version: @OSRM_VERSION@ 8 | Requires: 9 | Libs: -L${libdir} -losrm @PKGCONFIG_OSRM_LDFLAGS@ 10 | Libs.private: @PKGCONFIG_OSRM_DEPENDENT_LIBRARIES@ 11 | Cflags: @PKGCONFIG_OSRM_INCLUDE_FLAGS@ @PKGCONFIG_OSRM_CXXFLAGS@ 12 | -------------------------------------------------------------------------------- /cucumber.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | default: '--strict --tags ~@stress --tags ~@todo --tags ~@mld --require features/support --require features/step_definitions', 3 | ch: '--strict --tags ~@stress --tags ~@todo --tags ~@mld -f progress --require features/support --require features/step_definitions', 4 | todo: '--strict --tags @todo --require features/support --require features/step_definitions', 5 | all: '--strict --require features/support --require features/step_definitions', 6 | mld: '--strict --tags ~@stress --tags ~@todo --tags ~@ch --require features/support --require features/step_definitions -f progress' 7 | }; 8 | -------------------------------------------------------------------------------- /docker/Dockerfile: -------------------------------------------------------------------------------- 1 | Dockerfile-debian -------------------------------------------------------------------------------- /docker/hooks/build: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # We've placed the Dockerfile under docker/ so that the generically named 4 | # hooks/ directory doesn't pollute the main directory. Because we need to 5 | # COPY the source into the container, we need to use some -f gymnastics to 6 | # ensure that "COPY . /src" is referring to the repo root, not the directory 7 | # that contains the Dockerfile. 8 | # This script gets executed with a pwd of wherever the Dockerfile is. 9 | 10 | DOCKER_BUILD="docker build --build-arg BUILD_CONCURRENCY=${CONCURRENCY} --build-arg DOCKER_TAG=${DOCKER_TAG:?unset} -t ${IMAGE_NAME:?unset} -f" 11 | 12 | $DOCKER_BUILD Dockerfile .. 13 | $DOCKER_BUILD Dockerfile-alpine .. 14 | -------------------------------------------------------------------------------- /docs/images/example-tile-response.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Project-OSRM/osrm-backend/560ed5c0e82d7bd6a0887eb58188bf4fa8662372/docs/images/example-tile-response.png -------------------------------------------------------------------------------- /docs/routed.md: -------------------------------------------------------------------------------- 1 | ## Environment Variables 2 | 3 | ### SIGNAL_PARENT_WHEN_READY 4 | 5 | If the SIGNAL_PARENT_WHEN_READY environment variable is set osrm-routed will 6 | send the USR1 signal to its parent when it will be running and waiting for 7 | requests. This could be used to upgrade osrm-routed to a new binary on the fly 8 | without any service downtime - no incoming requests will be lost. 9 | 10 | ### DISABLE_ACCESS_LOGGING 11 | 12 | If the DISABLE_ACCESS_LOGGING environment variable is set osrm-routed will 13 | **not** log any http requests to standard output. This can be useful in high 14 | traffic setup. 15 | -------------------------------------------------------------------------------- /docs/src/content.js: -------------------------------------------------------------------------------- 1 | var fs = require('fs'); 2 | 3 | /** 4 | * This file exports the content of your website, as a bunch of concatenated 5 | * Markdown files. By doing this explicitly, you can control the order 6 | * of content without any level of abstraction. 7 | * 8 | * Using the brfs module, fs.readFileSync calls in this file are translated 9 | * into strings of those files' content before the file is delivered to a 10 | * browser: the content is read ahead-of-time and included in bundle.js. 11 | */ 12 | module.exports = 13 | '# HTTP API\n' + 14 | fs.readFileSync('./content/http.md', 'utf8') + '\n'; 15 | -------------------------------------------------------------------------------- /docs/src/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | OSRM API Documentation 7 | 8 | 9 | 10 | 11 | 12 | 13 |
14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /eslint.config.js: -------------------------------------------------------------------------------- 1 | const { Linter } = require("eslint"); 2 | 3 | /** @type {Linter.Config} */ 4 | const config = [ 5 | { 6 | rules: { 7 | indent: ["error", 2], 8 | quotes: ["warn", "single"], 9 | "linebreak-style": ["error", "unix"], 10 | semi: ["error", "always"], 11 | "no-console": ["warn"] 12 | }, 13 | languageOptions: { 14 | globals: { 15 | es6: true, 16 | node: true 17 | } 18 | }, 19 | ignores: [ 20 | "node_modules/", 21 | "build/", 22 | "dist/", 23 | "coverage/" 24 | ] 25 | } 26 | ]; 27 | 28 | module.exports = config; 29 | -------------------------------------------------------------------------------- /features/car/avoid.feature: -------------------------------------------------------------------------------- 1 | @routing @car @way 2 | Feature: Car - Avoid defined areas 3 | 4 | Background: 5 | Given the profile file "car" initialized with 6 | """ 7 | profile.avoid = Set { 'motorway', 'motorway_link' } 8 | profile.speeds = Sequence { 9 | highway = { 10 | motorway = 90, 11 | motorway_link = 45, 12 | primary = 50 13 | } 14 | } 15 | """ 16 | 17 | Scenario: Car - Avoid motorways 18 | Then routability should be 19 | | highway | bothw | 20 | | motorway | | 21 | | motorway_link | | 22 | | primary | x | 23 | 24 | -------------------------------------------------------------------------------- /features/car/service.feature: -------------------------------------------------------------------------------- 1 | @routing @car @surface 2 | Feature: Car - Surfaces 3 | 4 | Background: 5 | Given the profile "car" 6 | 7 | Scenario: Car - Ways tagged service should reduce speed 8 | Then routability should be 9 | | highway | service | forw | backw | forw_rate | 10 | | service | alley | 15 km/h +-1 | 15 km/h +-1 | 2.1 | 11 | | service | emergency_access | | | | 12 | | service | driveway | 15 km/h +-1 | 15 km/h +-1 | 2.1 | 13 | | service | drive-through | 15 km/h +-1 | 15 km/h +-1 | 2.1 | 14 | | service | parking | 15 km/h +-1 | 15 km/h +-1 | 2.1 | 15 | -------------------------------------------------------------------------------- /features/foot/surface.feature: -------------------------------------------------------------------------------- 1 | @routing @foot @surface 2 | Feature: Foot - Surfaces 3 | 4 | Background: 5 | Given the profile "foot" 6 | 7 | Scenario: Foot - Slow surfaces 8 | Then routability should be 9 | | highway | surface | bothw | 10 | | footway | | 145 s ~10% | 11 | | footway | fine_gravel | 193 s ~10% | 12 | | footway | gravel | 193 s ~10% | 13 | | footway | pebblestone | 193 s ~10% | 14 | | footway | mud | 289 s ~10% | 15 | | footway | sand | 289 s ~10% | 16 | -------------------------------------------------------------------------------- /features/guidance/turn-location.feature: -------------------------------------------------------------------------------- 1 | @routing @guidance 2 | Feature: Turn Location Feature 3 | 4 | Background: 5 | Given the profile "car" 6 | Given a grid size of 10 meters 7 | 8 | Scenario: Simple feature to test turn locations 9 | Given the node map 10 | """ 11 | c 12 | a b d 13 | """ 14 | 15 | And the ways 16 | | nodes | highway | 17 | | ab | primary | 18 | | cb | primary | 19 | | db | primary | 20 | 21 | When I route I should get 22 | | waypoints | route | turns | locations | 23 | | a,c | ab,cb,cb | depart,turn left,arrive | a,b,c | 24 | -------------------------------------------------------------------------------- /features/lib/try_connect.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | const net = require('net'); 4 | 5 | module.exports = function tryConnect(host, port, callback) { 6 | net.connect({ port: port, host: host }) 7 | .on('connect', () => { callback(); }) 8 | .on('error', () => { 9 | callback(new Error('Could not connect.')); 10 | }); 11 | } 12 | 13 | -------------------------------------------------------------------------------- /features/options/customize/invalid.feature: -------------------------------------------------------------------------------- 1 | @prepare @options @invalid 2 | Feature: osrm-customize command line options: invalid options 3 | 4 | Background: 5 | Given the profile "testbot" 6 | And the node map 7 | """ 8 | a b 9 | """ 10 | And the ways 11 | | nodes | 12 | | ab | 13 | And the data has been extracted 14 | 15 | Scenario: osrm-customize - Non-existing option 16 | When I try to run "osrm-customize --fly-me-to-the-moon" 17 | Then stdout should be empty 18 | And stderr should contain "option" 19 | And stderr should contain "fly-me-to-the-moon" 20 | And it should exit with an error 21 | -------------------------------------------------------------------------------- /features/options/extract/invalid.feature: -------------------------------------------------------------------------------- 1 | @extract @options @invalid 2 | Feature: osrm-extract command line options: invalid options 3 | 4 | Background: 5 | Given the profile "testbot" 6 | 7 | Scenario: osrm-extract - Non-existing option 8 | When I try to run "osrm-extract --fly-me-to-the-moon" 9 | Then stdout should be empty 10 | And stderr should contain "option" 11 | And stderr should contain "fly-me-to-the-moon" 12 | And it should exit with an error 13 | -------------------------------------------------------------------------------- /features/step_definitions/routing.js: -------------------------------------------------------------------------------- 1 | var d3 = require('d3-queue'); 2 | 3 | module.exports = function () { 4 | this.When(/^I route I should get$/, this.WhenIRouteIShouldGet); 5 | 6 | this.When(/^I route (\d+) times I should get$/, { timeout: 100 * this.TIMEOUT }, (n, table, callback) => { 7 | var q = d3.queue(1); 8 | 9 | for (var i=0; i { 17 | this.queryParams['skip_waypoints'] = true; 18 | callback(); 19 | }); 20 | }; 21 | -------------------------------------------------------------------------------- /features/step_definitions/timestamp.js: -------------------------------------------------------------------------------- 1 | var assert = require('assert'); 2 | 3 | module.exports = function () { 4 | this.Then(/^I should get a valid timestamp/, (callback) => { 5 | this.ShouldGetAResponse(); 6 | this.ShouldBeValidJSON((err) => { 7 | this.ShouldBeWellFormed(); 8 | assert.equal(typeof this.json.timestamp, 'string'); 9 | assert.equal(this.json.timestamp, '2000-01-01T00:00:00Z'); 10 | callback(err); 11 | }); 12 | }); 13 | }; 14 | -------------------------------------------------------------------------------- /features/support/fuzzy.js: -------------------------------------------------------------------------------- 1 | var classes = require('./data_classes'); 2 | 3 | module.exports = function() { 4 | this.FuzzyMatch = new classes.FuzzyMatch(); 5 | }; 6 | -------------------------------------------------------------------------------- /features/testbot/compression.feature: -------------------------------------------------------------------------------- 1 | @routing @graph @testbot 2 | Feature: Geometry Compression 3 | 4 | Background: 5 | Given the profile "testbot" 6 | 7 | Scenario: Compressed segments have correct order 8 | Given the node map 9 | """ 10 | a d h 11 | b e f 12 | c g 13 | """ 14 | 15 | And the ways 16 | | nodes | 17 | | abcdef | 18 | | fh | 19 | | fg | 20 | 21 | When I route I should get 22 | | from | to | route | distance | speed | 23 | | b | e | abcdef,abcdef | 588.7m | 36 km/h | 24 | | e | b | abcdef,abcdef | 588.7m | 36 km/h | 25 | -------------------------------------------------------------------------------- /features/testbot/opposite.feature: -------------------------------------------------------------------------------- 1 | @routing @testbot @opposite 2 | Feature: Separate settings for forward/backward direction 3 | 4 | Background: 5 | Given the profile "testbot" 6 | 7 | Scenario: Testbot - Going against the flow 8 | Given the node map 9 | """ 10 | a b c d 11 | """ 12 | 13 | And the ways 14 | | nodes | highway | 15 | | abcd | river | 16 | 17 | When I route I should get 18 | | from | to | route | distance | speed | 19 | | a | d | abcd,abcd | 300 +- 1m | 36 km/h | 20 | | d | a | abcd,abcd | 300 +- 1m | 16 km/h +- 1 | 21 | -------------------------------------------------------------------------------- /fuzz/escape_json.cc: -------------------------------------------------------------------------------- 1 | #include "util/string_util.hpp" 2 | 3 | #include "util.hpp" 4 | 5 | #include 6 | #include 7 | 8 | using osrm::util::EscapeJSONString; 9 | 10 | extern "C" int LLVMFuzzerTestOneInput(const unsigned char *data, unsigned long size) 11 | { 12 | const std::string in(reinterpret_cast(data), size); 13 | 14 | std::string escaped; 15 | EscapeJSONString(in, escaped); 16 | escape(escaped.data()); 17 | 18 | return 0; 19 | } 20 | -------------------------------------------------------------------------------- /fuzz/match_parameters.cc: -------------------------------------------------------------------------------- 1 | #include "engine/api/match_parameters.hpp" 2 | #include "server/api/parameters_parser.hpp" 3 | 4 | #include "util.hpp" 5 | 6 | #include 7 | #include 8 | 9 | using osrm::server::api::parseParameters; 10 | using osrm::engine::api::MatchParameters; 11 | 12 | extern "C" int LLVMFuzzerTestOneInput(const unsigned char *data, unsigned long size) 13 | { 14 | std::string in(reinterpret_cast(data), size); 15 | 16 | auto first = begin(in); 17 | const auto last = end(in); 18 | 19 | const auto param = parseParameters(first, last); 20 | escape(¶m); 21 | 22 | return 0; 23 | } 24 | -------------------------------------------------------------------------------- /fuzz/nearest_parameters.cc: -------------------------------------------------------------------------------- 1 | #include "engine/api/nearest_parameters.hpp" 2 | #include "server/api/parameters_parser.hpp" 3 | 4 | #include "util.hpp" 5 | 6 | #include 7 | #include 8 | 9 | using osrm::server::api::parseParameters; 10 | using osrm::engine::api::NearestParameters; 11 | 12 | extern "C" int LLVMFuzzerTestOneInput(const unsigned char *data, unsigned long size) 13 | { 14 | std::string in(reinterpret_cast(data), size); 15 | 16 | auto first = begin(in); 17 | const auto last = end(in); 18 | 19 | const auto param = parseParameters(first, last); 20 | escape(¶m); 21 | 22 | return 0; 23 | } 24 | -------------------------------------------------------------------------------- /fuzz/request_parser.cc: -------------------------------------------------------------------------------- 1 | #include "server/request_parser.hpp" 2 | #include "server/http/request.hpp" 3 | 4 | #include "util.hpp" 5 | 6 | #include 7 | #include 8 | 9 | using osrm::server::RequestParser; 10 | using osrm::server::http::request; 11 | 12 | extern "C" int LLVMFuzzerTestOneInput(const unsigned char *data, unsigned long size) 13 | { 14 | std::string in(reinterpret_cast(data), size); 15 | 16 | auto first = begin(in); 17 | auto last = end(in); 18 | 19 | RequestParser parser; 20 | request req; 21 | 22 | // &(*it) is needed to go from iterator to underlying item to pointer to underlying item 23 | parser.parse(req, &(*first), &(*last)); 24 | 25 | escape(&req); 26 | 27 | return 0; 28 | } 29 | -------------------------------------------------------------------------------- /fuzz/route_parameters.cc: -------------------------------------------------------------------------------- 1 | #include "engine/api/route_parameters.hpp" 2 | #include "server/api/parameters_parser.hpp" 3 | 4 | #include "util.hpp" 5 | 6 | #include 7 | #include 8 | 9 | using osrm::server::api::parseParameters; 10 | using osrm::engine::api::RouteParameters; 11 | 12 | extern "C" int LLVMFuzzerTestOneInput(const unsigned char *data, unsigned long size) 13 | { 14 | std::string in(reinterpret_cast(data), size); 15 | 16 | auto first = begin(in); 17 | const auto last = end(in); 18 | 19 | const auto param = parseParameters(first, last); 20 | escape(¶m); 21 | 22 | return 0; 23 | } 24 | -------------------------------------------------------------------------------- /fuzz/table_parameters.cc: -------------------------------------------------------------------------------- 1 | #include "engine/api/table_parameters.hpp" 2 | #include "server/api/parameters_parser.hpp" 3 | 4 | #include "util.hpp" 5 | 6 | #include 7 | #include 8 | 9 | using osrm::server::api::parseParameters; 10 | using osrm::engine::api::TableParameters; 11 | 12 | extern "C" int LLVMFuzzerTestOneInput(const unsigned char *data, unsigned long size) 13 | { 14 | std::string in(reinterpret_cast(data), size); 15 | 16 | auto first = begin(in); 17 | const auto last = end(in); 18 | 19 | const auto param = parseParameters(first, last); 20 | escape(¶m); 21 | 22 | return 0; 23 | } 24 | -------------------------------------------------------------------------------- /fuzz/tile_parameters.cc: -------------------------------------------------------------------------------- 1 | #include "engine/api/tile_parameters.hpp" 2 | #include "server/api/parameters_parser.hpp" 3 | 4 | #include "util.hpp" 5 | 6 | #include 7 | #include 8 | 9 | using osrm::server::api::parseParameters; 10 | using osrm::engine::api::TileParameters; 11 | 12 | extern "C" int LLVMFuzzerTestOneInput(const unsigned char *data, unsigned long size) 13 | { 14 | std::string in(reinterpret_cast(data), size); 15 | 16 | auto first = begin(in); 17 | const auto last = end(in); 18 | 19 | const auto param = parseParameters(first, last); 20 | escape(¶m); 21 | 22 | return 0; 23 | } 24 | -------------------------------------------------------------------------------- /fuzz/trip_parameters.cc: -------------------------------------------------------------------------------- 1 | #include "engine/api/trip_parameters.hpp" 2 | #include "server/api/parameters_parser.hpp" 3 | 4 | #include "util.hpp" 5 | 6 | #include 7 | #include 8 | 9 | using osrm::server::api::parseParameters; 10 | using osrm::engine::api::TripParameters; 11 | 12 | extern "C" int LLVMFuzzerTestOneInput(const unsigned char *data, unsigned long size) 13 | { 14 | std::string in(reinterpret_cast(data), size); 15 | 16 | auto first = begin(in); 17 | const auto last = end(in); 18 | 19 | const auto param = parseParameters(first, last); 20 | escape(¶m); 21 | 22 | return 0; 23 | } 24 | -------------------------------------------------------------------------------- /fuzz/uri_decode.cc: -------------------------------------------------------------------------------- 1 | #include "server/api/url_parser.hpp" 2 | #include "util/string_util.hpp" 3 | 4 | #include "util.hpp" 5 | 6 | #include 7 | #include 8 | 9 | using osrm::util::URIDecode; 10 | 11 | extern "C" int LLVMFuzzerTestOneInput(const unsigned char *data, unsigned long size) 12 | { 13 | const std::string in(reinterpret_cast(data), size); 14 | std::string out; 15 | 16 | (void)URIDecode(in, out); 17 | 18 | escape(out.data()); 19 | 20 | return 0; 21 | } 22 | -------------------------------------------------------------------------------- /fuzz/url_parser.cc: -------------------------------------------------------------------------------- 1 | #include "server/api/url_parser.hpp" 2 | 3 | #include "util.hpp" 4 | 5 | #include 6 | #include 7 | 8 | using osrm::server::api::parseURL; 9 | 10 | extern "C" int LLVMFuzzerTestOneInput(const unsigned char *data, unsigned long size) 11 | { 12 | std::string in(reinterpret_cast(data), size); 13 | 14 | auto first = begin(in); 15 | const auto last = end(in); 16 | 17 | const auto param = parseURL(first, last); 18 | escape(¶m); 19 | 20 | return 0; 21 | } 22 | -------------------------------------------------------------------------------- /fuzz/util.hpp: -------------------------------------------------------------------------------- 1 | #ifndef OSRM_FUZZ_UTIL_HPP 2 | #define OSRM_FUZZ_UTIL_HPP 3 | 4 | #include 5 | 6 | // Fakes observable side effects the compiler can not optimize away 7 | template inline void escape(T p) 8 | { 9 | static_assert(std::is_pointer::value, ""); 10 | asm volatile("" : : "g"((void *)p) : "memory"); 11 | } 12 | 13 | // Possibly reads and writes all the memory in your system 14 | inline void clobber() { asm volatile("" : : : "memory"); } 15 | 16 | #endif 17 | -------------------------------------------------------------------------------- /include/contractor/contracted_metric.hpp: -------------------------------------------------------------------------------- 1 | #ifndef OSMR_CONTRACTOR_CONTRACTED_METRIC_HPP 2 | #define OSMR_CONTRACTOR_CONTRACTED_METRIC_HPP 3 | 4 | #include "contractor/query_graph.hpp" 5 | 6 | namespace osrm::contractor 7 | { 8 | 9 | namespace detail 10 | { 11 | template struct ContractedMetric 12 | { 13 | detail::QueryGraph graph; 14 | std::vector> edge_filter; 15 | }; 16 | } // namespace detail 17 | 18 | using ContractedMetric = detail::ContractedMetric; 19 | using ContractedMetricView = detail::ContractedMetric; 20 | } // namespace osrm::contractor 21 | 22 | #endif 23 | -------------------------------------------------------------------------------- /include/contractor/contractor_search.hpp: -------------------------------------------------------------------------------- 1 | #ifndef OSRM_CONTRACTOR_SEARCH_HPP 2 | #define OSRM_CONTRACTOR_SEARCH_HPP 3 | 4 | #include "contractor/contractor_graph.hpp" 5 | #include "contractor/contractor_heap.hpp" 6 | 7 | #include "util/typedefs.hpp" 8 | 9 | #include 10 | 11 | namespace osrm::contractor 12 | { 13 | 14 | void search(ContractorHeap &heap, 15 | const ContractorGraph &graph, 16 | const std::vector &contractable, 17 | const unsigned number_of_targets, 18 | const int node_limit, 19 | const EdgeWeight weight_limit, 20 | const NodeID forbidden_node); 21 | 22 | } // namespace osrm::contractor 23 | 24 | #endif // OSRM_CONTRACTOR_DIJKSTRA_HPP 25 | -------------------------------------------------------------------------------- /include/contractor/query_graph.hpp: -------------------------------------------------------------------------------- 1 | #ifndef OSRM_CONTRACTOR_QUERY_GRAPH_HPP 2 | #define OSRM_CONTRACTOR_QUERY_GRAPH_HPP 3 | 4 | #include "contractor/query_edge.hpp" 5 | 6 | #include "util/static_graph.hpp" 7 | #include "util/typedefs.hpp" 8 | 9 | namespace osrm::contractor 10 | { 11 | 12 | namespace detail 13 | { 14 | template 15 | using QueryGraph = util::StaticGraph; 16 | } // namespace detail 17 | 18 | using QueryGraph = detail::QueryGraph; 19 | using QueryGraphView = detail::QueryGraph; 20 | } // namespace osrm::contractor 21 | 22 | #endif // QUERYEDGE_HPP 23 | -------------------------------------------------------------------------------- /include/customizer/customizer.hpp: -------------------------------------------------------------------------------- 1 | #ifndef OSRM_CUSTOMIZE_CUSTOMIZER_HPP 2 | #define OSRM_CUSTOMIZE_CUSTOMIZER_HPP 3 | 4 | #include "customizer/customizer_config.hpp" 5 | 6 | namespace osrm::customizer 7 | { 8 | 9 | class Customizer 10 | { 11 | public: 12 | int Run(const CustomizationConfig &config); 13 | }; 14 | 15 | } // namespace osrm::customizer 16 | 17 | #endif // OSRM_CUSTOMIZE_CUSTOMIZER_HPP 18 | -------------------------------------------------------------------------------- /include/engine/api/base_result.hpp: -------------------------------------------------------------------------------- 1 | #ifndef ENGINE_API_BASE_RESULT_HPP 2 | #define ENGINE_API_BASE_RESULT_HPP 3 | 4 | #include 5 | #include 6 | 7 | #include 8 | 9 | #include "util/json_container.hpp" 10 | 11 | namespace osrm::engine::api 12 | { 13 | using ResultT = std::variant; 14 | } // namespace osrm::engine::api 15 | 16 | #endif 17 | -------------------------------------------------------------------------------- /include/engine/api/flatbuffers/fbresult.fbs: -------------------------------------------------------------------------------- 1 | include "route.fbs"; 2 | include "table.fbs"; 3 | 4 | namespace osrm.engine.api.fbresult; 5 | 6 | table Error { 7 | code: string; 8 | message: string; 9 | } 10 | 11 | table FBResult { 12 | error: bool = false; 13 | code: Error; 14 | data_version: string; 15 | waypoints: [Waypoint]; //Used as 'sources' waypoints for a 'Table' service 16 | routes: [RouteObject]; 17 | table: TableResult; 18 | } 19 | 20 | root_type FBResult; -------------------------------------------------------------------------------- /include/engine/api/flatbuffers/position.fbs: -------------------------------------------------------------------------------- 1 | namespace osrm.engine.api.fbresult; 2 | 3 | struct Position { 4 | longitude: float; 5 | latitude: float; 6 | } -------------------------------------------------------------------------------- /include/engine/api/flatbuffers/table.fbs: -------------------------------------------------------------------------------- 1 | include "waypoint.fbs"; 2 | namespace osrm.engine.api.fbresult; 3 | 4 | table TableResult { 5 | durations: [float]; 6 | rows: ushort; 7 | cols: ushort; 8 | distances: [float]; 9 | destinations: [Waypoint]; 10 | fallback_speed_cells: [uint]; 11 | } -------------------------------------------------------------------------------- /include/engine/api/flatbuffers/waypoint.fbs: -------------------------------------------------------------------------------- 1 | include "position.fbs"; 2 | namespace osrm.engine.api.fbresult; 3 | 4 | struct Uint64Pair { 5 | first: uint64; 6 | second: uint64; 7 | } 8 | 9 | table Waypoint { 10 | hint: string; 11 | distance: float; 12 | name: string; 13 | location: Position; 14 | nodes: Uint64Pair; //Used only by 'Nearest' service 15 | matchings_index: uint; //Used only by 'Match' service 16 | waypoint_index: uint; //Used by 'Match' and 'Trip' services 17 | alternatives_count: uint; //Used only by 'Match' service 18 | trips_index: uint; //Used only by 'Trip' service 19 | } -------------------------------------------------------------------------------- /include/engine/datafacade.hpp: -------------------------------------------------------------------------------- 1 | #ifndef OSRM_ENGINE_DATAFACADE_DATAFACADE_HPP 2 | #define OSRM_ENGINE_DATAFACADE_DATAFACADE_HPP 3 | 4 | #include "engine/datafacade/contiguous_internalmem_datafacade.hpp" 5 | 6 | namespace osrm::engine 7 | { 8 | 9 | using DataFacadeBase = datafacade::ContiguousInternalMemoryDataFacadeBase; 10 | template 11 | using DataFacade = datafacade::ContiguousInternalMemoryDataFacade; 12 | } // namespace osrm::engine 13 | 14 | #endif 15 | -------------------------------------------------------------------------------- /include/engine/datafacade/contiguous_block_allocator.hpp: -------------------------------------------------------------------------------- 1 | #ifndef OSRM_ENGINE_DATAFACADE_CONTIGUOUS_BLOCK_ALLOCATOR_HPP_ 2 | #define OSRM_ENGINE_DATAFACADE_CONTIGUOUS_BLOCK_ALLOCATOR_HPP_ 3 | 4 | #include "storage/shared_data_index.hpp" 5 | 6 | namespace osrm::engine::datafacade 7 | { 8 | 9 | class ContiguousBlockAllocator 10 | { 11 | public: 12 | virtual ~ContiguousBlockAllocator() = default; 13 | 14 | // interface to give access to the datafacades 15 | virtual const storage::SharedDataIndex &GetIndex() = 0; 16 | }; 17 | 18 | } // namespace osrm::engine::datafacade 19 | 20 | #endif // OSRM_ENGINE_DATAFACADE_CONTIGUOUS_BLOCK_ALLOCATOR_HPP_ 21 | -------------------------------------------------------------------------------- /include/engine/guidance/assemble_overview.hpp: -------------------------------------------------------------------------------- 1 | #ifndef ENGINE_GUIDANCE_ASSEMBLE_OVERVIEW_HPP 2 | #define ENGINE_GUIDANCE_ASSEMBLE_OVERVIEW_HPP 3 | 4 | #include "engine/guidance/leg_geometry.hpp" 5 | 6 | #include "util/coordinate.hpp" 7 | 8 | #include 9 | 10 | namespace osrm::engine::guidance 11 | { 12 | 13 | std::vector assembleOverview(const std::vector &leg_geometries, 14 | const bool use_simplification); 15 | 16 | } // namespace osrm::engine::guidance 17 | 18 | #endif 19 | -------------------------------------------------------------------------------- /include/engine/guidance/assemble_route.hpp: -------------------------------------------------------------------------------- 1 | #ifndef ENGINE_GUIDANCE_ASSEMBLE_ROUTE_HPP 2 | #define ENGINE_GUIDANCE_ASSEMBLE_ROUTE_HPP 3 | 4 | #include "engine/guidance/route.hpp" 5 | #include "engine/guidance/route_leg.hpp" 6 | 7 | #include 8 | 9 | namespace osrm::engine::guidance 10 | { 11 | 12 | Route assembleRoute(const std::vector &route_legs); 13 | 14 | } // namespace osrm::engine::guidance 15 | 16 | #endif 17 | -------------------------------------------------------------------------------- /include/engine/guidance/route.hpp: -------------------------------------------------------------------------------- 1 | #ifndef ROUTE_HPP 2 | #define ROUTE_HPP 3 | 4 | namespace osrm::engine::guidance 5 | { 6 | 7 | struct Route 8 | { 9 | double distance; 10 | double duration; 11 | double weight; 12 | }; 13 | } // namespace osrm::engine::guidance 14 | 15 | #endif 16 | -------------------------------------------------------------------------------- /include/engine/guidance/route_leg.hpp: -------------------------------------------------------------------------------- 1 | #ifndef ROUTE_LEG_HPP 2 | #define ROUTE_LEG_HPP 3 | 4 | #include "engine/guidance/route_step.hpp" 5 | 6 | #include 7 | 8 | #include 9 | #include 10 | 11 | namespace osrm::engine::guidance 12 | { 13 | 14 | struct RouteLeg 15 | { 16 | double distance; 17 | double duration; 18 | double weight; 19 | std::string summary; 20 | std::vector steps; 21 | }; 22 | } // namespace osrm::engine::guidance 23 | 24 | #endif 25 | -------------------------------------------------------------------------------- /include/engine/map_matching/sub_matching.hpp: -------------------------------------------------------------------------------- 1 | #ifndef MAP_MATCHING_SUB_MATCHING_HPP 2 | #define MAP_MATCHING_SUB_MATCHING_HPP 3 | 4 | #include "engine/phantom_node.hpp" 5 | 6 | #include 7 | 8 | namespace osrm::engine::map_matching 9 | { 10 | 11 | struct SubMatching 12 | { 13 | std::vector nodes; 14 | std::vector indices; 15 | std::vector alternatives_count; 16 | double confidence; 17 | }; 18 | } // namespace osrm::engine::map_matching 19 | 20 | #endif 21 | -------------------------------------------------------------------------------- /include/extractor/compressed_node_based_graph_edge.hpp: -------------------------------------------------------------------------------- 1 | #ifndef OSRM_EXTRACTOR_COMPRESSED_NODE_BASED_GRAPH_EDGE_HPP 2 | #define OSRM_EXTRACTOR_COMPRESSED_NODE_BASED_GRAPH_EDGE_HPP 3 | 4 | #include "util/typedefs.hpp" 5 | 6 | namespace osrm::extractor 7 | { 8 | 9 | // We encode the cnbg graph only using its topology as edge list 10 | struct CompressedNodeBasedGraphEdge 11 | { 12 | NodeID source; 13 | NodeID target; 14 | }; 15 | } // namespace osrm::extractor 16 | 17 | #endif // OSRM_EXTRACTOR_COMPRESSED_NODE_BASED_GRAPH_EDGE_HPP 18 | -------------------------------------------------------------------------------- /include/extractor/conditional_turn_penalty.hpp: -------------------------------------------------------------------------------- 1 | #ifndef OSRM_EXTRACTOR_CONDITIONAL_TURN_PENALTY_HPP_ 2 | #define OSRM_EXTRACTOR_CONDITIONAL_TURN_PENALTY_HPP_ 3 | 4 | #include "util/coordinate.hpp" 5 | #include "util/opening_hours.hpp" 6 | #include 7 | #include 8 | 9 | #include 10 | 11 | namespace osrm::extractor 12 | { 13 | 14 | struct ConditionalTurnPenalty 15 | { 16 | // offset into the sequential list of turn penalties (see TurnIndexBlock for reference); 17 | std::uint64_t turn_offset; 18 | util::Coordinate location; 19 | std::vector conditions; 20 | }; 21 | 22 | } // namespace osrm::extractor 23 | 24 | #endif // OSRM_EXTRACTOR_CONDITIONAL_TURN_PENALTY_HPP_ 25 | -------------------------------------------------------------------------------- /include/extractor/edge_based_node.hpp: -------------------------------------------------------------------------------- 1 | #ifndef OSRM_EXTRACTOR_EDGE_BASED_NODE_HPP_ 2 | #define OSRM_EXTRACTOR_EDGE_BASED_NODE_HPP_ 3 | 4 | #include "util/typedefs.hpp" 5 | 6 | namespace osrm::extractor 7 | { 8 | 9 | struct EdgeBasedNode 10 | { 11 | GeometryID geometry_id; 12 | ComponentID component_id; 13 | std::uint32_t annotation_id : 31; 14 | std::uint32_t segregated : 1; 15 | }; 16 | 17 | } // namespace osrm::extractor 18 | 19 | #endif // OSRM_EXTRACTOR_EDGE_BASED_NODE_HPP_ 20 | -------------------------------------------------------------------------------- /include/extractor/extraction_node.hpp: -------------------------------------------------------------------------------- 1 | #ifndef EXTRACTION_NODE_HPP 2 | #define EXTRACTION_NODE_HPP 3 | 4 | #include 5 | 6 | namespace osrm::extractor 7 | { 8 | 9 | struct ExtractionNode 10 | { 11 | ExtractionNode() {} 12 | 13 | // the current node 14 | const osmium::Node *node; 15 | }; 16 | } // namespace osrm::extractor 17 | 18 | #endif // EXTRACTION_NODE_HPP 19 | -------------------------------------------------------------------------------- /include/extractor/nbg_to_ebg.hpp: -------------------------------------------------------------------------------- 1 | #ifndef OSRM_EXTRACTOR_NBG_TO_EBG_HPP 2 | #define OSRM_EXTRACTOR_NBG_TO_EBG_HPP 3 | 4 | #include "util/typedefs.hpp" 5 | 6 | namespace osrm::extractor 7 | { 8 | 9 | // Mapping betweenn the node based graph u,v nodes and the edge based graph head,tail edge ids. 10 | // Required in the osrm-partition tool to translate from a nbg partition to a ebg partition. 11 | struct NBGToEBG 12 | { 13 | NodeID u, v; 14 | NodeID forward_ebg_node, backward_ebg_node; 15 | }; 16 | } // namespace osrm::extractor 17 | 18 | #endif 19 | -------------------------------------------------------------------------------- /include/extractor/packed_osm_ids.hpp: -------------------------------------------------------------------------------- 1 | #ifndef OSRM_EXTRACTOR_PACKED_OSM_IDS_HPP 2 | #define OSRM_EXTRACTOR_PACKED_OSM_IDS_HPP 3 | 4 | #include "util/packed_vector.hpp" 5 | #include "util/typedefs.hpp" 6 | 7 | namespace osrm::extractor 8 | { 9 | namespace detail 10 | { 11 | template 12 | using PackedOSMIDs = util::detail::PackedVector; 13 | } // namespace detail 14 | 15 | using PackedOSMIDsView = detail::PackedOSMIDs; 16 | using PackedOSMIDs = detail::PackedOSMIDs; 17 | } // namespace osrm::extractor 18 | 19 | #endif 20 | -------------------------------------------------------------------------------- /include/extractor/turn_path_filter.hpp: -------------------------------------------------------------------------------- 1 | #ifndef OSRM_EXTRACTOR_TURN_PATH_FILTER_HPP_ 2 | #define OSRM_EXTRACTOR_TURN_PATH_FILTER_HPP_ 3 | 4 | #include "extractor/restriction.hpp" 5 | #include "util/node_based_graph.hpp" 6 | 7 | #include 8 | 9 | namespace osrm::extractor 10 | { 11 | 12 | // To avoid handling invalid turn paths / creating unnecessary duplicate nodes for via-ways, we do 13 | // a pre-flight check for paths and remove all invalid turn relations from the data. Use as 14 | // `restrictions = removeInvalidRestrictions(std::move(restrictions))` 15 | template 16 | std::vector removeInvalidTurnPaths(std::vector, const util::NodeBasedDynamicGraph &); 17 | } // namespace osrm::extractor 18 | 19 | #endif // OSRM_EXTRACTOR_TURN_PATH_FILTER_HPP_ 20 | -------------------------------------------------------------------------------- /include/guidance/roundabout_type.hpp: -------------------------------------------------------------------------------- 1 | #ifndef OSRM_GUIDANCE_ROUNDABOUT_TYPES_HPP_ 2 | #define OSRM_GUIDANCE_ROUNDABOUT_TYPES_HPP_ 3 | 4 | namespace osrm::guidance 5 | { 6 | enum class RoundaboutType 7 | { 8 | None, // not a roundabout 9 | Roundabout, // standard roundabout 10 | Rotary, // traffic circle (large roundabout) with dedicated name 11 | RoundaboutIntersection // small roundabout with distinct turns, handled as intersection 12 | }; 13 | } // namespace osrm::guidance 14 | 15 | #endif /* OSRM_EXTRACTOR_GUIDANCE_ROUNDABOUT_TYPES_HPP_ */ 16 | -------------------------------------------------------------------------------- /include/guidance/turn_classification.hpp: -------------------------------------------------------------------------------- 1 | #ifndef OSRM_GUIDANCE_TURN_CLASSIFICATION_HPP_ 2 | #define OSRM_GUIDANCE_TURN_CLASSIFICATION_HPP_ 3 | 4 | #include "guidance/intersection.hpp" 5 | 6 | #include "util/coordinate.hpp" 7 | #include "util/guidance/bearing_class.hpp" 8 | #include "util/guidance/entry_class.hpp" 9 | 10 | #include 11 | 12 | namespace osrm::guidance 13 | { 14 | 15 | std::pair 16 | classifyIntersection(Intersection intersection, const osrm::util::Coordinate &location); 17 | 18 | } // namespace osrm::guidance 19 | 20 | #endif // OSRM_GUIDANCE_TURN_CLASSIFICATION_HPP_ 21 | -------------------------------------------------------------------------------- /include/guidance/turn_lane_augmentation.hpp: -------------------------------------------------------------------------------- 1 | #ifndef OSRM_GUIDANCE_TURN_LANE_AUGMENTATION_HPP_ 2 | #define OSRM_GUIDANCE_TURN_LANE_AUGMENTATION_HPP_ 3 | 4 | #include "guidance/intersection.hpp" 5 | #include "guidance/turn_lane_data.hpp" 6 | 7 | namespace osrm::guidance::lanes 8 | { 9 | 10 | [[nodiscard]] LaneDataVector handleNoneValueAtSimpleTurn(LaneDataVector lane_data, 11 | const Intersection &intersection); 12 | 13 | } // namespace osrm::guidance::lanes 14 | 15 | #endif /* OSRM_GUIDANCE_TURN_LANE_AUGMENTATION_HPP_ */ 16 | -------------------------------------------------------------------------------- /include/osrm/datasets.hpp: -------------------------------------------------------------------------------- 1 | #ifndef DATASETS_HPP 2 | #define DATASETS_HPP 3 | 4 | namespace osrm::storage 5 | { 6 | 7 | enum class FeatureDataset 8 | { 9 | ROUTE_STEPS, 10 | ROUTE_GEOMETRY, 11 | }; 12 | 13 | } // namespace osrm::storage 14 | 15 | #endif 16 | -------------------------------------------------------------------------------- /include/partitioner/bisection_to_partition.hpp: -------------------------------------------------------------------------------- 1 | #ifndef OSRM_PARTITIONER_BISECTION_TO_PARTITION_HPP 2 | #define OSRM_PARTITIONER_BISECTION_TO_PARTITION_HPP 3 | 4 | #include "partitioner/multi_level_partition.hpp" 5 | #include "partitioner/recursive_bisection.hpp" 6 | 7 | #include 8 | 9 | namespace osrm::partitioner 10 | { 11 | 12 | using Partition = std::vector; 13 | 14 | // Converts a representation of the bisection to cell ids over multiple level 15 | std::tuple, std::vector> 16 | bisectionToPartition(const std::vector &node_to_bisection_id, 17 | const std::vector &max_cell_sizes); 18 | } // namespace osrm::partitioner 19 | 20 | #endif 21 | -------------------------------------------------------------------------------- /include/partitioner/inertial_flow.hpp: -------------------------------------------------------------------------------- 1 | #ifndef OSRM_PARTITIONER_INERTIAL_FLOW_HPP_ 2 | #define OSRM_PARTITIONER_INERTIAL_FLOW_HPP_ 3 | 4 | #include "partitioner/bisection_graph_view.hpp" 5 | #include "partitioner/dinic_max_flow.hpp" 6 | 7 | namespace osrm::partitioner 8 | { 9 | 10 | DinicMaxFlow::MinCut computeInertialFlowCut(const BisectionGraphView &view, 11 | const std::size_t num_slopes, 12 | const double balance, 13 | const double source_sink_rate); 14 | 15 | } // namespace osrm::partitioner 16 | 17 | #endif // OSRM_PARTITIONER_INERTIAL_FLOW_HPP_ 18 | -------------------------------------------------------------------------------- /include/partitioner/partitioner.hpp: -------------------------------------------------------------------------------- 1 | #ifndef OSRM_PARTITIONER_PARTITIONER_HPP_ 2 | #define OSRM_PARTITIONER_PARTITIONER_HPP_ 3 | 4 | #include "partitioner/partitioner_config.hpp" 5 | 6 | namespace osrm::partitioner 7 | { 8 | 9 | // tool access to the recursive partitioner 10 | class Partitioner 11 | { 12 | public: 13 | int Run(const PartitionerConfig &config); 14 | }; 15 | 16 | } // namespace osrm::partitioner 17 | 18 | #endif // OSRM_PARTITIONER_PARTITIONER_HPP_ 19 | -------------------------------------------------------------------------------- /include/partitioner/tarjan_graph_wrapper.hpp: -------------------------------------------------------------------------------- 1 | #ifndef OSRM_PARTITIONER_TARJAN_GRAPH_WRAPPER_HPP_ 2 | #define OSRM_PARTITIONER_TARJAN_GRAPH_WRAPPER_HPP_ 3 | 4 | #include "partitioner/bisection_graph.hpp" 5 | #include "util/integer_range.hpp" 6 | #include "util/typedefs.hpp" 7 | 8 | namespace osrm::partitioner 9 | { 10 | 11 | class TarjanGraphWrapper 12 | { 13 | public: 14 | TarjanGraphWrapper(const BisectionGraph &bisection_graph); 15 | 16 | std::size_t GetNumberOfNodes() const; 17 | util::range GetAdjacentEdgeRange(const NodeID nid) const; 18 | NodeID GetTarget(const EdgeID eid) const; 19 | 20 | protected: 21 | const BisectionGraph &bisection_graph; 22 | }; 23 | 24 | } // namespace osrm::partitioner 25 | 26 | #endif // OSRM_PARTITIONER_TARJAN_GRAPH_WRAPPER_HPP_ 27 | -------------------------------------------------------------------------------- /include/server/api/parsed_url.hpp: -------------------------------------------------------------------------------- 1 | #ifndef SERVER_API_PARSED_URL_HPP 2 | #define SERVER_API_PARSED_URL_HPP 3 | 4 | #include "util/coordinate.hpp" 5 | 6 | #include 7 | 8 | namespace osrm::server::api 9 | { 10 | 11 | struct ParsedURL final 12 | { 13 | std::string service; 14 | unsigned version; 15 | std::string profile; 16 | std::string query; 17 | std::size_t prefix_length; 18 | }; 19 | 20 | } // namespace osrm::server::api 21 | 22 | #endif 23 | -------------------------------------------------------------------------------- /include/server/api/url_parser.hpp: -------------------------------------------------------------------------------- 1 | #ifndef SERVER_URL_PARSER_HPP 2 | #define SERVER_URL_PARSER_HPP 3 | 4 | #include "server/api/parsed_url.hpp" 5 | 6 | #include 7 | 8 | #include 9 | 10 | namespace osrm::server::api 11 | { 12 | 13 | // Starts parsing and iter and modifies it until iter == end or parsing failed 14 | std::optional parseURL(std::string::iterator &iter, const std::string::iterator end); 15 | 16 | inline std::optional parseURL(std::string url_string) 17 | { 18 | auto iter = url_string.begin(); 19 | return parseURL(iter, url_string.end()); 20 | } 21 | } // namespace osrm::server::api 22 | 23 | #endif 24 | -------------------------------------------------------------------------------- /include/server/http/compression_type.hpp: -------------------------------------------------------------------------------- 1 | #ifndef COMPRESSION_TYPE_HPP 2 | #define COMPRESSION_TYPE_HPP 3 | 4 | namespace osrm::server::http 5 | { 6 | 7 | enum compression_type 8 | { 9 | no_compression, 10 | gzip_rfc1952, 11 | deflate_rfc1951 12 | }; 13 | } // namespace osrm::server::http 14 | 15 | #endif // COMPRESSION_TYPE_HPP 16 | -------------------------------------------------------------------------------- /include/server/http/header.hpp: -------------------------------------------------------------------------------- 1 | #ifndef HEADER_HPP 2 | #define HEADER_HPP 3 | 4 | #include 5 | #include 6 | 7 | namespace osrm::server::http 8 | { 9 | 10 | struct header 11 | { 12 | // explicitly use default copy c'tor as adding move c'tor 13 | header &operator=(const header &other) = default; 14 | header(std::string name, std::string value) : name(std::move(name)), value(std::move(value)) {} 15 | header(header &&other) noexcept : name(std::move(other.name)), value(std::move(other.value)) {} 16 | 17 | void clear() 18 | { 19 | name.clear(); 20 | value.clear(); 21 | } 22 | 23 | std::string name; 24 | std::string value; 25 | }; 26 | } // namespace osrm::server::http 27 | 28 | #endif // HEADER_HPP 29 | -------------------------------------------------------------------------------- /include/server/http/request.hpp: -------------------------------------------------------------------------------- 1 | #ifndef REQUEST_HPP 2 | #define REQUEST_HPP 3 | 4 | #include 5 | 6 | #include 7 | 8 | namespace osrm::server::http 9 | { 10 | 11 | struct request 12 | { 13 | std::string uri; 14 | std::string referrer; 15 | std::string agent; 16 | std::string connection; 17 | boost::asio::ip::address endpoint; 18 | }; 19 | } // namespace osrm::server::http 20 | 21 | #endif // REQUEST_HPP 22 | -------------------------------------------------------------------------------- /include/storage/io_fwd.hpp: -------------------------------------------------------------------------------- 1 | #ifndef OSRM_STORAGE_IO_FWD_HPP_ 2 | #define OSRM_STORAGE_IO_FWD_HPP_ 3 | 4 | namespace osrm::storage::io 5 | { 6 | 7 | class FileReader; 8 | class FileWriter; 9 | 10 | } // namespace osrm::storage::io 11 | 12 | #endif 13 | -------------------------------------------------------------------------------- /include/storage/shared_memory_ownership.hpp: -------------------------------------------------------------------------------- 1 | #ifndef SHARED_MEMORY_OWNERSHIP_HPP 2 | #define SHARED_MEMORY_OWNERSHIP_HPP 3 | 4 | namespace osrm::storage 5 | { 6 | 7 | enum class Ownership 8 | { 9 | Container, 10 | View, 11 | External 12 | }; 13 | } // namespace osrm::storage 14 | 15 | #endif // SHARED_MEMORY_OWNERSHIP_HPP 16 | -------------------------------------------------------------------------------- /include/storage/tar_fwd.hpp: -------------------------------------------------------------------------------- 1 | #ifndef OSRM_STORAGE_TAR_FWD_HPP_ 2 | #define OSRM_STORAGE_TAR_FWD_HPP_ 3 | 4 | namespace osrm::storage::tar 5 | { 6 | 7 | class FileReader; 8 | class FileWriter; 9 | 10 | } // namespace osrm::storage::tar 11 | 12 | #endif 13 | -------------------------------------------------------------------------------- /include/updater/csv_source.hpp: -------------------------------------------------------------------------------- 1 | #ifndef OSRM_UPDATER_CSV_SOURCE_HPP 2 | #define OSRM_UPDATER_CSV_SOURCE_HPP 3 | 4 | #include "updater/source.hpp" 5 | 6 | namespace osrm::updater::csv 7 | { 8 | SegmentLookupTable readSegmentValues(const std::vector &paths); 9 | TurnLookupTable readTurnValues(const std::vector &paths); 10 | } // namespace osrm::updater::csv 11 | 12 | #endif 13 | -------------------------------------------------------------------------------- /include/util/conditional_restrictions.hpp: -------------------------------------------------------------------------------- 1 | #ifndef OSRM_CONDITIONAL_RESTRICTIONS_HPP 2 | #define OSRM_CONDITIONAL_RESTRICTIONS_HPP 3 | 4 | #include 5 | #include 6 | 7 | namespace osrm::util 8 | { 9 | 10 | // Helper functions for OSM conditional restrictions 11 | // http://wiki.openstreetmap.org/wiki/Conditional_restrictions 12 | // Consitional restrictions is a vector of ConditionalRestriction 13 | // with a restriction value and a condition string 14 | struct ConditionalRestriction 15 | { 16 | std::string value; 17 | std::string condition; 18 | }; 19 | 20 | std::vector ParseConditionalRestrictions(const std::string &str); 21 | 22 | } // namespace osrm::util 23 | 24 | #endif // OSRM_CONDITIONAL_RESTRICTIONS_HPP 25 | -------------------------------------------------------------------------------- /include/util/exception_utils.hpp: -------------------------------------------------------------------------------- 1 | #ifndef EXCEPTION_UTILS_HPP 2 | #define EXCEPTION_UTILS_HPP 3 | 4 | #include 5 | #include 6 | 7 | // Helper macros, don't use these ones 8 | // STRIP the OSRM_PROJECT_DIR from the front of a filename. Expected to come 9 | // from CMake's CURRENT_SOURCE_DIR, which doesn't have a trailing /, hence the +1 10 | #define PROJECT_RELATIVE_PATH_(x) std::string(x).substr(strlen(OSRM_PROJECT_DIR) + 1) 11 | // Return the path of a file, relative to the OSRM_PROJECT_DIR 12 | #define OSRM_SOURCE_FILE_ PROJECT_RELATIVE_PATH_(__FILE__) 13 | 14 | // This is the macro to use 15 | #define SOURCE_REF (OSRM_SOURCE_FILE_ + ":" + std::to_string(__LINE__)) 16 | 17 | #endif // EXCEPTION_UTILS_HPP 18 | -------------------------------------------------------------------------------- /include/util/for_each_indexed.hpp: -------------------------------------------------------------------------------- 1 | #ifndef FOR_EACH_INDEXED_HPP 2 | #define FOR_EACH_INDEXED_HPP 3 | 4 | #include 5 | 6 | namespace osrm::util 7 | { 8 | 9 | template 10 | void for_each_indexed(ForwardIterator first, ForwardIterator last, Function function) 11 | { 12 | for (size_t i = 0; first != last; ++first, ++i) 13 | { 14 | function(i, *first); 15 | } 16 | } 17 | 18 | template 19 | void for_each_indexed(ContainerT &container, Function function) 20 | { 21 | for_each_indexed(std::begin(container), std::end(container), function); 22 | } 23 | 24 | } // namespace osrm::util 25 | 26 | #endif /* FOR_EACH_INDEXED_HPP */ 27 | -------------------------------------------------------------------------------- /include/util/for_each_range.hpp: -------------------------------------------------------------------------------- 1 | #ifndef OSRM_UTIL_FOR_EACH_RANGE_HPP 2 | #define OSRM_UTIL_FOR_EACH_RANGE_HPP 3 | 4 | namespace osrm::util 5 | { 6 | 7 | template void for_each_range(Iter begin, Iter end, Func f) 8 | { 9 | auto iter = begin; 10 | while (iter != end) 11 | { 12 | const auto key = iter->first; 13 | auto begin_range = iter; 14 | while (iter != end && iter->first == key) 15 | { 16 | iter++; 17 | } 18 | f(begin_range, iter); 19 | } 20 | } 21 | } // namespace osrm::util 22 | 23 | #endif 24 | -------------------------------------------------------------------------------- /include/util/isatty.hpp: -------------------------------------------------------------------------------- 1 | #ifndef ISATTY_HPP 2 | #define ISATTY_HPP 3 | 4 | // For isatty() 5 | #if defined(__unix__) || (defined(__APPLE__) && defined(__MACH__)) 6 | #include 7 | #else 8 | #ifdef WIN32 9 | #include 10 | #define isatty _isatty 11 | #define fileno _fileno 12 | #else 13 | #error Unknown platform - isatty implementation required 14 | #endif // win32 15 | #endif // unix 16 | 17 | #include 18 | 19 | namespace osrm::util 20 | { 21 | 22 | // Returns true if stdout is a tty, false otherwise 23 | // Useful for when you want to do something different when 24 | // output is redirected to a logfile 25 | inline bool IsStdoutATTY() { return isatty(fileno(stdout)); } 26 | 27 | } // namespace osrm::util 28 | 29 | #endif 30 | -------------------------------------------------------------------------------- /include/util/json_util.hpp: -------------------------------------------------------------------------------- 1 | #ifndef JSON_UTIL_HPP 2 | #define JSON_UTIL_HPP 3 | 4 | #include "osrm/json_container.hpp" 5 | 6 | #include 7 | #include 8 | 9 | namespace osrm::util::json 10 | { 11 | // Make sure we don't have inf and NaN values 12 | template T clamp_float(T d) 13 | { 14 | if (std::isnan(d) || std::numeric_limits::infinity() == d) 15 | { 16 | return std::numeric_limits::max(); 17 | } 18 | if (-std::numeric_limits::infinity() == d) 19 | { 20 | return std::numeric_limits::lowest(); 21 | } 22 | 23 | return d; 24 | } 25 | } // namespace osrm::util::json 26 | 27 | #endif // JSON_UTIL_HPP 28 | -------------------------------------------------------------------------------- /include/util/msb.hpp: -------------------------------------------------------------------------------- 1 | #ifndef OSRM_UTIL_MSB_HPP 2 | #define OSRM_UTIL_MSB_HPP 3 | 4 | #include 5 | #include 6 | #include 7 | 8 | namespace osrm::util 9 | { 10 | 11 | template std::size_t msb(T value) 12 | { 13 | BOOST_ASSERT(value > 0); 14 | 15 | static_assert(std::is_integral::value && !std::is_signed::value, "Integer required."); 16 | constexpr auto MSB_INDEX = std::numeric_limits::digits * sizeof(T) - 1; 17 | 18 | return MSB_INDEX - std::countl_zero(value); 19 | } 20 | 21 | } // namespace osrm::util 22 | 23 | #endif 24 | -------------------------------------------------------------------------------- /include/util/static_assert.hpp: -------------------------------------------------------------------------------- 1 | #ifndef OSRM_STATIC_ASSERT_HPP 2 | #define OSRM_STATIC_ASSERT_HPP 3 | 4 | #include 5 | #include 6 | 7 | namespace osrm::util 8 | { 9 | 10 | template inline void static_assert_iter_value() 11 | { 12 | static_assert(std::is_same_v, Value>, ""); 13 | } 14 | 15 | template inline void static_assert_iter_category() 16 | { 17 | using IterCategoryType = typename std::iterator_traits::iterator_category; 18 | static_assert(std::is_base_of_v, ""); 19 | } 20 | 21 | } // namespace osrm::util 22 | 23 | #endif // OSRM_STATIC_ASSERT_HPP 24 | -------------------------------------------------------------------------------- /include/util/vector_tile.hpp: -------------------------------------------------------------------------------- 1 | #ifndef OSRM_UTIL_VECTOR_TILE_HPP 2 | #define OSRM_UTIL_VECTOR_TILE_HPP 3 | 4 | namespace osrm::util::vector_tile 5 | { 6 | // Vector tiles are 4096 virtual pixels on each side 7 | const constexpr double EXTENT = 4096.0; 8 | const constexpr double BUFFER = 128.0; 9 | } // namespace osrm::util::vector_tile 10 | #endif 11 | -------------------------------------------------------------------------------- /include/util/version.hpp.in: -------------------------------------------------------------------------------- 1 | #ifndef VERSION_HPP 2 | #define VERSION_HPP 3 | 4 | #define OSRM_VERSION_MAJOR @OSRM_VERSION_MAJOR@ 5 | #define OSRM_VERSION_MINOR @OSRM_VERSION_MINOR@ 6 | #define OSRM_VERSION_PATCH @OSRM_VERSION_PATCH@ 7 | #define OSRM_VERSION_PRERELEASE_BUILD "@OSRM_VERSION_PRERELEASE_BUILD@" 8 | 9 | #define OSRM_VERSION__(A,B,C,D) "v" #A "." #B "." #C D 10 | #define OSRM_VERSION_(A,B,C,D) OSRM_VERSION__(A,B,C,D) 11 | #define OSRM_VERSION OSRM_VERSION_(OSRM_VERSION_MAJOR, OSRM_VERSION_MINOR, OSRM_VERSION_PATCH, OSRM_VERSION_PRERELEASE_BUILD) 12 | 13 | #endif // VERSION_HPP 14 | -------------------------------------------------------------------------------- /lib/binding/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Project-OSRM/osrm-backend/560ed5c0e82d7bd6a0887eb58188bf4fa8662372/lib/binding/.gitkeep -------------------------------------------------------------------------------- /lib/binding_napi_v8: -------------------------------------------------------------------------------- 1 | binding -------------------------------------------------------------------------------- /lib/index.js: -------------------------------------------------------------------------------- 1 | var OSRM = module.exports = require('./binding/node_osrm.node').OSRM; 2 | OSRM.version = require('../package.json').version; 3 | -------------------------------------------------------------------------------- /profiles/lib/access.lua: -------------------------------------------------------------------------------- 1 | local ipairs = ipairs 2 | 3 | local Access = {} 4 | 5 | function Access.find_access_tag(source,access_tags_hierarchy) 6 | for i,v in ipairs(access_tags_hierarchy) do 7 | local tag = source:get_value_by_key(v) 8 | if tag then 9 | return tag 10 | end 11 | end 12 | return nil 13 | end 14 | 15 | return Access 16 | -------------------------------------------------------------------------------- /profiles/lib/maxspeed.lua: -------------------------------------------------------------------------------- 1 | local math = math 2 | 3 | local MaxSpeed = {} 4 | 5 | function MaxSpeed.limit(way,max,maxf,maxb) 6 | if maxf and maxf>0 then 7 | way.forward_speed = math.min(way.forward_speed, maxf) 8 | elseif max and max>0 then 9 | way.forward_speed = math.min(way.forward_speed, max) 10 | end 11 | 12 | if maxb and maxb>0 then 13 | way.backward_speed = math.min(way.backward_speed, maxb) 14 | elseif max and max>0 then 15 | way.backward_speed = math.min(way.backward_speed, max) 16 | end 17 | end 18 | 19 | return MaxSpeed 20 | -------------------------------------------------------------------------------- /profiles/lib/sequence.lua: -------------------------------------------------------------------------------- 1 | -- Sequence of items 2 | -- Ordered, but have to loop through items to check for inclusion. 3 | -- Currently the same as a table. 4 | -- Adds the convenience function append() to append to the sequnce. 5 | 6 | function Sequence(source) 7 | return source 8 | end 9 | 10 | return Sequence -------------------------------------------------------------------------------- /profiles/lib/set.lua: -------------------------------------------------------------------------------- 1 | -- Set of items 2 | -- Fast check for inclusion, but unordered. 3 | -- 4 | -- Instead of having to do: 5 | -- whitelist = { 'apple'=true, 'cherries'=true, 'melons'=true } 6 | -- 7 | -- you can do: 8 | -- whitelist = Set { 'apple', 'cherries', 'melons' } 9 | -- 10 | -- and then use it as: 11 | -- print( whitelist['cherries'] ) => true 12 | 13 | function Set(source) 14 | set = {} 15 | if source then 16 | for i,v in ipairs(source) do 17 | set[v] = true 18 | end 19 | end 20 | return set 21 | end 22 | 23 | return Set -------------------------------------------------------------------------------- /profiles/turnbot.lua: -------------------------------------------------------------------------------- 1 | -- Testbot, with turn penalty 2 | -- Used for testing turn penalties 3 | 4 | functions = require 'testbot' 5 | 6 | functions.process_turn = function(profile, turn) 7 | turn.duration = 20 * math.abs(turn.angle) / 180 8 | end 9 | 10 | return functions -------------------------------------------------------------------------------- /scripts/ci/addresssanitizer.conf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Project-OSRM/osrm-backend/560ed5c0e82d7bd6a0887eb58188bf4fa8662372/scripts/ci/addresssanitizer.conf -------------------------------------------------------------------------------- /scripts/cucumber_test_matrix.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | set -o errexit 4 | set -o pipefail 5 | set -o nounset 6 | 7 | loadmethods=(datastore mmap directly) 8 | profiles=(ch mld) 9 | 10 | for profile in "${profiles[@]}" 11 | do 12 | for loadmethod in "${loadmethods[@]}" 13 | do 14 | set -x 15 | node ./node_modules/cucumber/bin/cucumber.js features/ -p $profile -m $loadmethod 16 | { set +x; } 2>/dev/null 17 | done 18 | done 19 | -------------------------------------------------------------------------------- /scripts/error_on_dirty.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | set -o errexit 4 | set -o pipefail 5 | set -o nounset 6 | 7 | MSG="The following files have been modified:" 8 | dirty=$(git ls-files --modified) 9 | 10 | if [[ $dirty ]]; then 11 | echo $MSG 12 | echo $dirty 13 | git diff 14 | exit 1 15 | else 16 | exit 0 17 | fi 18 | -------------------------------------------------------------------------------- /scripts/node_install.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | set -e 4 | 5 | CMAKE_OPTIONS=${CMAKE_OPTIONS:-"-DCMAKE_BUILD_TYPE=Release -DENABLE_NODE_BINDINGS=On"} 6 | 7 | if [[ ! -f $(which cmake) ]]; then 8 | echo "Needs cmake to build from source" 9 | exit 1 10 | fi 11 | if [[ -d build ]]; then 12 | echo "Detected existing build directory, skipping compiling." 13 | exit 0 14 | else 15 | mkdir -p build 16 | pushd build 17 | cmake .. $CMAKE_OPTIONS 18 | cmake --build . 19 | popd 20 | fi 21 | -------------------------------------------------------------------------------- /scripts/tidy.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | set -o errexit 4 | set -o pipefail 5 | set -o nounset 6 | 7 | # Runs the Clang Tidy Tool in parallel on the code base. 8 | # Requires a compilation database in the build directory. 9 | 10 | # This works on both OSX and Linux, it's a POSIX thingy 11 | NPROC=$(getconf _NPROCESSORS_ONLN) 12 | 13 | 14 | find src include unit_tests -type f -name '*.hpp' -o -name '*.cpp' -print0 \ 15 | | xargs \ 16 | -0 \ 17 | -I{} \ 18 | -n 1 \ 19 | ./clang+llvm-3.9.0-x86_64-apple-darwin/bin/clang-tidy \ 20 | -p build \ 21 | -header-filter='.*' \ 22 | {} 23 | -------------------------------------------------------------------------------- /scripts/timer.js: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env node 2 | 3 | var exec = require('child_process').exec; 4 | var fs = require('fs'); 5 | 6 | var name = process.argv[2]; 7 | var cmd = process.argv.slice(3).join(' '); 8 | var start = Date.now(); 9 | exec(cmd, (err, stdout, stderr) => { 10 | if (err) { 11 | console.log(stdout); 12 | console.log(stderr); 13 | return process.exit(err.code); 14 | } 15 | var stop = +new Date(); 16 | var time = (stop - start) / 1000.; 17 | fs.appendFileSync('/tmp/osrm.timings', `${name}\t${time}`, 'utf-8'); 18 | }); 19 | 20 | 21 | -------------------------------------------------------------------------------- /src/osrm/contractor.cpp: -------------------------------------------------------------------------------- 1 | #include "osrm/contractor.hpp" 2 | #include "contractor/contractor.hpp" 3 | #include "contractor/contractor_config.hpp" 4 | 5 | namespace osrm 6 | { 7 | 8 | // Pimpl-like facade 9 | 10 | void contract(const contractor::ContractorConfig &config) { contractor::Contractor(config).Run(); } 11 | 12 | } // namespace osrm 13 | -------------------------------------------------------------------------------- /src/osrm/customizer.cpp: -------------------------------------------------------------------------------- 1 | #include "osrm/customizer.hpp" 2 | #include "customizer/customizer.hpp" 3 | #include "osrm/customizer_config.hpp" 4 | 5 | namespace osrm 6 | { 7 | 8 | // Pimpl-like facade 9 | 10 | void customize(const CustomizationConfig &config) { customizer::Customizer().Run(config); } 11 | 12 | } // namespace osrm 13 | -------------------------------------------------------------------------------- /src/osrm/extractor.cpp: -------------------------------------------------------------------------------- 1 | #include "osrm/extractor.hpp" 2 | #include "extractor/extractor.hpp" 3 | #include "extractor/extractor_config.hpp" 4 | #include "extractor/scripting_environment_lua.hpp" 5 | 6 | namespace osrm 7 | { 8 | 9 | // Pimpl-like facade 10 | 11 | void extract(const extractor::ExtractorConfig &config) 12 | { 13 | extractor::Sol2ScriptingEnvironment scripting_environment(config.profile_path.string(), 14 | config.location_dependent_data_paths); 15 | extractor::Extractor(config).run(scripting_environment); 16 | } 17 | 18 | } // namespace osrm 19 | -------------------------------------------------------------------------------- /src/osrm/partitioner.cpp: -------------------------------------------------------------------------------- 1 | #include "osrm/partitioner.hpp" 2 | #include "partitioner/partitioner.hpp" 3 | #include "osrm/partitioner_config.hpp" 4 | 5 | namespace osrm 6 | { 7 | 8 | // Pimpl-like facade 9 | 10 | void partition(const PartitionerConfig &config) { partitioner::Partitioner().Run(config); } 11 | 12 | } // namespace osrm 13 | -------------------------------------------------------------------------------- /src/partitioner/tarjan_graph_wrapper.cpp: -------------------------------------------------------------------------------- 1 | #include "partitioner/tarjan_graph_wrapper.hpp" 2 | 3 | namespace osrm::partitioner 4 | { 5 | 6 | TarjanGraphWrapper::TarjanGraphWrapper(const BisectionGraph &bisection_graph_) 7 | : bisection_graph(bisection_graph_) 8 | { 9 | } 10 | 11 | std::size_t TarjanGraphWrapper::GetNumberOfNodes() const { return bisection_graph.NumberOfNodes(); } 12 | 13 | util::range TarjanGraphWrapper::GetAdjacentEdgeRange(const NodeID nid) const 14 | { 15 | return util::irange(bisection_graph.BeginEdgeID(nid), bisection_graph.EndEdgeID(nid)); 16 | } 17 | 18 | NodeID TarjanGraphWrapper::GetTarget(const EdgeID eid) const 19 | { 20 | return bisection_graph.Edge(eid).target; 21 | } 22 | 23 | } // namespace osrm::partitioner 24 | -------------------------------------------------------------------------------- /src/storage/storage_config.cpp: -------------------------------------------------------------------------------- 1 | #include "osrm/datasets.hpp" 2 | #include "osrm/exception.hpp" 3 | #include "util/exception_utils.hpp" 4 | #include 5 | 6 | #include 7 | #include 8 | 9 | namespace osrm::storage 10 | { 11 | std::istream &operator>>(std::istream &in, FeatureDataset &datasets) 12 | { 13 | std::string token; 14 | in >> token; 15 | boost::to_lower(token); 16 | 17 | if (token == "route_steps") 18 | datasets = FeatureDataset::ROUTE_STEPS; 19 | else if (token == "route_geometry") 20 | datasets = FeatureDataset::ROUTE_GEOMETRY; 21 | else 22 | throw util::RuntimeError(token, ErrorCode::UnknownFeatureDataset, SOURCE_REF); 23 | return in; 24 | } 25 | 26 | } // namespace osrm::storage 27 | -------------------------------------------------------------------------------- /src/tools/.gitignore: -------------------------------------------------------------------------------- 1 | /osrm-component 2 | -------------------------------------------------------------------------------- /src/util/timed_histogram.cpp: -------------------------------------------------------------------------------- 1 | #include "util/timed_histogram.hpp" 2 | 3 | namespace osrm::util::detail 4 | { 5 | std::atomic_uint operation = {0}; 6 | } // namespace osrm::util::detail 7 | -------------------------------------------------------------------------------- /test/.gitignore: -------------------------------------------------------------------------------- 1 | /server.ini 2 | /cache 3 | /speedprofile.ini 4 | -------------------------------------------------------------------------------- /test/data/berlin_gps_traces.csv.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Project-OSRM/osrm-backend/560ed5c0e82d7bd6a0887eb58188bf4fa8662372/test/data/berlin_gps_traces.csv.gz -------------------------------------------------------------------------------- /test/data/data.md5sum: -------------------------------------------------------------------------------- 1 | 2b8dd9343d5e615afc9c67bcc7028a63 monaco.osm.pbf 2 | b0788991ab3791d53c1c20b6281f81ad monaco.poly 3 | -------------------------------------------------------------------------------- /test/data/monaco.osm.pbf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Project-OSRM/osrm-backend/560ed5c0e82d7bd6a0887eb58188bf4fa8662372/test/data/monaco.osm.pbf -------------------------------------------------------------------------------- /test/data/poland_gps_traces.csv.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Project-OSRM/osrm-backend/560ed5c0e82d7bd6a0887eb58188bf4fa8662372/test/data/poland_gps_traces.csv.gz -------------------------------------------------------------------------------- /test/data/regions/null-island.geojson: -------------------------------------------------------------------------------- 1 | { 2 | "type": "FeatureCollection", 3 | "features": [ { 4 | "type": "Feature", 5 | "properties": { 6 | "driving_side": "left", 7 | "answer": 42, 8 | "boolean": true, 9 | "object": { "hello": "world" }, 10 | "array": [4, 8, 15, 16, 23, 42] 11 | }, 12 | "geometry": { "type": "Polygon", "coordinates": [ [ [0, 0], [0, 2], [2, 2], [2, 0], [0, 0] ] ] } 13 | } ] 14 | } 15 | -------------------------------------------------------------------------------- /test/data/tz/iana/dc.geojson: -------------------------------------------------------------------------------- 1 | { 2 | "type": "FeatureCollection", 3 | 4 | "features": [ 5 | { "type": "Feature", "properties": { "tzid": "America\/New_York" }, "geometry": { "type": "Polygon", "coordinates": [ [ [ -77.22564697265625, 38.758366935612784 ], [ -77.22564697265625, 39.030919255760622 ], [ -76.8218994140625, 39.030919255760622 ], [ -76.8218994140625, 38.758366935612784 ], [ -77.22564697265625, 38.758366935612784 ] ] ] } } 6 | ] 7 | } 8 | -------------------------------------------------------------------------------- /test/data/tz/iana/london.geojson: -------------------------------------------------------------------------------- 1 | { 2 | "type": "FeatureCollection", 3 | 4 | "features": [ 5 | { "type": "Feature", "properties": { "tzid": "Europe\/London" }, "geometry": { "type": "Polygon", "coordinates": [ [ [ -0.212860107421875, 51.468766318140872 ], [ -0.212860107421875, 51.573868997085803 ], [ -0.014076232910156, 51.573868997085803 ], [ -0.014076232910156, 51.468766318140872 ], [ -0.212860107421875, 51.468766318140872 ] ] ] } } 6 | ] 7 | } 8 | -------------------------------------------------------------------------------- /test/data/tz/win/dc.geojson: -------------------------------------------------------------------------------- 1 | { 2 | "type": "FeatureCollection", 3 | 4 | "features": [ 5 | { "type": "Feature", "properties": { "tzid": "EST+5EDT" }, "geometry": { "type": "Polygon", "coordinates": [ [ [ -77.22564697265625, 38.758366935612784 ], [ -77.22564697265625, 39.030919255760622 ], [ -76.8218994140625, 39.030919255760622 ], [ -76.8218994140625, 38.758366935612784 ], [ -77.22564697265625, 38.758366935612784 ] ] ] } } 6 | ] 7 | } 8 | -------------------------------------------------------------------------------- /test/data/tz/win/london.geojson: -------------------------------------------------------------------------------- 1 | { 2 | "type": "FeatureCollection", 3 | 4 | "features": [ 5 | { "type": "Feature", "properties": { "tzid": "GMT0BST" }, "geometry": { "type": "Polygon", "coordinates": [ [ [ -0.212860107421875, 51.468766318140872 ], [ -0.212860107421875, 51.573868997085803 ], [ -0.014076232910156, 51.573868997085803 ], [ -0.014076232910156, 51.468766318140872 ], [ -0.212860107421875, 51.468766318140872 ] ] ] } } 6 | ] 7 | } 8 | -------------------------------------------------------------------------------- /test/rastersource.asc: -------------------------------------------------------------------------------- 1 | 0 0 0 0 2 | 0 0 0 250 3 | 0 0 250 500 4 | 0 0 0 250 5 | 0 0 0 0 -------------------------------------------------------------------------------- /third_party/flatbuffers/.bazelignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | -------------------------------------------------------------------------------- /third_party/flatbuffers/.bazelrc: -------------------------------------------------------------------------------- 1 | # We cannot use "common" here because the "version" command doesn't support 2 | # --deleted_packages. We need to specify it for both build and query instead. 3 | build --deleted_packages=tests/ts/bazel_repository_test_dir 4 | query --deleted_packages=tests/ts/bazel_repository_test_dir 5 | -------------------------------------------------------------------------------- /third_party/flatbuffers/.clang-format: -------------------------------------------------------------------------------- 1 | --- 2 | Language: Cpp 3 | BasedOnStyle: Google 4 | DerivePointerAlignment: false 5 | PointerAlignment: Right 6 | IndentPPDirectives: AfterHash 7 | Cpp11BracedListStyle: false 8 | AlwaysBreakTemplateDeclarations: false 9 | AllowShortCaseLabelsOnASingleLine: true 10 | SpaceAfterTemplateKeyword: false 11 | AllowShortBlocksOnASingleLine: true 12 | ... 13 | 14 | -------------------------------------------------------------------------------- /third_party/flatbuffers/.editorconfig: -------------------------------------------------------------------------------- 1 | root = true 2 | # Don't set line endings to avoid conflict with core.autocrlf flag. 3 | # Line endings on checkout/checkin are controlled by .gitattributes file. 4 | [*] 5 | indent_style = space 6 | indent_size = 2 7 | insert_final_newline = true 8 | trim_trailing_whitespace = true 9 | -------------------------------------------------------------------------------- /third_party/flatbuffers/.eslintrc.js: -------------------------------------------------------------------------------- 1 | /* eslint-env node */ 2 | 3 | module.exports = { 4 | root: true, 5 | parser: '@typescript-eslint/parser', 6 | plugins: [ 7 | '@typescript-eslint', 8 | ], 9 | extends: [ 10 | 'eslint:recommended', 11 | 'plugin:@typescript-eslint/recommended', 12 | ] 13 | }; -------------------------------------------------------------------------------- /third_party/flatbuffers/.gitattributes: -------------------------------------------------------------------------------- 1 | # Set the default behavior, in case people don't have core.autocrlf set. 2 | * text=auto 3 | -------------------------------------------------------------------------------- /third_party/flatbuffers/.npmrc: -------------------------------------------------------------------------------- 1 | hoist=false 2 | -------------------------------------------------------------------------------- /third_party/flatbuffers/CMake/DESCRIPTION.txt: -------------------------------------------------------------------------------- 1 | FlatBuffers is a cross platform serialization library architected for 2 | maximum memory efficiency. It allows you to directly access serialized 3 | data without parsing/unpacking it first, while still having great 4 | forwards/backwards compatibility. 5 | -------------------------------------------------------------------------------- /third_party/flatbuffers/CMake/flatbuffers-config-version.cmake.in: -------------------------------------------------------------------------------- 1 | set(PACKAGE_VERSION "@VERSION_MAJOR@.@VERSION_MINOR@.@VERSION_PATCH@") 2 | 3 | # Check whether the requested PACKAGE_FIND_VERSION is compatible 4 | if("${PACKAGE_VERSION}" VERSION_LESS "${PACKAGE_FIND_VERSION}") 5 | set(PACKAGE_VERSION_COMPATIBLE FALSE) 6 | else() 7 | set(PACKAGE_VERSION_COMPATIBLE TRUE) 8 | if ("${PACKAGE_VERSION}" VERSION_EQUAL "${PACKAGE_FIND_VERSION}") 9 | set(PACKAGE_VERSION_EXACT TRUE) 10 | endif() 11 | endif() 12 | -------------------------------------------------------------------------------- /third_party/flatbuffers/CMake/flatbuffers-config.cmake: -------------------------------------------------------------------------------- 1 | include("${CMAKE_CURRENT_LIST_DIR}/FlatBuffersTargets.cmake" OPTIONAL) 2 | include("${CMAKE_CURRENT_LIST_DIR}/FlatcTargets.cmake" OPTIONAL) 3 | include("${CMAKE_CURRENT_LIST_DIR}/FlatBuffersSharedTargets.cmake" OPTIONAL) 4 | include("${CMAKE_CURRENT_LIST_DIR}/BuildFlatBuffers.cmake" OPTIONAL) -------------------------------------------------------------------------------- /third_party/flatbuffers/CMake/flatbuffers.pc.in: -------------------------------------------------------------------------------- 1 | libdir=@CMAKE_INSTALL_FULL_LIBDIR@ 2 | includedir=@CMAKE_INSTALL_FULL_INCLUDEDIR@ 3 | 4 | Name: FlatBuffers 5 | Description: Memory Efficient Serialization Library 6 | Version: @VERSION_MAJOR@.@VERSION_MINOR@.@VERSION_PATCH@ 7 | 8 | Libs: -L${libdir} -lflatbuffers 9 | Cflags: -I${includedir} 10 | -------------------------------------------------------------------------------- /third_party/flatbuffers/SECURITY.md: -------------------------------------------------------------------------------- 1 | # Security Policy 2 | 3 | ## Reporting a Vulnerability 4 | 5 | To report a security issue, please use http://g.co/vulnz. We use 6 | http://g.co/vulnz for our intake, and do coordination and disclosure here on 7 | GitHub (including using GitHub Security Advisory). The Google Security Team will 8 | respond within 5 working days of your report on g.co/vulnz. 9 | 10 | Select the `I want to report a technical security or an abuse risk related bug 11 | in a Google product (SQLi, XSS, etc.)` option and complete the form. 12 | -------------------------------------------------------------------------------- /third_party/flatbuffers/composer.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "google/flatbuffers", 3 | "type": "library", 4 | "description": "FlatBuffers for PHP", 5 | "keywords": ["google", "flatbuffers", "serialization"], 6 | "homepage": "https://github.com/google/flatbuffers", 7 | "license": "Apache-2.0", 8 | "require": { 9 | "php": ">=5.4" 10 | }, 11 | "require-dev": { 12 | }, 13 | "autoload": { 14 | "psr-4": { 15 | "Google\\FlatBuffers\\": "php" 16 | } 17 | } 18 | } -------------------------------------------------------------------------------- /third_party/flatbuffers/conan/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 2.8) 2 | 3 | message(STATUS "Conan FlatBuffers Wrapper") 4 | 5 | include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) 6 | conan_basic_setup() 7 | 8 | if (WIN32 AND MSVC_LIKE AND FLATBUFFERS_BUILD_SHAREDLIB) 9 | set(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS ON) 10 | endif(WIN32 AND MSVC_LIKE AND FLATBUFFERS_BUILD_SHAREDLIB) 11 | 12 | include(${CMAKE_SOURCE_DIR}/CMakeListsOriginal.txt) 13 | -------------------------------------------------------------------------------- /third_party/flatbuffers/conan/test_package/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | project(test_package CXX) 2 | cmake_minimum_required(VERSION 2.8.11) 3 | 4 | include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) 5 | conan_basic_setup() 6 | 7 | add_executable(${PROJECT_NAME} test_package.cpp) 8 | target_link_libraries(${PROJECT_NAME} ${CONAN_LIBS}) 9 | set_property(TARGET ${PROJECT_NAME} PROPERTY CXX_STANDARD 11) 10 | -------------------------------------------------------------------------------- /third_party/flatbuffers/conan/test_package/conanfile.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | # -*- coding: utf-8 -*- 3 | 4 | from conans import ConanFile, CMake 5 | import os 6 | 7 | 8 | class TestPackageConan(ConanFile): 9 | settings = "os", "compiler", "build_type", "arch" 10 | generators = "cmake" 11 | 12 | def build(self): 13 | cmake = CMake(self) 14 | cmake.configure() 15 | cmake.build() 16 | 17 | def test(self): 18 | bin_path = os.path.join("bin", "test_package") 19 | self.run(bin_path, run_environment=True) 20 | self.run("flatc --version", run_environment=True) 21 | self.run("flathash fnv1_16 conan", run_environment=True) 22 | -------------------------------------------------------------------------------- /third_party/flatbuffers/grpc/BUILD.bazel: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Project-OSRM/osrm-backend/560ed5c0e82d7bd6a0887eb58188bf4fa8662372/third_party/flatbuffers/grpc/BUILD.bazel -------------------------------------------------------------------------------- /third_party/flatbuffers/grpc/boringssl.patch: -------------------------------------------------------------------------------- 1 | diff --git a/CMakeLists.txt b/CMakeLists.txt 2 | index 1645a264a..12f8ca999 100644 3 | --- a/CMakeLists.txt 4 | +++ b/CMakeLists.txt 5 | @@ -635,6 +635,8 @@ add_library( 6 | src/ssl/tls_record.cc 7 | ) 8 | 9 | +target_link_libraries(ssl crypto) 10 | + 11 | add_executable( 12 | bssl 13 | 14 | -------------------------------------------------------------------------------- /third_party/flatbuffers/grpc/build_grpc_with_cxx14.patch: -------------------------------------------------------------------------------- 1 | diff --git a/bazel/copts.bzl b/bazel/copts.bzl 2 | index 10be944f25..879518b92f 100644 3 | --- a/bazel/copts.bzl 4 | +++ b/bazel/copts.bzl 5 | @@ -59,4 +59,4 @@ GRPC_LLVM_WARNING_FLAGS = [ 6 | GRPC_DEFAULT_COPTS = select({ 7 | "//:use_strict_warning": GRPC_LLVM_WARNING_FLAGS + ["-DUSE_STRICT_WARNING=1"], 8 | "//conditions:default": [], 9 | -}) 10 | +}) + ["-std=c++14"] 11 | -------------------------------------------------------------------------------- /third_party/flatbuffers/grpc/examples/go/greeter/.gitignore: -------------------------------------------------------------------------------- 1 | **/server 2 | **/client -------------------------------------------------------------------------------- /third_party/flatbuffers/grpc/examples/go/greeter/README.md: -------------------------------------------------------------------------------- 1 | # Go Greeter example 2 | 3 | ## Project Structure 4 | 5 | . 6 | ├── server # Server module 7 | ├── client # Client module 8 | ├── models # Flatbuffers models & main grpc code. 9 | └── README.md 10 | 11 | ## How to run Server: 12 | 13 | - `cd server` 14 | 15 | - `go clean` 16 | 17 | - `go run main.go` 18 | 19 | ## How to run Client: 20 | 21 | - `cd client` 22 | 23 | - `go clean` 24 | 25 | - `go run main.go --name NAME` -------------------------------------------------------------------------------- /third_party/flatbuffers/grpc/examples/go/greeter/client/go.mod: -------------------------------------------------------------------------------- 1 | module github.com/google/flatbuffers/grpc/examples/go/greeter/client 2 | 3 | go 1.15 4 | 5 | replace github.com/google/flatbuffers/grpc/examples/go/greeter/models v0.0.0 => ../models 6 | 7 | require ( 8 | github.com/google/flatbuffers v2.0.8+incompatible 9 | github.com/google/flatbuffers/grpc/examples/go/greeter/models v0.0.0 10 | google.golang.org/grpc v1.56.3 11 | ) 12 | -------------------------------------------------------------------------------- /third_party/flatbuffers/grpc/examples/go/greeter/models/go.mod: -------------------------------------------------------------------------------- 1 | module github.com/google/flatbuffers/grpc/examples/go/greeter/models 2 | 3 | go 1.15 4 | 5 | require ( 6 | github.com/google/flatbuffers v2.0.8+incompatible 7 | google.golang.org/grpc v1.56.3 8 | ) 9 | -------------------------------------------------------------------------------- /third_party/flatbuffers/grpc/examples/go/greeter/server/go.mod: -------------------------------------------------------------------------------- 1 | module github.com/google/flatbuffers/grpc/examples/go/greeter/server 2 | 3 | go 1.15 4 | 5 | replace github.com/google/flatbuffers/grpc/examples/go/greeter/models v0.0.0 => ../models 6 | 7 | require ( 8 | github.com/google/flatbuffers v2.0.8+incompatible 9 | github.com/google/flatbuffers/grpc/examples/go/greeter/models v0.0.0 10 | google.golang.org/grpc v1.56.3 11 | ) 12 | -------------------------------------------------------------------------------- /third_party/flatbuffers/grpc/examples/greeter.fbs: -------------------------------------------------------------------------------- 1 | namespace models; 2 | 3 | table HelloReply { 4 | message:string; 5 | } 6 | 7 | table HelloRequest { 8 | name:string; 9 | } 10 | 11 | rpc_service Greeter { 12 | SayHello(HelloRequest):HelloReply; 13 | SayManyHellos(HelloRequest):HelloReply (streaming: "server"); 14 | } 15 | -------------------------------------------------------------------------------- /third_party/flatbuffers/grpc/examples/python/greeter/README.md: -------------------------------------------------------------------------------- 1 | # Python Greeter example 2 | 3 | ## Prerequisite 4 | 5 | - You need to have grpc python installed on your device `pip install grpcio` 6 | ## How to run Server: 7 | 8 | - `python server.py ${PORT}` 9 | 10 | ## How to run Client: 11 | 12 | - `python client.py ${PORT} ${NAME}` -------------------------------------------------------------------------------- /third_party/flatbuffers/grpc/examples/python/greeter/models/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Project-OSRM/osrm-backend/560ed5c0e82d7bd6a0887eb58188bf4fa8662372/third_party/flatbuffers/grpc/examples/python/greeter/models/__init__.py -------------------------------------------------------------------------------- /third_party/flatbuffers/grpc/examples/swift/Greeter/README.md: -------------------------------------------------------------------------------- 1 | # FlatBuffers.GRPC.Swift 2 | 3 | The following is Swift example on how GRPC would be with Swift Flatbuffers, you can simply run the following commands: 4 | 5 | `swift run Server` 6 | 7 | `swift run Client {port} {name}` 8 | -------------------------------------------------------------------------------- /third_party/flatbuffers/grpc/examples/ts/greeter/README.md: -------------------------------------------------------------------------------- 1 | # TS Greeter example 2 | 3 | The following is an example on how to run the TS grpc server. Make sure that you have `Typescript` installed 4 | 5 | you would need to run `npm run build` or simply use `npm install && tsc` 6 | 7 | ## How to run Server: 8 | 9 | - `npm run server` 10 | 11 | ## How to run Client: 12 | 13 | - `npm run client 3000` -------------------------------------------------------------------------------- /third_party/flatbuffers/grpc/examples/ts/greeter/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "flatbuffers-js-grpc", 3 | "version": "1.0.0", 4 | "author": "mustii@mmk.one", 5 | "scripts": { 6 | "build": "npm install && tsc", 7 | "client": "node dist/client.js", 8 | "server": "node dist/server.js" 9 | }, 10 | "dependencies": { 11 | "@grpc/grpc-js": "^1.3.2", 12 | "flatbuffers": "^2.0.0" 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /third_party/flatbuffers/grpc/examples/ts/greeter/src/greeter.ts: -------------------------------------------------------------------------------- 1 | // automatically generated by the FlatBuffers compiler, do not modify 2 | 3 | /* eslint-disable @typescript-eslint/no-unused-vars, @typescript-eslint/no-explicit-any, @typescript-eslint/no-non-null-assertion */ 4 | 5 | export * as models from './models.js'; 6 | -------------------------------------------------------------------------------- /third_party/flatbuffers/grpc/examples/ts/greeter/src/greeter_generated.ts: -------------------------------------------------------------------------------- 1 | // automatically generated by the FlatBuffers compiler, do not modify 2 | 3 | export { HelloReply } from './models/hello-reply.js'; 4 | export { HelloRequest } from './models/hello-request.js'; 5 | -------------------------------------------------------------------------------- /third_party/flatbuffers/grpc/examples/ts/greeter/src/models.ts: -------------------------------------------------------------------------------- 1 | // automatically generated by the FlatBuffers compiler, do not modify 2 | 3 | /* eslint-disable @typescript-eslint/no-unused-vars, @typescript-eslint/no-explicit-any, @typescript-eslint/no-non-null-assertion */ 4 | 5 | export { HelloReply } from './models/hello-reply.js'; 6 | export { HelloRequest } from './models/hello-request.js'; 7 | -------------------------------------------------------------------------------- /third_party/flatbuffers/grpc/examples/ts/greeter/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "target": "es5", 4 | "module": "commonjs", 5 | "outDir": "./dist", 6 | "allowJs": true, 7 | "sourceMap": true, 8 | "strict": true, 9 | "noImplicitAny": false, 10 | "strictNullChecks": false, 11 | "esModuleInterop": true, 12 | "baseUrl": "./", 13 | "typeRoots": ["node_modules/@types"], 14 | "skipLibCheck": true, 15 | "forceConsistentCasingInFileNames": true 16 | } 17 | } -------------------------------------------------------------------------------- /third_party/flatbuffers/grpc/samples/greeter/Makefile: -------------------------------------------------------------------------------- 1 | CXXFLAGS ?= -I../../../include 2 | LDFLAGS ?= 3 | 4 | .PHONY: all 5 | all: server client 6 | 7 | greeter_generated: greeter.fbs 8 | flatc --grpc --cpp $< 9 | 10 | server: greeter_generated server.cpp greeter.grpc.fb.cc greeter.grpc.fb.h 11 | g++ -std=c++11 -O2 $(CXXFLAGS) $(LDFLAGS) -lgpr -lgrpc -lgrpc++ server.cpp greeter.grpc.fb.cc -o $@ 12 | 13 | client: greeter_generated client.cpp greeter.grpc.fb.cc greeter.grpc.fb.h 14 | g++ -std=c++11 -O2 $(CXXFLAGS) $(LDFLAGS) -lgpr -lgrpc -lgrpc++ client.cpp greeter.grpc.fb.cc -o $@ 15 | -------------------------------------------------------------------------------- /third_party/flatbuffers/grpc/samples/greeter/greeter.fbs: -------------------------------------------------------------------------------- 1 | table HelloReply { 2 | message:string; 3 | } 4 | 5 | table HelloRequest { 6 | name:string; 7 | } 8 | 9 | table ManyHellosRequest { 10 | name:string; 11 | num_greetings:int; 12 | } 13 | 14 | rpc_service Greeter { 15 | SayHello(HelloRequest):HelloReply; 16 | SayManyHellos(ManyHellosRequest):HelloReply (streaming: "server"); 17 | } 18 | -------------------------------------------------------------------------------- /third_party/flatbuffers/grpc/tests/BUILD: -------------------------------------------------------------------------------- 1 | cc_test( 2 | name = "grpc_test", 3 | srcs = [ 4 | "grpctest.cpp", 5 | "message_builder_test.cpp", 6 | ], 7 | copts = ["-Itests"], 8 | # This is required. 9 | linkstatic = 1, 10 | deps = [ 11 | "//tests:monster_test_cc_fbs", 12 | "//tests:monster_test_grpc", 13 | "//tests:test_assert", 14 | "//tests:test_builder", 15 | "@com_github_grpc_grpc//:grpc++", 16 | ], 17 | ) 18 | -------------------------------------------------------------------------------- /third_party/flatbuffers/grpc/tests/java-grpc-test.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # NOTE: make sure `mvn install` in /gprc is executed before running this test 4 | mvn test 5 | -------------------------------------------------------------------------------- /third_party/flatbuffers/lua/flatbuffers.lua: -------------------------------------------------------------------------------- 1 | local m = {} 2 | 3 | m.Builder = require("flatbuffers.builder").New 4 | m.N = require("flatbuffers.numTypes") 5 | m.view = require("flatbuffers.view") 6 | m.binaryArray = require("flatbuffers.binaryarray") 7 | 8 | return m -------------------------------------------------------------------------------- /third_party/flatbuffers/lua/flatbuffers/compat.lua: -------------------------------------------------------------------------------- 1 | local compats = { 2 | ["Lua 5.1"] = function() 3 | -- Check if Lua JIT is installed first 4 | local ok = pcall(require, "jit") 5 | if not ok then 6 | return require("flatbuffers.compat_5_1") 7 | else 8 | return require("flatbuffers.compat_luajit") 9 | end 10 | end, 11 | ["Lua 5.2"] = function() return require("flatbuffers.compat_5_1") end, 12 | ["Lua 5.3"] = function() return require("flatbuffers.compat_5_3") end, 13 | ["Lua 5.4"] = function() return require("flatbuffers.compat_5_3") end, 14 | } 15 | return assert(compats[_VERSION], "Unsupported Lua Version: ".._VERSION)() -------------------------------------------------------------------------------- /third_party/flatbuffers/lua/flatbuffers/compat_5_1.lua: -------------------------------------------------------------------------------- 1 | local m = {} 2 | local ok, bit = pcall(require, "bit32") 3 | assert(ok, "The Bit32 library must be installed") 4 | assert(pcall(require, "compat53"), "The Compat 5.3 library must be installed") 5 | 6 | m.GetAlignSize = function(k, size) 7 | return bit.band(bit.bnot(k) + 1,(size - 1)) 8 | end 9 | 10 | if not table.unpack then 11 | table.unpack = unpack 12 | end 13 | 14 | if not table.pack then 15 | table.pack = pack 16 | end 17 | 18 | m.string_pack = string.pack 19 | m.string_unpack = string.unpack 20 | 21 | return m 22 | -------------------------------------------------------------------------------- /third_party/flatbuffers/lua/flatbuffers/compat_5_3.lua: -------------------------------------------------------------------------------- 1 | -- We need to put it into a separate file to avoid syntax error like `unexpected symbol near '~'` 2 | local m = {} 3 | 4 | 5 | m.GetAlignSize = function(k, size) 6 | return ((~k) + 1) & (size - 1) 7 | end 8 | 9 | 10 | m.string_pack = string.pack 11 | m.string_unpack = string.unpack 12 | 13 | 14 | return m 15 | -------------------------------------------------------------------------------- /third_party/flatbuffers/mjs/README.md: -------------------------------------------------------------------------------- 1 | This folder is intentionally empty and will contain transpiled js modules in ES modules format after compiling with tsc. -------------------------------------------------------------------------------- /third_party/flatbuffers/net/FlatBuffers/flatbuffers.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Project-OSRM/osrm-backend/560ed5c0e82d7bd6a0887eb58188bf4fa8662372/third_party/flatbuffers/net/FlatBuffers/flatbuffers.png -------------------------------------------------------------------------------- /third_party/flatbuffers/net/FlatBuffers/flatbuffers.snk: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Project-OSRM/osrm-backend/560ed5c0e82d7bd6a0887eb58188bf4fa8662372/third_party/flatbuffers/net/FlatBuffers/flatbuffers.snk -------------------------------------------------------------------------------- /third_party/flatbuffers/reflection/BUILD.bazel: -------------------------------------------------------------------------------- 1 | filegroup( 2 | name = "distribution", 3 | srcs = [ 4 | "BUILD.bazel", 5 | "reflection.fbs", 6 | ], 7 | visibility = ["//visibility:public"], 8 | ) 9 | 10 | filegroup( 11 | name = "reflection_fbs_schema", 12 | srcs = ["reflection.fbs"], 13 | visibility = ["//visibility:public"], 14 | ) 15 | -------------------------------------------------------------------------------- /third_party/flatbuffers/reflection/ts/BUILD.bazel: -------------------------------------------------------------------------------- 1 | load("//:typescript.bzl", "flatbuffer_ts_library") 2 | 3 | genrule( 4 | name = "copy_schema_to_folder", 5 | srcs = ["//reflection:reflection_fbs_schema"], 6 | outs = ["reflection.fbs"], 7 | cmd = "cp $< $@", 8 | ) 9 | 10 | flatbuffer_ts_library( 11 | name = "reflection_ts_fbs", 12 | srcs = [":reflection.fbs"], 13 | gen_reflections = True, 14 | visibility = ["//visibility:public"], 15 | ) 16 | -------------------------------------------------------------------------------- /third_party/flatbuffers/samples/go.mod: -------------------------------------------------------------------------------- 1 | module github.com/google/flatbuffers/samples 2 | 3 | go 1.20 4 | 5 | replace github.com/google/flatbuffers/go => ./go_gen 6 | 7 | require github.com/google/flatbuffers/go v0.0.0-00010101000000-000000000000 8 | -------------------------------------------------------------------------------- /third_party/flatbuffers/samples/lua/MyGame/Sample/Color.lua: -------------------------------------------------------------------------------- 1 | -- automatically generated by the FlatBuffers compiler, do not modify 2 | 3 | -- namespace: Sample 4 | 5 | local Color = { 6 | Red = 0, 7 | Green = 1, 8 | Blue = 2, 9 | } 10 | 11 | return Color -- return the module -------------------------------------------------------------------------------- /third_party/flatbuffers/samples/lua/MyGame/Sample/Equipment.lua: -------------------------------------------------------------------------------- 1 | -- automatically generated by the FlatBuffers compiler, do not modify 2 | 3 | -- namespace: Sample 4 | 5 | local Equipment = { 6 | NONE = 0, 7 | Weapon = 1, 8 | } 9 | 10 | return Equipment -- return the module -------------------------------------------------------------------------------- /third_party/flatbuffers/samples/monster.bfbs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Project-OSRM/osrm-backend/560ed5c0e82d7bd6a0887eb58188bf4fa8662372/third_party/flatbuffers/samples/monster.bfbs -------------------------------------------------------------------------------- /third_party/flatbuffers/samples/monster.fbs: -------------------------------------------------------------------------------- 1 | // Example IDL file for our monster's schema. 2 | 3 | namespace MyGame.Sample; 4 | 5 | enum Color:byte { Red = 0, Green, Blue = 2 } 6 | 7 | union Equipment { Weapon } // Optionally add more tables. 8 | 9 | struct Vec3 { 10 | x:float; 11 | y:float; 12 | z:float; 13 | } 14 | 15 | table Monster { 16 | pos:Vec3; 17 | mana:short = 150; 18 | hp:short = 100; 19 | name:string; 20 | friendly:bool = false (deprecated); 21 | inventory:[ubyte]; 22 | color:Color = Blue; 23 | weapons:[Weapon]; 24 | equipped:Equipment; 25 | path:[Vec3]; 26 | } 27 | 28 | table Weapon { 29 | name:string; 30 | damage:short; 31 | } 32 | 33 | root_type Monster; 34 | -------------------------------------------------------------------------------- /third_party/flatbuffers/samples/monsterdata.json: -------------------------------------------------------------------------------- 1 | { 2 | "pos": { 3 | "x": 1.0, 4 | "y": 2.0, 5 | "z": 3.0 6 | }, 7 | "hp": 300, 8 | "name": "Orc", 9 | "weapons": [ 10 | { 11 | "name": "axe", 12 | "damage": 100 13 | }, 14 | { 15 | "name": "bow", 16 | "damage": 90 17 | } 18 | ], 19 | "equipped_type": "Weapon", 20 | "equipped": { 21 | "name": "bow", 22 | "damage": 90 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /third_party/flatbuffers/samples/rust_generated/mod.rs: -------------------------------------------------------------------------------- 1 | // Automatically generated by the Flatbuffers compiler. Do not modify. 2 | // @generated 3 | pub mod my_game { 4 | use super::*; 5 | pub mod sample { 6 | use super::*; 7 | mod color_generated; 8 | pub use self::color_generated::*; 9 | mod equipment_generated; 10 | pub use self::equipment_generated::*; 11 | mod vec_3_generated; 12 | pub use self::vec_3_generated::*; 13 | mod monster_generated; 14 | pub use self::monster_generated::*; 15 | mod weapon_generated; 16 | pub use self::weapon_generated::*; 17 | } // sample 18 | } // my_game 19 | -------------------------------------------------------------------------------- /third_party/flatbuffers/scripts/clang-format-all.sh: -------------------------------------------------------------------------------- 1 | # Running it twice corrects some bugs in clang-format. 2 | for run in {1..2} 3 | do 4 | clang-format -i include/flatbuffers/* src/*.cpp tests/*.cpp samples/*.cpp grpc/src/compiler/schema_interface.h grpc/tests/*.cpp 5 | done 6 | git checkout include/flatbuffers/reflection_generated.h 7 | -------------------------------------------------------------------------------- /third_party/flatbuffers/scripts/clang-format-git.sh: -------------------------------------------------------------------------------- 1 | # Running it twice corrects some bugs in clang-format. 2 | for run in {1..2} 3 | do 4 | git clang-format HEAD^ -- include/flatbuffers/* src/*.cpp tests/*.cpp samples/*.cpp grpc/src/compiler/schema_interface.h grpc/tests/*.cpp -f 5 | done 6 | git checkout include/flatbuffers/reflection_generated.h 7 | -------------------------------------------------------------------------------- /third_party/flatbuffers/scripts/clang-tidy-git.sh: -------------------------------------------------------------------------------- 1 | run-clang-tidy -fix -extra-arg=-std=c++11 -extra-arg=-Wno-unknown-warning-option `git diff --name-only origin/HEAD` 2 | -------------------------------------------------------------------------------- /third_party/flatbuffers/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "target": "es2020", 4 | "module": "commonjs", 5 | "lib": ["ES2020", "DOM"], 6 | "declaration": true, 7 | "outDir": "./js", 8 | "strict": true, 9 | "esModuleInterop": true, 10 | "forceConsistentCasingInFileNames": true 11 | }, 12 | "include": [ 13 | "ts/**/*.ts" 14 | ] 15 | } 16 | -------------------------------------------------------------------------------- /third_party/flatbuffers/tsconfig.mjs.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "target": "es2020", 4 | "module": "es2020", 5 | "moduleResolution": "Bundler", 6 | "lib": ["ES2020", "DOM"], 7 | "declaration": true, 8 | "outDir": "./mjs", 9 | "strict": true, 10 | "esModuleInterop": true, 11 | "forceConsistentCasingInFileNames": true 12 | }, 13 | "include": [ 14 | "ts/**/*.ts" 15 | ] 16 | } 17 | -------------------------------------------------------------------------------- /third_party/fmt/.clang-format: -------------------------------------------------------------------------------- 1 | # Run manually to reformat a file: 2 | # clang-format -i --style=file 3 | Language: Cpp 4 | BasedOnStyle: Google 5 | IndentPPDirectives: AfterHash 6 | IndentCaseLabels: false 7 | AlwaysBreakTemplateDeclarations: false 8 | DerivePointerAlignment: false 9 | -------------------------------------------------------------------------------- /third_party/fmt/.github/dependabot.yml: -------------------------------------------------------------------------------- 1 | version: 2 2 | updates: 3 | - package-ecosystem: "github-actions" # Necessary to update action hashs 4 | directory: "/" 5 | schedule: 6 | interval: "monthly" 7 | # Allow up to 3 opened pull requests for github-actions versions 8 | open-pull-requests-limit: 3 9 | -------------------------------------------------------------------------------- /third_party/fmt/.github/issue_template.md: -------------------------------------------------------------------------------- 1 | 7 | -------------------------------------------------------------------------------- /third_party/fmt/.github/pull_request_template.md: -------------------------------------------------------------------------------- 1 | 8 | -------------------------------------------------------------------------------- /third_party/fmt/.github/workflows/lint.yml: -------------------------------------------------------------------------------- 1 | name: lint 2 | 3 | on: 4 | pull_request: 5 | paths: 6 | - '**.h' 7 | - '**.cc' 8 | 9 | permissions: 10 | contents: read 11 | 12 | jobs: 13 | format_code: 14 | runs-on: ubuntu-latest 15 | steps: 16 | - uses: actions/checkout@v4 17 | 18 | - name: Install clang-format 19 | uses: aminya/setup-cpp@v1 20 | with: 21 | clangformat: 17.0.5 22 | 23 | - name: Run clang-format 24 | run: | 25 | find include src -name '*.h' -o -name '*.cc' | xargs clang-format -i -style=file -fallback-style=none 26 | git diff --exit-code 27 | -------------------------------------------------------------------------------- /third_party/fmt/.gitignore: -------------------------------------------------------------------------------- 1 | *.a 2 | *.so* 3 | *.xcodeproj 4 | *~ 5 | .vscode/ 6 | /CMakeScripts 7 | /Testing 8 | /_CPack_Packages 9 | /doc/doxyxml 10 | /doc/html 11 | /doc/node_modules 12 | /install_manifest.txt 13 | CMakeCache.txt 14 | CMakeFiles 15 | CPack*.cmake 16 | CTestTestfile.cmake 17 | FMT.build 18 | Makefile 19 | bin/ 20 | build/ 21 | cmake_install.cmake 22 | fmt-*.cmake 23 | fmt.pc 24 | virtualenv 25 | -------------------------------------------------------------------------------- /third_party/fmt/doc/_static/breathe.css: -------------------------------------------------------------------------------- 1 | 2 | /* -- breathe specific styles ----------------------------------------------- */ 3 | 4 | /* So enum value descriptions are displayed inline to the item */ 5 | .breatheenumvalues li tt + p { 6 | display: inline; 7 | } 8 | 9 | /* So parameter descriptions are displayed inline to the item */ 10 | .breatheparameterlist li tt + p { 11 | display: inline; 12 | } 13 | 14 | .container .breathe-sectiondef { 15 | width: inherit; 16 | } 17 | 18 | .github-btn { 19 | border: 0; 20 | overflow: hidden; 21 | } 22 | 23 | .jumbotron { 24 | background-size: 100% 4px; 25 | background-repeat: repeat-y; 26 | color: white; 27 | text-align: center; 28 | } 29 | -------------------------------------------------------------------------------- /third_party/fmt/doc/_static/fonts/glyphicons-halflings-regular.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Project-OSRM/osrm-backend/560ed5c0e82d7bd6a0887eb58188bf4fa8662372/third_party/fmt/doc/_static/fonts/glyphicons-halflings-regular.eot -------------------------------------------------------------------------------- /third_party/fmt/doc/_static/fonts/glyphicons-halflings-regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Project-OSRM/osrm-backend/560ed5c0e82d7bd6a0887eb58188bf4fa8662372/third_party/fmt/doc/_static/fonts/glyphicons-halflings-regular.ttf -------------------------------------------------------------------------------- /third_party/fmt/doc/_static/fonts/glyphicons-halflings-regular.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Project-OSRM/osrm-backend/560ed5c0e82d7bd6a0887eb58188bf4fa8662372/third_party/fmt/doc/_static/fonts/glyphicons-halflings-regular.woff -------------------------------------------------------------------------------- /third_party/fmt/doc/basic-bootstrap/README: -------------------------------------------------------------------------------- 1 | Sphinx basic theme with Bootstrap support. Modifications are kept to 2 | a minimum to simplify integration in case of changes to Sphinx theming. 3 | -------------------------------------------------------------------------------- /third_party/fmt/doc/basic-bootstrap/theme.conf: -------------------------------------------------------------------------------- 1 | [theme] 2 | inherit = basic 3 | -------------------------------------------------------------------------------- /third_party/fmt/doc/bootstrap/breadcrumbs.less: -------------------------------------------------------------------------------- 1 | // 2 | // Breadcrumbs 3 | // -------------------------------------------------- 4 | 5 | 6 | .breadcrumb { 7 | padding: @breadcrumb-padding-vertical @breadcrumb-padding-horizontal; 8 | margin-bottom: @line-height-computed; 9 | list-style: none; 10 | background-color: @breadcrumb-bg; 11 | border-radius: @border-radius-base; 12 | 13 | > li { 14 | display: inline-block; 15 | 16 | + li:before { 17 | content: "@{breadcrumb-separator}\00a0"; // Unicode space added since inline-block means non-collapsing white-space 18 | padding: 0 5px; 19 | color: @breadcrumb-color; 20 | } 21 | } 22 | 23 | > .active { 24 | color: @breadcrumb-active-color; 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /third_party/fmt/doc/bootstrap/mixins/alerts.less: -------------------------------------------------------------------------------- 1 | // Alerts 2 | 3 | .alert-variant(@background; @border; @text-color) { 4 | background-color: @background; 5 | border-color: @border; 6 | color: @text-color; 7 | 8 | hr { 9 | border-top-color: darken(@border, 5%); 10 | } 11 | .alert-link { 12 | color: darken(@text-color, 10%); 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /third_party/fmt/doc/bootstrap/mixins/background-variant.less: -------------------------------------------------------------------------------- 1 | // Contextual backgrounds 2 | 3 | .bg-variant(@color) { 4 | background-color: @color; 5 | a&:hover { 6 | background-color: darken(@color, 10%); 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /third_party/fmt/doc/bootstrap/mixins/border-radius.less: -------------------------------------------------------------------------------- 1 | // Single side border-radius 2 | 3 | .border-top-radius(@radius) { 4 | border-top-right-radius: @radius; 5 | border-top-left-radius: @radius; 6 | } 7 | .border-right-radius(@radius) { 8 | border-bottom-right-radius: @radius; 9 | border-top-right-radius: @radius; 10 | } 11 | .border-bottom-radius(@radius) { 12 | border-bottom-right-radius: @radius; 13 | border-bottom-left-radius: @radius; 14 | } 15 | .border-left-radius(@radius) { 16 | border-bottom-left-radius: @radius; 17 | border-top-left-radius: @radius; 18 | } 19 | -------------------------------------------------------------------------------- /third_party/fmt/doc/bootstrap/mixins/center-block.less: -------------------------------------------------------------------------------- 1 | // Center-align a block level element 2 | 3 | .center-block() { 4 | display: block; 5 | margin-left: auto; 6 | margin-right: auto; 7 | } 8 | -------------------------------------------------------------------------------- /third_party/fmt/doc/bootstrap/mixins/clearfix.less: -------------------------------------------------------------------------------- 1 | // Clearfix 2 | // 3 | // For modern browsers 4 | // 1. The space content is one way to avoid an Opera bug when the 5 | // contenteditable attribute is included anywhere else in the document. 6 | // Otherwise it causes space to appear at the top and bottom of elements 7 | // that are clearfixed. 8 | // 2. The use of `table` rather than `block` is only necessary if using 9 | // `:before` to contain the top-margins of child elements. 10 | // 11 | // Source: http://nicolasgallagher.com/micro-clearfix-hack/ 12 | 13 | .clearfix() { 14 | &:before, 15 | &:after { 16 | content: " "; // 1 17 | display: table; // 2 18 | } 19 | &:after { 20 | clear: both; 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /third_party/fmt/doc/bootstrap/mixins/hide-text.less: -------------------------------------------------------------------------------- 1 | // CSS image replacement 2 | // 3 | // Heads up! v3 launched with with only `.hide-text()`, but per our pattern for 4 | // mixins being reused as classes with the same name, this doesn't hold up. As 5 | // of v3.0.1 we have added `.text-hide()` and deprecated `.hide-text()`. 6 | // 7 | // Source: https://github.com/h5bp/html5-boilerplate/commit/aa0396eae757 8 | 9 | // Deprecated as of v3.0.1 (will be removed in v4) 10 | .hide-text() { 11 | font: ~"0/0" a; 12 | color: transparent; 13 | text-shadow: none; 14 | background-color: transparent; 15 | border: 0; 16 | } 17 | 18 | // New mixin to use as of v3.0.1 19 | .text-hide() { 20 | .hide-text(); 21 | } 22 | -------------------------------------------------------------------------------- /third_party/fmt/doc/bootstrap/mixins/labels.less: -------------------------------------------------------------------------------- 1 | // Labels 2 | 3 | .label-variant(@color) { 4 | background-color: @color; 5 | 6 | &[href] { 7 | &:hover, 8 | &:focus { 9 | background-color: darken(@color, 10%); 10 | } 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /third_party/fmt/doc/bootstrap/mixins/list-group.less: -------------------------------------------------------------------------------- 1 | // List Groups 2 | 3 | .list-group-item-variant(@state; @background; @color) { 4 | .list-group-item-@{state} { 5 | color: @color; 6 | background-color: @background; 7 | 8 | a& { 9 | color: @color; 10 | 11 | .list-group-item-heading { 12 | color: inherit; 13 | } 14 | 15 | &:hover, 16 | &:focus { 17 | color: @color; 18 | background-color: darken(@background, 5%); 19 | } 20 | &.active, 21 | &.active:hover, 22 | &.active:focus { 23 | color: #fff; 24 | background-color: @color; 25 | border-color: @color; 26 | } 27 | } 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /third_party/fmt/doc/bootstrap/mixins/nav-divider.less: -------------------------------------------------------------------------------- 1 | // Horizontal dividers 2 | // 3 | // Dividers (basically an hr) within dropdowns and nav lists 4 | 5 | .nav-divider(@color: #e5e5e5) { 6 | height: 1px; 7 | margin: ((@line-height-computed / 2) - 1) 0; 8 | overflow: hidden; 9 | background-color: @color; 10 | } 11 | -------------------------------------------------------------------------------- /third_party/fmt/doc/bootstrap/mixins/nav-vertical-align.less: -------------------------------------------------------------------------------- 1 | // Navbar vertical align 2 | // 3 | // Vertically center elements in the navbar. 4 | // Example: an element has a height of 30px, so write out `.navbar-vertical-align(30px);` to calculate the appropriate top margin. 5 | 6 | .navbar-vertical-align(@element-height) { 7 | margin-top: ((@navbar-height - @element-height) / 2); 8 | margin-bottom: ((@navbar-height - @element-height) / 2); 9 | } 10 | -------------------------------------------------------------------------------- /third_party/fmt/doc/bootstrap/mixins/opacity.less: -------------------------------------------------------------------------------- 1 | // Opacity 2 | 3 | .opacity(@opacity) { 4 | opacity: @opacity; 5 | // IE8 filter 6 | @opacity-ie: (@opacity * 100); 7 | filter: ~"alpha(opacity=@{opacity-ie})"; 8 | } 9 | -------------------------------------------------------------------------------- /third_party/fmt/doc/bootstrap/mixins/pagination.less: -------------------------------------------------------------------------------- 1 | // Pagination 2 | 3 | .pagination-size(@padding-vertical; @padding-horizontal; @font-size; @border-radius) { 4 | > li { 5 | > a, 6 | > span { 7 | padding: @padding-vertical @padding-horizontal; 8 | font-size: @font-size; 9 | } 10 | &:first-child { 11 | > a, 12 | > span { 13 | .border-left-radius(@border-radius); 14 | } 15 | } 16 | &:last-child { 17 | > a, 18 | > span { 19 | .border-right-radius(@border-radius); 20 | } 21 | } 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /third_party/fmt/doc/bootstrap/mixins/panels.less: -------------------------------------------------------------------------------- 1 | // Panels 2 | 3 | .panel-variant(@border; @heading-text-color; @heading-bg-color; @heading-border) { 4 | border-color: @border; 5 | 6 | & > .panel-heading { 7 | color: @heading-text-color; 8 | background-color: @heading-bg-color; 9 | border-color: @heading-border; 10 | 11 | + .panel-collapse > .panel-body { 12 | border-top-color: @border; 13 | } 14 | .badge { 15 | color: @heading-bg-color; 16 | background-color: @heading-text-color; 17 | } 18 | } 19 | & > .panel-footer { 20 | + .panel-collapse > .panel-body { 21 | border-bottom-color: @border; 22 | } 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /third_party/fmt/doc/bootstrap/mixins/progress-bar.less: -------------------------------------------------------------------------------- 1 | // Progress bars 2 | 3 | .progress-bar-variant(@color) { 4 | background-color: @color; 5 | 6 | // Deprecated parent class requirement as of v3.2.0 7 | .progress-striped & { 8 | #gradient > .striped(); 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /third_party/fmt/doc/bootstrap/mixins/reset-filter.less: -------------------------------------------------------------------------------- 1 | // Reset filters for IE 2 | // 3 | // When you need to remove a gradient background, do not forget to use this to reset 4 | // the IE filter for IE9 and below. 5 | 6 | .reset-filter() { 7 | filter: e(%("progid:DXImageTransform.Microsoft.gradient(enabled = false)")); 8 | } 9 | -------------------------------------------------------------------------------- /third_party/fmt/doc/bootstrap/mixins/resize.less: -------------------------------------------------------------------------------- 1 | // Resize anything 2 | 3 | .resizable(@direction) { 4 | resize: @direction; // Options: horizontal, vertical, both 5 | overflow: auto; // Per CSS3 UI, `resize` only applies when `overflow` isn't `visible` 6 | } 7 | -------------------------------------------------------------------------------- /third_party/fmt/doc/bootstrap/mixins/responsive-visibility.less: -------------------------------------------------------------------------------- 1 | // Responsive utilities 2 | 3 | // 4 | // More easily include all the states for responsive-utilities.less. 5 | .responsive-visibility() { 6 | display: block !important; 7 | table& { display: table; } 8 | tr& { display: table-row !important; } 9 | th&, 10 | td& { display: table-cell !important; } 11 | } 12 | 13 | .responsive-invisibility() { 14 | display: none !important; 15 | } 16 | -------------------------------------------------------------------------------- /third_party/fmt/doc/bootstrap/mixins/size.less: -------------------------------------------------------------------------------- 1 | // Sizing shortcuts 2 | 3 | .size(@width; @height) { 4 | width: @width; 5 | height: @height; 6 | } 7 | 8 | .square(@size) { 9 | .size(@size; @size); 10 | } 11 | -------------------------------------------------------------------------------- /third_party/fmt/doc/bootstrap/mixins/tab-focus.less: -------------------------------------------------------------------------------- 1 | // WebKit-style focus 2 | 3 | .tab-focus() { 4 | // Default 5 | outline: thin dotted; 6 | // WebKit 7 | outline: 5px auto -webkit-focus-ring-color; 8 | outline-offset: -2px; 9 | } 10 | -------------------------------------------------------------------------------- /third_party/fmt/doc/bootstrap/mixins/text-emphasis.less: -------------------------------------------------------------------------------- 1 | // Typography 2 | 3 | .text-emphasis-variant(@color) { 4 | color: @color; 5 | a&:hover { 6 | color: darken(@color, 10%); 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /third_party/fmt/doc/bootstrap/mixins/text-overflow.less: -------------------------------------------------------------------------------- 1 | // Text overflow 2 | // Requires inline-block or block for proper styling 3 | 4 | .text-overflow() { 5 | overflow: hidden; 6 | text-overflow: ellipsis; 7 | white-space: nowrap; 8 | } 9 | -------------------------------------------------------------------------------- /third_party/fmt/doc/bootstrap/responsive-embed.less: -------------------------------------------------------------------------------- 1 | // Embeds responsive 2 | // 3 | // Credit: Nicolas Gallagher and SUIT CSS. 4 | 5 | .embed-responsive { 6 | position: relative; 7 | display: block; 8 | height: 0; 9 | padding: 0; 10 | overflow: hidden; 11 | 12 | .embed-responsive-item, 13 | iframe, 14 | embed, 15 | object, 16 | video { 17 | position: absolute; 18 | top: 0; 19 | left: 0; 20 | bottom: 0; 21 | height: 100%; 22 | width: 100%; 23 | border: 0; 24 | } 25 | } 26 | 27 | // Modifier class for 16:9 aspect ratio 28 | .embed-responsive-16by9 { 29 | padding-bottom: 56.25%; 30 | } 31 | 32 | // Modifier class for 4:3 aspect ratio 33 | .embed-responsive-4by3 { 34 | padding-bottom: 75%; 35 | } 36 | -------------------------------------------------------------------------------- /third_party/fmt/doc/bootstrap/wells.less: -------------------------------------------------------------------------------- 1 | // 2 | // Wells 3 | // -------------------------------------------------- 4 | 5 | 6 | // Base class 7 | .well { 8 | min-height: 20px; 9 | padding: 19px; 10 | margin-bottom: 20px; 11 | background-color: @well-bg; 12 | border: 1px solid @well-border; 13 | border-radius: @border-radius-base; 14 | .box-shadow(inset 0 1px 1px rgba(0,0,0,.05)); 15 | blockquote { 16 | border-color: #ddd; 17 | border-color: rgba(0,0,0,.15); 18 | } 19 | } 20 | 21 | // Sizes 22 | .well-lg { 23 | padding: 24px; 24 | border-radius: @border-radius-large; 25 | } 26 | .well-sm { 27 | padding: 9px; 28 | border-radius: @border-radius-small; 29 | } 30 | -------------------------------------------------------------------------------- /third_party/fmt/doc/contents.rst: -------------------------------------------------------------------------------- 1 | ######## 2 | Contents 3 | ######## 4 | 5 | .. toctree:: 6 | :maxdepth: 2 7 | 8 | usage 9 | api 10 | syntax 11 | -------------------------------------------------------------------------------- /third_party/fmt/support/Android.mk: -------------------------------------------------------------------------------- 1 | LOCAL_PATH := $(call my-dir) 2 | include $(CLEAR_VARS) 3 | 4 | LOCAL_MODULE := fmt_static 5 | LOCAL_MODULE_FILENAME := libfmt 6 | 7 | LOCAL_SRC_FILES := ../src/format.cc 8 | 9 | LOCAL_C_INCLUDES := $(LOCAL_PATH) 10 | LOCAL_EXPORT_C_INCLUDES := $(LOCAL_PATH) 11 | 12 | LOCAL_CFLAGS += -std=c++11 -fexceptions 13 | 14 | include $(BUILD_STATIC_LIBRARY) 15 | 16 | -------------------------------------------------------------------------------- /third_party/fmt/support/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /third_party/fmt/support/README: -------------------------------------------------------------------------------- 1 | This directory contains build support files such as 2 | 3 | * CMake modules 4 | * Build scripts 5 | -------------------------------------------------------------------------------- /third_party/fmt/support/Vagrantfile: -------------------------------------------------------------------------------- 1 | # -*- mode: ruby -*- 2 | # vi: set ft=ruby : 3 | 4 | # A vagrant config for testing against gcc-4.8. 5 | Vagrant.configure("2") do |config| 6 | config.vm.box = "ubuntu/xenial64" 7 | config.disksize.size = '15GB' 8 | 9 | config.vm.provider "virtualbox" do |vb| 10 | vb.memory = "4096" 11 | end 12 | 13 | config.vm.provision "shell", inline: <<-SHELL 14 | apt-get update 15 | apt-get install -y g++ make wget git 16 | wget -q https://github.com/Kitware/CMake/releases/download/v3.26.0/cmake-3.26.0-Linux-x86_64.tar.gz 17 | tar xzf cmake-3.26.0-Linux-x86_64.tar.gz 18 | ln -s `pwd`/cmake-3.26.0-Linux-x86_64/bin/cmake /usr/local/bin 19 | SHELL 20 | end 21 | -------------------------------------------------------------------------------- /third_party/fmt/support/bazel/.bazelversion: -------------------------------------------------------------------------------- 1 | 6.1.2 2 | -------------------------------------------------------------------------------- /third_party/fmt/support/bazel/WORKSPACE.bazel: -------------------------------------------------------------------------------- 1 | workspace(name = "fmt") 2 | -------------------------------------------------------------------------------- /third_party/fmt/support/cmake/FindSetEnv.cmake: -------------------------------------------------------------------------------- 1 | # A CMake script to find SetEnv.cmd. 2 | 3 | find_program(WINSDK_SETENV NAMES SetEnv.cmd 4 | PATHS "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Microsoft SDKs\\Windows;CurrentInstallFolder]/bin") 5 | if (WINSDK_SETENV AND PRINT_PATH) 6 | execute_process(COMMAND ${CMAKE_COMMAND} -E echo "${WINSDK_SETENV}") 7 | endif () 8 | -------------------------------------------------------------------------------- /third_party/fmt/support/cmake/fmt-config.cmake.in: -------------------------------------------------------------------------------- 1 | @PACKAGE_INIT@ 2 | 3 | if (NOT TARGET fmt::fmt) 4 | include(${CMAKE_CURRENT_LIST_DIR}/@targets_export_name@.cmake) 5 | endif () 6 | 7 | check_required_components(fmt) 8 | -------------------------------------------------------------------------------- /third_party/fmt/support/cmake/fmt.pc.in: -------------------------------------------------------------------------------- 1 | prefix=@CMAKE_INSTALL_PREFIX@ 2 | exec_prefix=@CMAKE_INSTALL_PREFIX@ 3 | libdir=@libdir_for_pc_file@ 4 | includedir=@includedir_for_pc_file@ 5 | 6 | Name: fmt 7 | Description: A modern formatting library 8 | Version: @FMT_VERSION@ 9 | Libs: -L${libdir} -l@FMT_LIB_NAME@ 10 | Cflags: -I${includedir} 11 | 12 | -------------------------------------------------------------------------------- /third_party/fmt/support/rtd/conf.py: -------------------------------------------------------------------------------- 1 | # Sphinx configuration for readthedocs. 2 | 3 | import os, sys 4 | 5 | master_doc = 'index' 6 | html_theme = 'theme' 7 | html_theme_path = ["."] 8 | -------------------------------------------------------------------------------- /third_party/fmt/support/rtd/index.rst: -------------------------------------------------------------------------------- 1 | If you are not redirected automatically, follow the 2 | `link to the fmt documentation `_. 3 | -------------------------------------------------------------------------------- /third_party/fmt/support/rtd/theme/layout.html: -------------------------------------------------------------------------------- 1 | {% extends "basic/layout.html" %} 2 | 3 | {% block extrahead %} 4 | 5 | 6 | 9 | Page Redirection 10 | {% endblock %} 11 | 12 | {% block document %} 13 | If you are not redirected automatically, follow the link to the fmt documentation. 14 | {% endblock %} 15 | 16 | {% block footer %} 17 | {% endblock %} 18 | -------------------------------------------------------------------------------- /third_party/fmt/support/rtd/theme/theme.conf: -------------------------------------------------------------------------------- 1 | [theme] 2 | inherit = basic 3 | -------------------------------------------------------------------------------- /third_party/fmt/test/add-subdirectory-test/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 3.8...3.25) 2 | 3 | project(fmt-test CXX) 4 | 5 | add_subdirectory(../.. fmt) 6 | 7 | add_executable(library-test main.cc) 8 | target_include_directories(library-test PUBLIC SYSTEM .) 9 | target_compile_options(library-test PRIVATE ${PEDANTIC_COMPILE_FLAGS}) 10 | target_link_libraries(library-test fmt::fmt) 11 | 12 | if (TARGET fmt::fmt-header-only) 13 | add_executable(header-only-test main.cc) 14 | target_include_directories(header-only-test PUBLIC SYSTEM .) 15 | target_compile_options(header-only-test PRIVATE ${PEDANTIC_COMPILE_FLAGS}) 16 | target_link_libraries(header-only-test fmt::fmt-header-only) 17 | endif () 18 | -------------------------------------------------------------------------------- /third_party/fmt/test/add-subdirectory-test/main.cc: -------------------------------------------------------------------------------- 1 | #include "fmt/core.h" 2 | 3 | int main(int argc, char** argv) { 4 | for (int i = 0; i < argc; ++i) fmt::print("{}: {}\n", i, argv[i]); 5 | } 6 | -------------------------------------------------------------------------------- /third_party/fmt/test/cuda-test/cpp14.cc: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | // The purpose of this part is to ensure NVCC's host compiler also supports 4 | // the standard version. See 'cuda-cpp14.cu'. 5 | // 6 | // https://en.cppreference.com/w/cpp/preprocessor/replace#Predefined_macros 7 | static_assert(__cplusplus >= 201402L, "expect C++ 2014 for host compiler"); 8 | 9 | auto make_message_cpp() -> std::string { 10 | return fmt::format("host compiler \t: __cplusplus == {}", __cplusplus); 11 | } 12 | -------------------------------------------------------------------------------- /third_party/fmt/test/detect-stdfs.cc: -------------------------------------------------------------------------------- 1 | // Formatting library for C++ - tests of formatters for standard library types 2 | // 3 | // Copyright (c) 2012 - present, Victor Zverovich 4 | // All rights reserved. 5 | // 6 | // For the license information refer to format.h. 7 | 8 | #include // _GLIBCXX_RELEASE & _LIBCPP_VERSION 9 | 10 | #if defined(_GLIBCXX_RELEASE) && _GLIBCXX_RELEASE == 8 11 | # error libfound "stdc++fs" 12 | #elif !defined(__apple_build_version__) && defined(_LIBCPP_VERSION) && \ 13 | _LIBCPP_VERSION >= 7000 && _LIBCPP_VERSION < 9000 14 | # error libfound "c++fs" 15 | #else 16 | // none if std::filesystem does not require additional libraries 17 | # error libfound "" 18 | #endif 19 | -------------------------------------------------------------------------------- /third_party/fmt/test/find-package-test/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 3.8...3.25) 2 | 3 | project(fmt-test) 4 | 5 | find_package(FMT REQUIRED) 6 | 7 | add_executable(library-test main.cc) 8 | target_link_libraries(library-test fmt::fmt) 9 | target_compile_options(library-test PRIVATE ${PEDANTIC_COMPILE_FLAGS}) 10 | target_include_directories(library-test PUBLIC SYSTEM .) 11 | 12 | if (TARGET fmt::fmt-header-only) 13 | add_executable(header-only-test main.cc) 14 | target_link_libraries(header-only-test fmt::fmt-header-only) 15 | target_compile_options(header-only-test PRIVATE ${PEDANTIC_COMPILE_FLAGS}) 16 | target_include_directories(header-only-test PUBLIC SYSTEM .) 17 | endif () 18 | -------------------------------------------------------------------------------- /third_party/fmt/test/find-package-test/main.cc: -------------------------------------------------------------------------------- 1 | #include "fmt/format.h" 2 | 3 | int main(int argc, char** argv) { 4 | for (int i = 0; i < argc; ++i) fmt::print("{}: {}\n", i, argv[i]); 5 | } 6 | -------------------------------------------------------------------------------- /third_party/fmt/test/fuzzing/.gitignore: -------------------------------------------------------------------------------- 1 | # ignore artifacts from the build.sh script 2 | build-*/ 3 | 4 | -------------------------------------------------------------------------------- /third_party/fmt/test/fuzzing/main.cc: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | 5 | #include "fuzzer-common.h" 6 | 7 | extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size); 8 | 9 | int main(int argc, char** argv) { 10 | for (int i = 1; i < argc; ++i) { 11 | std::ifstream in(argv[i]); 12 | assert(in); 13 | in.seekg(0, std::ios_base::end); 14 | const auto size = in.tellg(); 15 | assert(size >= 0); 16 | in.seekg(0, std::ios_base::beg); 17 | std::vector buf(static_cast(size)); 18 | in.read(buf.data(), size); 19 | assert(in.gcount() == size); 20 | LLVMFuzzerTestOneInput(as_bytes(buf.data()), buf.size()); 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /third_party/fmt/test/gtest/.clang-format: -------------------------------------------------------------------------------- 1 | # Disable clang-format here 2 | DisableFormat: true 3 | SortIncludes: Never 4 | -------------------------------------------------------------------------------- /third_party/fmt/test/header-only-test.cc: -------------------------------------------------------------------------------- 1 | // Header-only configuration test 2 | 3 | #include "fmt/core.h" 4 | #include "fmt/ostream.h" 5 | #include "gtest/gtest.h" 6 | 7 | #ifndef FMT_HEADER_ONLY 8 | # error "Not in the header-only mode." 9 | #endif 10 | 11 | TEST(header_only_test, format) { EXPECT_EQ(fmt::format("foo"), "foo"); } 12 | -------------------------------------------------------------------------------- /third_party/fmt/test/noexception-test.cc: -------------------------------------------------------------------------------- 1 | // Formatting library for C++ - Noexception tests 2 | // 3 | // Copyright (c) 2012 - present, Victor Zverovich 4 | // All rights reserved. 5 | // 6 | // For the license information refer to format.h. 7 | 8 | #include "fmt/args.h" 9 | #include "fmt/chrono.h" 10 | #include "fmt/color.h" 11 | #include "fmt/compile.h" 12 | #include "fmt/core.h" 13 | #include "fmt/format.h" 14 | #include "fmt/os.h" 15 | #include "fmt/ostream.h" 16 | #include "fmt/printf.h" 17 | #include "fmt/ranges.h" 18 | #include "fmt/xchar.h" 19 | -------------------------------------------------------------------------------- /third_party/fmt/test/ranges-odr-test.cc: -------------------------------------------------------------------------------- 1 | // Formatting library for C++ - the core API 2 | // 3 | // Copyright (c) 2012 - present, Victor Zverovich 4 | // All rights reserved. 5 | // 6 | // For the license information refer to format.h. 7 | 8 | #include 9 | 10 | #include "fmt/ranges.h" 11 | #include "gtest/gtest.h" 12 | 13 | // call fmt::format from another translation unit to test ODR 14 | TEST(ranges_odr_test, format_vector) { 15 | auto v = std::vector{1, 2, 3, 5, 7, 11}; 16 | EXPECT_EQ(fmt::format("{}", v), "[1, 2, 3, 5, 7, 11]"); 17 | } 18 | -------------------------------------------------------------------------------- /third_party/fmt/test/static-export-test/library.cc: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | __attribute__((visibility("default"))) std::string foo() { 4 | return fmt::format(FMT_COMPILE("foo bar {}"), 4242); 5 | } 6 | -------------------------------------------------------------------------------- /third_party/fmt/test/static-export-test/main.cc: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | extern std::string foo(); 5 | 6 | int main() { std::cout << foo() << std::endl; } 7 | -------------------------------------------------------------------------------- /third_party/libosmium/.codecov.yml: -------------------------------------------------------------------------------- 1 | 2 | ignore: 3 | - "include/gdalcpp.hpp" 4 | - "include/protozero" 5 | - "include/utf8" 6 | - "test/include/catch.hpp" 7 | 8 | -------------------------------------------------------------------------------- /third_party/libosmium/.github/FUNDING.yml: -------------------------------------------------------------------------------- 1 | custom: "https://osmcode.org/sponsors.html" 2 | -------------------------------------------------------------------------------- /third_party/libosmium/.github/ISSUE_TEMPLATE/config.yml: -------------------------------------------------------------------------------- 1 | contact_links: 2 | - name: help.osm.org 3 | url: https://help.openstreetmap.org/ 4 | about: Ask questions and get support from the community. 5 | -------------------------------------------------------------------------------- /third_party/libosmium/.github/actions/build-windows/action.yml: -------------------------------------------------------------------------------- 1 | name: Windows Build 2 | 3 | runs: 4 | using: composite 5 | steps: 6 | - name: Build 7 | run: cmake --build . --config Release --verbose 8 | shell: bash 9 | working-directory: build 10 | 11 | -------------------------------------------------------------------------------- /third_party/libosmium/.github/actions/build/action.yml: -------------------------------------------------------------------------------- 1 | name: Build 2 | 3 | runs: 4 | using: composite 5 | steps: 6 | - name: Build 7 | run: make VERBOSE=1 8 | shell: bash 9 | working-directory: build 10 | 11 | -------------------------------------------------------------------------------- /third_party/libosmium/.github/actions/cmake-windows/action.yml: -------------------------------------------------------------------------------- 1 | name: Windows CMake 2 | 3 | runs: 4 | using: composite 5 | steps: 6 | - name: Create build directory 7 | run: mkdir build 8 | shell: bash 9 | - name: Configure 10 | run: | 11 | cmake -LA .. \ 12 | -DCMAKE_TOOLCHAIN_FILE=C:/vcpkg/scripts/buildsystems/vcpkg.cmake \ 13 | -DBUILD_HEADERS=OFF \ 14 | -DBUILD_BENCHMARKS=ON \ 15 | -DOsmium_DEBUG=TRUE \ 16 | -DPROTOZERO_INCLUDE_DIR=${GITHUB_WORKSPACE}/../protozero/include 17 | shell: bash 18 | working-directory: build 19 | 20 | -------------------------------------------------------------------------------- /third_party/libosmium/.github/actions/cmake/action.yml: -------------------------------------------------------------------------------- 1 | name: CMake 2 | 3 | runs: 4 | using: composite 5 | steps: 6 | - name: Create build directory 7 | run: mkdir build 8 | shell: bash 9 | - name: Configure 10 | run: | 11 | cmake -LA .. \ 12 | -DBUILD_DATA_TESTS=ON \ 13 | -DUSE_CPP_VERSION=${CPP_VERSION} \ 14 | -DWITH_PROJ=${WITH_PROJ} \ 15 | -DCMAKE_BUILD_TYPE=${BUILD_TYPE} \ 16 | -DPROTOZERO_INCLUDE_DIR=${GITHUB_WORKSPACE}/../protozero/include 17 | shell: bash 18 | working-directory: build 19 | 20 | -------------------------------------------------------------------------------- /third_party/libosmium/.github/actions/ctest-windows/action.yml: -------------------------------------------------------------------------------- 1 | name: Windows Test 2 | 3 | runs: 4 | using: composite 5 | steps: 6 | - name: Test 7 | run: ctest --output-on-failure -C Release 8 | shell: bash 9 | working-directory: build 10 | 11 | -------------------------------------------------------------------------------- /third_party/libosmium/.github/actions/ctest/action.yml: -------------------------------------------------------------------------------- 1 | name: ctest 2 | 3 | runs: 4 | using: composite 5 | steps: 6 | - name: Test 7 | run: ctest --output-on-failure 8 | shell: bash 9 | working-directory: build 10 | 11 | -------------------------------------------------------------------------------- /third_party/libosmium/.github/actions/install-macos/action.yml: -------------------------------------------------------------------------------- 1 | name: Install homebrew packages on macOS 2 | 3 | runs: 4 | using: composite 5 | steps: 6 | - name: Install packages 7 | run: | 8 | brew install \ 9 | boost \ 10 | gdal \ 11 | google-sparsehash 12 | shell: bash 13 | 14 | -------------------------------------------------------------------------------- /third_party/libosmium/.github/actions/install-protozero/action.yml: -------------------------------------------------------------------------------- 1 | name: Install Protozero from git 2 | 3 | runs: 4 | using: composite 5 | steps: 6 | - name: Install from git 7 | run: git clone --quiet --depth 1 https://github.com/mapbox/protozero.git ../protozero 8 | shell: bash 9 | 10 | -------------------------------------------------------------------------------- /third_party/libosmium/.github/actions/install-ubuntu/action.yml: -------------------------------------------------------------------------------- 1 | name: Install apt packages on Ubuntu/Debian 2 | 3 | runs: 4 | using: composite 5 | steps: 6 | - name: Install packages 7 | run: | 8 | sudo apt-get update -qq 9 | sudo apt-get install -yq \ 10 | doxygen \ 11 | libboost-dev \ 12 | libgdal-dev \ 13 | libgeos++-dev \ 14 | liblz4-dev \ 15 | libproj-dev \ 16 | libsparsehash-dev \ 17 | ruby-json \ 18 | spatialite-bin 19 | shell: bash 20 | 21 | -------------------------------------------------------------------------------- /third_party/libosmium/.github/actions/install-windows/action.yml: -------------------------------------------------------------------------------- 1 | name: Install vcpkg packages on Windows 2 | 3 | runs: 4 | using: composite 5 | steps: 6 | - name: Install packages 7 | run: | 8 | vcpkg install \ 9 | boost-crc:x64-windows \ 10 | boost-variant:x64-windows \ 11 | bzip2:x64-windows \ 12 | expat:x64-windows \ 13 | lz4:x64-windows \ 14 | sparsehash:x64-windows \ 15 | zlib:x64-windows 16 | shell: bash 17 | 18 | -------------------------------------------------------------------------------- /third_party/libosmium/.gitignore: -------------------------------------------------------------------------------- 1 | *.swp 2 | .ycm_extra_conf.pyc 3 | /_build* 4 | /build 5 | /libosmium-deps 6 | /.vs* 7 | -------------------------------------------------------------------------------- /third_party/libosmium/.gitmodules: -------------------------------------------------------------------------------- 1 | [submodule "test/data-tests/osm-testdata"] 2 | path = test/data-tests/osm-testdata 3 | url = https://github.com/osmcode/osm-testdata 4 | -------------------------------------------------------------------------------- /third_party/libosmium/benchmarks/download_data.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # 3 | # download_data.sh 4 | # 5 | 6 | cd $DATA_DIR 7 | curl --location --output 1_liechtenstein.osm.pbf https://download.geofabrik.de/europe/liechtenstein-latest.osm.pbf # about 2 MB 8 | curl --location --output 2_bremen.osm.pbf https://download.geofabrik.de/europe/germany/bremen-latest.osm.pbf # about 16 MB 9 | curl --location --output 3_sachsen.osm.pbf https://download.geofabrik.de/europe/germany/sachsen-latest.osm.pbf # about 160 MB 10 | curl --location --output 4_germany.osm.pbf https://download.geofabrik.de/europe/germany-latest.osm.pbf # about 3 GB 11 | curl --location --output 5_planet.osm.pbf https://planet.osm.org/pbf/planet-latest.osm.pbf # about 35 GB 12 | 13 | -------------------------------------------------------------------------------- /third_party/libosmium/benchmarks/run_benchmark_count.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # 3 | # run_benchmark_count.sh 4 | # 5 | 6 | set -e 7 | 8 | BENCHMARK_NAME=count 9 | 10 | . @CMAKE_BINARY_DIR@/benchmarks/setup.sh 11 | 12 | CMD=$OB_DIR/osmium_benchmark_$BENCHMARK_NAME 13 | 14 | echo "# file size num mem time cpu_kernel cpu_user cpu_percent cmd options" 15 | for data in $OB_DATA_FILES; do 16 | filename=`basename $data` 17 | filesize=`stat --format="%s" --dereference $data` 18 | for n in $OB_SEQ; do 19 | $OB_TIME_CMD -f "$filename $filesize $n $OB_TIME_FORMAT" $CMD $data 2>&1 >/dev/null | sed -e "s%$DATA_DIR/%%" | sed -e "s%$OB_DIR/%%" 20 | done 21 | done 22 | 23 | -------------------------------------------------------------------------------- /third_party/libosmium/benchmarks/run_benchmark_count_tag.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # 3 | # run_benchmark_count_tag.sh 4 | # 5 | 6 | set -e 7 | 8 | BENCHMARK_NAME=count_tag 9 | 10 | . @CMAKE_BINARY_DIR@/benchmarks/setup.sh 11 | 12 | CMD=$OB_DIR/osmium_benchmark_$BENCHMARK_NAME 13 | 14 | echo "# file size num mem time cpu_kernel cpu_user cpu_percent cmd options" 15 | for data in $OB_DATA_FILES; do 16 | filename=`basename $data` 17 | filesize=`stat --format="%s" --dereference $data` 18 | for n in $OB_SEQ; do 19 | $OB_TIME_CMD -f "$filename $filesize $n $OB_TIME_FORMAT" $CMD $data 2>&1 >/dev/null | sed -e "s%$DATA_DIR/%%" | sed -e "s%$OB_DIR/%%" 20 | done 21 | done 22 | 23 | -------------------------------------------------------------------------------- /third_party/libosmium/benchmarks/run_benchmark_mercator.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # 3 | # run_benchmark_mercator.sh 4 | # 5 | 6 | set -e 7 | 8 | BENCHMARK_NAME=mercator 9 | 10 | . @CMAKE_BINARY_DIR@/benchmarks/setup.sh 11 | 12 | CMD=$OB_DIR/osmium_benchmark_$BENCHMARK_NAME 13 | 14 | echo "# file size num mem time cpu_kernel cpu_user cpu_percent cmd options" 15 | for data in $OB_DATA_FILES; do 16 | filename=`basename $data` 17 | filesize=`stat --format="%s" --dereference $data` 18 | for n in $OB_SEQ; do 19 | $OB_TIME_CMD -f "$filename $filesize $n $OB_TIME_FORMAT" $CMD $data 2>&1 >/dev/null | sed -e "s%$DATA_DIR/%%" | sed -e "s%$OB_DIR/%%" 20 | done 21 | done 22 | 23 | -------------------------------------------------------------------------------- /third_party/libosmium/benchmarks/run_benchmark_static_vs_dynamic_index.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # 3 | # run_benchmark_static_vs_dynamic_index.sh 4 | # 5 | 6 | set -e 7 | 8 | BENCHMARK_NAME=static_vs_dynamic_index 9 | 10 | . @CMAKE_BINARY_DIR@/benchmarks/setup.sh 11 | 12 | CMD=$OB_DIR/osmium_benchmark_$BENCHMARK_NAME 13 | 14 | for data in $OB_DATA_FILES; do 15 | filesize=`stat --format="%s" --dereference $data` 16 | if [ $filesize -lt 500000000 ]; then 17 | echo "========================" 18 | $CMD $data 19 | fi 20 | done 21 | 22 | -------------------------------------------------------------------------------- /third_party/libosmium/benchmarks/run_benchmarks.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # 3 | # run_benchmarks.sh 4 | # 5 | # Run all benchmarks. 6 | # 7 | 8 | set -e 9 | 10 | for benchmark in @CMAKE_BINARY_DIR@/benchmarks/run_benchmark_*.sh; do 11 | name=`basename $benchmark` 12 | echo "Running $name..." 13 | $benchmark 14 | done 15 | 16 | -------------------------------------------------------------------------------- /third_party/libosmium/cmake/README: -------------------------------------------------------------------------------- 1 | 2 | FindGem.cmake from https://github.com/rock-core/base-cmake 3 | 4 | -------------------------------------------------------------------------------- /third_party/libosmium/doc/README.md: -------------------------------------------------------------------------------- 1 | 2 | The `header.html` is created with: 3 | 4 | `doxygen -w html header.html footer.html stylesheet.css` 5 | 6 | This might have to be run again for newer Doxygen versions. After that add 7 | changes back in. 8 | 9 | -------------------------------------------------------------------------------- /third_party/libosmium/doc/osmium.css: -------------------------------------------------------------------------------- 1 | 2 | body { 3 | font-family: "Droid Sans",Helvetica,Arial,sans-serif; 4 | background-color: #ffffff; 5 | color: #202060; 6 | } 7 | 8 | .tabs, .tabs2, .tabs3, .navpath ul, .tablist li { 9 | background-image: none; 10 | } 11 | 12 | .tabs, .tabs2, .tabs3 { 13 | border-top: 1px solid #202060; 14 | } 15 | 16 | div.contents { 17 | margin: 0px; 18 | padding-top: 10px; 19 | padding-left: 12px; 20 | padding-right: 8px; 21 | } 22 | 23 | -------------------------------------------------------------------------------- /third_party/libosmium/test/README: -------------------------------------------------------------------------------- 1 | Osmium uses Catch (https://github.com/catchorg/Catch2/) for its unit tests. 2 | 3 | Currently we are still using version 1. 4 | 5 | Only one header file is needed (catch.hpp) which can be downloaded from 6 | https://github.com/catchorg/Catch2/tree/Catch1.x and put into the include 7 | directory. 8 | 9 | -------------------------------------------------------------------------------- /third_party/libosmium/test/data-tests/.gitignore: -------------------------------------------------------------------------------- 1 | multipolygon.qgs~ 2 | -------------------------------------------------------------------------------- /third_party/libosmium/test/data-tests/README.md: -------------------------------------------------------------------------------- 1 | # OSM Testdata 2 | 3 | This directory contains software that can be used with the osm-testdata 4 | repository at https://github.com/osmcode/osm-testdata . To use it, clone 5 | the `osm-testdata` repository in the same directory where you cloned the 6 | `libosmium` repository. 7 | 8 | Tests will be built if the CMake option `BUILD_DATA_TESTS` is set and run as 9 | part of the `ctest` run. 10 | 11 | -------------------------------------------------------------------------------- /third_party/libosmium/test/data-tests/include/testdata-testcases.hpp: -------------------------------------------------------------------------------- 1 | #ifndef TESTDATA_TESTCASES_HPP 2 | #define TESTDATA_TESTCASES_HPP 3 | 4 | #include 5 | 6 | #include 7 | 8 | extern std::string dirname; 9 | 10 | #endif // TESTDATA_TESTCASES_HPP 11 | -------------------------------------------------------------------------------- /third_party/libosmium/test/examples/t/amenity_list/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | 2 | add_test(NAME examples_amenity_list_node 3 | COMMAND osmium_amenity_list ${CMAKE_CURRENT_SOURCE_DIR}/node.osm) 4 | 5 | set_tests_properties(examples_amenity_list_node PROPERTIES 6 | PASS_REGULAR_EXPRESSION " 8\\.8721, 53\\.0966 post_office") 7 | 8 | add_test(NAME examples_amenity_list_area 9 | COMMAND osmium_amenity_list ${CMAKE_CURRENT_SOURCE_DIR}/area.osm) 10 | 11 | set_tests_properties(examples_amenity_list_area PROPERTIES 12 | PASS_REGULAR_EXPRESSION " 8\\.5839, 53\\.5602 restaurant") 13 | 14 | -------------------------------------------------------------------------------- /third_party/libosmium/test/examples/t/amenity_list/node.osm: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /third_party/libosmium/test/examples/t/change_tags/.gitattributes: -------------------------------------------------------------------------------- 1 | result.osm text eol=lf 2 | -------------------------------------------------------------------------------- /third_party/libosmium/test/examples/t/change_tags/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | 2 | add_test(NAME examples_change_tags 3 | COMMAND osmium_change_tags ${CMAKE_CURRENT_SOURCE_DIR}/data.osm ${CMAKE_CURRENT_BINARY_DIR}/result.osm) 4 | 5 | add_test(NAME examples_change_tags_compare 6 | COMMAND ${CMAKE_COMMAND} -E compare_files ${CMAKE_CURRENT_SOURCE_DIR}/result.osm ${CMAKE_CURRENT_BINARY_DIR}/result.osm) 7 | 8 | set_tests_properties(examples_change_tags_compare PROPERTIES DEPENDS examples_change_tags) 9 | 10 | -------------------------------------------------------------------------------- /third_party/libosmium/test/examples/t/count/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | 2 | add_test(NAME examples_count 3 | COMMAND osmium_count ${CMAKE_CURRENT_SOURCE_DIR}/data.osm) 4 | 5 | set_tests_properties(examples_count PROPERTIES 6 | PASS_REGULAR_EXPRESSION "^Nodes: 2\nWays: 1\nRelations: 1\n\nMemory used:" 7 | ) 8 | 9 | -------------------------------------------------------------------------------- /third_party/libosmium/test/examples/t/count/data.osm: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /third_party/libosmium/test/examples/t/create_pois/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | 2 | add_test(NAME examples_create_pois_okay 3 | COMMAND osmium_create_pois -) 4 | 5 | set_tests_properties(examples_create_pois_okay PROPERTIES 6 | PASS_REGULAR_EXPRESSION "^n-1 v1 dV c0 t....-..-..T..:..:..Z i0 u Tamenity=post_box x1\\.23 y3\\.45\nn-2 v1 dV c0 t....-..-..T..:..:..Z i0 u Tamenity=restaurant,name=Chez%20%OSM x1\\.24 y3\\.46\n$" 7 | ) 8 | 9 | add_test(NAME examples_create_pois_unknown_file_type 10 | COMMAND osmium_create_pois foo) 11 | 12 | set_tests_properties(examples_create_pois_unknown_file_type PROPERTIES WILL_FAIL true) 13 | 14 | -------------------------------------------------------------------------------- /third_party/libosmium/test/examples/t/debug/changesets.osm: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /third_party/libosmium/test/examples/t/filter_discussions/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | 2 | add_test(NAME examples_filter_discussions 3 | COMMAND osmium_filter_discussions ${CMAKE_CURRENT_SOURCE_DIR}/changesets.osm -) 4 | 5 | set_tests_properties(examples_filter_discussions PROPERTIES 6 | FAIL_REGULAR_EXPRESSION " 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /third_party/libosmium/test/examples/t/location_cache/way.osm: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /third_party/libosmium/test/examples/t/pub_names/pub-addr.osm: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /third_party/libosmium/test/examples/t/pub_names/pub-node.osm: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /third_party/libosmium/test/examples/t/pub_names/pub-noname.osm: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /third_party/libosmium/test/examples/t/read/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | 2 | add_test(NAME examples_read 3 | COMMAND osmium_read ${CMAKE_CURRENT_SOURCE_DIR}/data.osm) 4 | 5 | -------------------------------------------------------------------------------- /third_party/libosmium/test/examples/t/read_with_progress/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | 2 | add_test(NAME examples_read_with_progress 3 | COMMAND osmium_read_with_progress ${CMAKE_CURRENT_SOURCE_DIR}/data.osm) 4 | 5 | -------------------------------------------------------------------------------- /third_party/libosmium/test/examples/t/road_length/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | 2 | add_test(NAME examples_road_length 3 | COMMAND osmium_road_length ${CMAKE_CURRENT_SOURCE_DIR}/road.osm) 4 | 5 | set_tests_properties(examples_road_length PROPERTIES 6 | PASS_REGULAR_EXPRESSION "^Length: 0\\.405.*km\n$" 7 | ) 8 | 9 | -------------------------------------------------------------------------------- /third_party/libosmium/test/examples/t/tiles/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | 2 | add_test(NAME examples_tiles_zoom_too_large 3 | COMMAND osmium_tiles 50 1 1) 4 | 5 | set_tests_properties(examples_tiles_zoom_too_large PROPERTIES WILL_FAIL true) 6 | 7 | add_test(NAME examples_tiles_location_invalid 8 | COMMAND osmium_tiles 1 200 200) 9 | 10 | set_tests_properties(examples_tiles_location_invalid PROPERTIES WILL_FAIL true) 11 | 12 | add_test(NAME examples_tiles_okay 13 | COMMAND osmium_tiles 8 55.3 11.7) 14 | 15 | set_tests_properties(examples_tiles_okay PROPERTIES 16 | PASS_REGULAR_EXPRESSION "^WGS84: lon=55.3 lat=11.7\nMercator: x=.*\nTile: zoom=8 x=167 y=119\n$" 17 | ) 18 | 19 | -------------------------------------------------------------------------------- /third_party/libosmium/test/include/test_crc.hpp: -------------------------------------------------------------------------------- 1 | #ifndef OSMIUM_TEST_CRC_HPP 2 | #define OSMIUM_TEST_CRC_HPP 3 | 4 | #ifdef OSMIUM_TEST_CRC_USE_BOOST 5 | 6 | /* Use the CRC32 implementation from boost. */ 7 | #include 8 | using crc_type = boost::crc_32_type; 9 | 10 | #else 11 | 12 | /* Use the CRC32 implementation from zlib. */ 13 | #include 14 | using crc_type = osmium::CRC_zlib; 15 | 16 | #endif 17 | 18 | #endif // OSMIUM_TEST_CRC_HPP 19 | -------------------------------------------------------------------------------- /third_party/libosmium/test/t/geom/test_crs.cpp: -------------------------------------------------------------------------------- 1 | #include "catch.hpp" 2 | 3 | #include 4 | 5 | TEST_CASE("CRS") { 6 | const osmium::geom::CRS wgs84{4326}; 7 | const osmium::geom::CRS mercator{3857}; 8 | 9 | const osmium::geom::Coordinates c{osmium::geom::deg_to_rad(1.2), osmium::geom::deg_to_rad(3.4)}; 10 | const auto ct = osmium::geom::transform(wgs84, mercator, c); 11 | const auto c2 = osmium::geom::transform(mercator, wgs84, ct); 12 | 13 | REQUIRE(c.x == Approx(c2.x)); 14 | REQUIRE(c.y == Approx(c2.y)); 15 | } 16 | 17 | -------------------------------------------------------------------------------- /third_party/libosmium/test/t/geom/test_exception.cpp: -------------------------------------------------------------------------------- 1 | #include "catch.hpp" 2 | 3 | #include 4 | 5 | #include 6 | 7 | TEST_CASE("Geometry exception") { 8 | 9 | const osmium::geometry_error e{"some error message", "node", 17}; 10 | REQUIRE(e.id() == 17); 11 | REQUIRE(std::string{e.what()} == "some error message (node_id=17)"); 12 | 13 | } 14 | 15 | -------------------------------------------------------------------------------- /third_party/libosmium/test/t/index/test_nwr_array.cpp: -------------------------------------------------------------------------------- 1 | #include "catch.hpp" 2 | 3 | #include 4 | 5 | TEST_CASE("nwr_array") { 6 | osmium::nwr_array a; 7 | a(osmium::item_type::node) = 1; 8 | a(osmium::item_type::way) = 2; 9 | a(osmium::item_type::relation) = 3; 10 | 11 | REQUIRE(a(osmium::item_type::node) == 1); 12 | REQUIRE(a(osmium::item_type::way) == 2); 13 | REQUIRE(a(osmium::item_type::relation) == 3); 14 | 15 | auto it = a.cbegin(); 16 | REQUIRE(*it++ == 1); 17 | REQUIRE(*it++ == 2); 18 | REQUIRE(*it++ == 3); 19 | REQUIRE(it == a.cend()); 20 | } 21 | 22 | -------------------------------------------------------------------------------- /third_party/libosmium/test/t/io/corrupt_data_bzip2.txt.bz2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Project-OSRM/osrm-backend/560ed5c0e82d7bd6a0887eb58188bf4fa8662372/third_party/libosmium/test/t/io/corrupt_data_bzip2.txt.bz2 -------------------------------------------------------------------------------- /third_party/libosmium/test/t/io/corrupt_data_gzip.txt.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Project-OSRM/osrm-backend/560ed5c0e82d7bd6a0887eb58188bf4fa8662372/third_party/libosmium/test/t/io/corrupt_data_gzip.txt.gz -------------------------------------------------------------------------------- /third_party/libosmium/test/t/io/data-cr.opl: -------------------------------------------------------------------------------- 1 | n1 v1 dV c1 t2014-01-01T00:00:00Z i1 utest T x1.02 y1.02 2 | -------------------------------------------------------------------------------- /third_party/libosmium/test/t/io/data-n0w1r3.osm.o5m: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Project-OSRM/osrm-backend/560ed5c0e82d7bd6a0887eb58188bf4fa8662372/third_party/libosmium/test/t/io/data-n0w1r3.osm.o5m -------------------------------------------------------------------------------- /third_party/libosmium/test/t/io/data-n0w1r3.osm.opl: -------------------------------------------------------------------------------- 1 | w20 v1 dV c1 t2014-01-01T00:00:00Z i1 utest Thighway=primary Nn10,n11 2 | r30 v1 dV c1 t2014-01-01T00:00:00Z i1 utest Ttype=test Mn10@none 3 | r31 v1 dV c1 t2014-01-01T00:00:00Z i1 utest Ttype=restriction Mw20@from,n11@via,w22@to 4 | r32 v1 dV c1 t2014-01-01T00:00:00Z i1 utest Ttest=relinrel Mr30@none 5 | -------------------------------------------------------------------------------- /third_party/libosmium/test/t/io/data-n5w0r3.osm.o5m: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Project-OSRM/osrm-backend/560ed5c0e82d7bd6a0887eb58188bf4fa8662372/third_party/libosmium/test/t/io/data-n5w0r3.osm.o5m -------------------------------------------------------------------------------- /third_party/libosmium/test/t/io/data-n5w0r3.osm.opl: -------------------------------------------------------------------------------- 1 | n10 v1 dV c1 t2014-01-01T00:00:00Z i1 utest T x1 y1 2 | n11 v1 dV c1 t2014-01-01T00:00:00Z i1 utest T x1.1 y1 3 | n12 v1 dV c1 t2014-01-01T00:00:00Z i1 utest T x1.2 y1 4 | n13 v1 dV c1 t2014-01-01T00:00:00Z i1 utest T x1.3 y1 5 | n14 v1 dV c1 t2014-01-01T00:00:00Z i1 utest T x1.4 y1 6 | r30 v1 dV c1 t2014-01-01T00:00:00Z i1 utest Ttype=test Mn10@none 7 | r31 v1 dV c1 t2014-01-01T00:00:00Z i1 utest Ttype=restriction Mw20@from,n11@via,w22@to 8 | r32 v1 dV c1 t2014-01-01T00:00:00Z i1 utest Ttest=relinrel Mr30@none 9 | -------------------------------------------------------------------------------- /third_party/libosmium/test/t/io/data-n5w1r0.osm.o5m: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Project-OSRM/osrm-backend/560ed5c0e82d7bd6a0887eb58188bf4fa8662372/third_party/libosmium/test/t/io/data-n5w1r0.osm.o5m -------------------------------------------------------------------------------- /third_party/libosmium/test/t/io/data-n5w1r0.osm.opl: -------------------------------------------------------------------------------- 1 | n10 v1 dV c1 t2014-01-01T00:00:00Z i1 utest T x1 y1 2 | n11 v1 dV c1 t2014-01-01T00:00:00Z i1 utest T x1.1 y1 3 | n12 v1 dV c1 t2014-01-01T00:00:00Z i1 utest T x1.2 y1 4 | n13 v1 dV c1 t2014-01-01T00:00:00Z i1 utest T x1.3 y1 5 | n14 v1 dV c1 t2014-01-01T00:00:00Z i1 utest T x1.4 y1 6 | w20 v1 dV c1 t2014-01-01T00:00:00Z i1 utest Thighway=primary Nn10,n11 7 | -------------------------------------------------------------------------------- /third_party/libosmium/test/t/io/data-n5w1r3.osm.o5m: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Project-OSRM/osrm-backend/560ed5c0e82d7bd6a0887eb58188bf4fa8662372/third_party/libosmium/test/t/io/data-n5w1r3.osm.o5m -------------------------------------------------------------------------------- /third_party/libosmium/test/t/io/data-n5w1r3.osm.opl: -------------------------------------------------------------------------------- 1 | n10 v1 dV c1 t2014-01-01T00:00:00Z i1 utest T x1 y1 2 | n11 v1 dV c1 t2014-01-01T00:00:00Z i1 utest T x1.1 y1 3 | n12 v1 dV c1 t2014-01-01T00:00:00Z i1 utest T x1.2 y1 4 | n13 v1 dV c1 t2014-01-01T00:00:00Z i1 utest T x1.3 y1 5 | n14 v1 dV c1 t2014-01-01T00:00:00Z i1 utest T x1.4 y1 6 | w20 v1 dV c1 t2014-01-01T00:00:00Z i1 utest Thighway=primary Nn10,n11 7 | r30 v1 dV c1 t2014-01-01T00:00:00Z i1 utest Ttype=test Mn10@none 8 | r31 v1 dV c1 t2014-01-01T00:00:00Z i1 utest Ttype=restriction Mw20@from,n11@via,w22@to 9 | r32 v1 dV c1 t2014-01-01T00:00:00Z i1 utest Ttest=relinrel Mr30@none 10 | -------------------------------------------------------------------------------- /third_party/libosmium/test/t/io/data-nonl.opl: -------------------------------------------------------------------------------- 1 | n1 v1 dV c1 t2014-01-01T00:00:00Z i1 utest T x1.02 y1.02 -------------------------------------------------------------------------------- /third_party/libosmium/test/t/io/data.opl: -------------------------------------------------------------------------------- 1 | n1 v1 dV c1 t2014-01-01T00:00:00Z i1 utest T x1.02 y1.02 2 | -------------------------------------------------------------------------------- /third_party/libosmium/test/t/io/data.osm: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /third_party/libosmium/test/t/io/data.osm.bz2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Project-OSRM/osrm-backend/560ed5c0e82d7bd6a0887eb58188bf4fa8662372/third_party/libosmium/test/t/io/data.osm.bz2 -------------------------------------------------------------------------------- /third_party/libosmium/test/t/io/data.osm.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Project-OSRM/osrm-backend/560ed5c0e82d7bd6a0887eb58188bf4fa8662372/third_party/libosmium/test/t/io/data.osm.gz -------------------------------------------------------------------------------- /third_party/libosmium/test/t/io/data.txt: -------------------------------------------------------------------------------- 1 | TESTDATA 2 | -------------------------------------------------------------------------------- /third_party/libosmium/test/t/io/data_bzip2.txt.bz2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Project-OSRM/osrm-backend/560ed5c0e82d7bd6a0887eb58188bf4fa8662372/third_party/libosmium/test/t/io/data_bzip2.txt.bz2 -------------------------------------------------------------------------------- /third_party/libosmium/test/t/io/data_gzip.txt.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Project-OSRM/osrm-backend/560ed5c0e82d7bd6a0887eb58188bf4fa8662372/third_party/libosmium/test/t/io/data_gzip.txt.gz -------------------------------------------------------------------------------- /third_party/libosmium/test/t/io/data_pbf_version-1-densenodes.osm.pbf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Project-OSRM/osrm-backend/560ed5c0e82d7bd6a0887eb58188bf4fa8662372/third_party/libosmium/test/t/io/data_pbf_version-1-densenodes.osm.pbf -------------------------------------------------------------------------------- /third_party/libosmium/test/t/io/data_pbf_version-1.osm: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /third_party/libosmium/test/t/io/data_pbf_version-1.osm.pbf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Project-OSRM/osrm-backend/560ed5c0e82d7bd6a0887eb58188bf4fa8662372/third_party/libosmium/test/t/io/data_pbf_version-1.osm.pbf -------------------------------------------------------------------------------- /third_party/libosmium/test/t/io/deleted_nodes.osh: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /third_party/libosmium/test/t/io/deleted_nodes.osh.pbf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Project-OSRM/osrm-backend/560ed5c0e82d7bd6a0887eb58188bf4fa8662372/third_party/libosmium/test/t/io/deleted_nodes.osh.pbf -------------------------------------------------------------------------------- /third_party/libosmium/test/t/io/empty_file: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Project-OSRM/osrm-backend/560ed5c0e82d7bd6a0887eb58188bf4fa8662372/third_party/libosmium/test/t/io/empty_file -------------------------------------------------------------------------------- /third_party/libosmium/test/t/io/test_reader_fileformat.cpp: -------------------------------------------------------------------------------- 1 | #include "catch.hpp" 2 | 3 | #include "utils.hpp" 4 | 5 | #include 6 | 7 | TEST_CASE("Reader throws on unsupported file format") { 8 | REQUIRE_THROWS_AS(osmium::io::Reader{with_data_dir("t/io/data.osm")}, osmium::unsupported_file_format_error); 9 | } 10 | 11 | -------------------------------------------------------------------------------- /third_party/libosmium/test/t/util/.gitattributes: -------------------------------------------------------------------------------- 1 | known_file_size text eol=lf 2 | -------------------------------------------------------------------------------- /third_party/libosmium/test/t/util/known_file_size: -------------------------------------------------------------------------------- 1 | this file has size 22 2 | -------------------------------------------------------------------------------- /third_party/libosmium/test/t/util/test_memory.cpp: -------------------------------------------------------------------------------- 1 | #include "catch.hpp" 2 | 3 | #include 4 | 5 | #include 6 | 7 | TEST_CASE("Check memory usage") { 8 | #ifdef __linux__ 9 | const osmium::MemoryUsage m1; 10 | REQUIRE(m1.current() > 1); 11 | REQUIRE(m1.peak() > 1); 12 | #else 13 | const osmium::MemoryUsage m; 14 | REQUIRE(m.current() == 0); 15 | REQUIRE(m.peak() == 0); 16 | #endif 17 | } 18 | 19 | -------------------------------------------------------------------------------- /third_party/libosmium/test/t/util/test_timer_disabled.cpp: -------------------------------------------------------------------------------- 1 | #include "catch.hpp" 2 | 3 | #include 4 | 5 | #include 6 | #include 7 | 8 | TEST_CASE("timer") { 9 | osmium::Timer timer; 10 | timer.start(); 11 | std::this_thread::sleep_for(std::chrono::milliseconds(1)); 12 | timer.stop(); 13 | REQUIRE(timer.elapsed_microseconds() == 0); 14 | } 15 | 16 | -------------------------------------------------------------------------------- /third_party/libosmium/test/t/util/test_timer_enabled.cpp: -------------------------------------------------------------------------------- 1 | #include "catch.hpp" 2 | 3 | #include 4 | #include 5 | 6 | #define OSMIUM_WITH_TIMER 7 | #include 8 | 9 | TEST_CASE("timer") { 10 | osmium::Timer timer; 11 | timer.start(); 12 | std::this_thread::sleep_for(std::chrono::milliseconds(1)); 13 | timer.stop(); 14 | REQUIRE(timer.elapsed_microseconds() > 900); 15 | } 16 | 17 | -------------------------------------------------------------------------------- /third_party/libosmium/test/test_main.cpp: -------------------------------------------------------------------------------- 1 | #define CATCH_CONFIG_MAIN 2 | #include "catch.hpp" 3 | -------------------------------------------------------------------------------- /third_party/protozero/.gitattributes: -------------------------------------------------------------------------------- 1 | *.pbf -text 2 | -------------------------------------------------------------------------------- /third_party/protozero/FUZZING.md: -------------------------------------------------------------------------------- 1 | 2 | To do fuzz testing using [AFL](https://lcamtuf.coredump.cx/afl/) compile with 3 | the AFL compiler wrappers: 4 | 5 | mkdir build 6 | cd build 7 | CC=afl-clang CXX=afl-clang++ cmake .. 8 | mkdir testcase_dir 9 | 10 | You need some data to start the fuzzing. In this case I am using all the test 11 | messages from the unit tests: 12 | 13 | find ../test/t/ -name data-\*.pbf -a -not -empty -exec cp {} testcase_dir/ \; 14 | 15 | Then do the actual fuzzing: 16 | 17 | afl-fuzz -i testcase_dir -o findings_dir -- tools/pbf-decoder - 18 | 19 | See the AFL documentation for more information. 20 | 21 | This only checkes the reading side of Protozero! 22 | 23 | -------------------------------------------------------------------------------- /third_party/protozero/bench/data/README.md: -------------------------------------------------------------------------------- 1 | 2 | 3 | mapbox-streets-v6/14/8714/8017.vector.pbf 4 | 5 | - https://c.tile.openstreetmap.org/14/8714/8017.png 6 | - https://a.tiles.mapbox.com/v4/mapbox.mapbox-streets-v6/14/8714/8017.vector.pbf 7 | - https://www.mapbox.com/developers/vector-tiles/mapbox-streets/ 8 | 9 | enf-14-4824-6157.vector.pbf 10 | 11 | - enf.8k273nmi 12 | - https://b.tiles.mapbox.com/v4/enf.c3a2de35/14/4824/6157@2x.png 13 | - https://www.mapbox.com/blog/twitter-map-every-tweet/ 14 | -------------------------------------------------------------------------------- /third_party/protozero/bench/data/enf-14-4824-6157.vector.pbf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Project-OSRM/osrm-backend/560ed5c0e82d7bd6a0887eb58188bf4fa8662372/third_party/protozero/bench/data/enf-14-4824-6157.vector.pbf -------------------------------------------------------------------------------- /third_party/protozero/bench/data/mapbox-streets-v6-14-8714-8017.vector.pbf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Project-OSRM/osrm-backend/560ed5c0e82d7bd6a0887eb58188bf4fa8662372/third_party/protozero/bench/data/mapbox-streets-v6-14-8714-8017.vector.pbf -------------------------------------------------------------------------------- /third_party/rapidjson/.gitattributes: -------------------------------------------------------------------------------- 1 | # Set the default behavior, in case people don't have core.autocrlf set. 2 | * text=auto 3 | 4 | # Explicitly declare text files you want to always be normalized and converted 5 | # to native line endings on checkout. 6 | *.cpp text 7 | *.h text 8 | *.txt text 9 | *.md text 10 | *.cmake text 11 | *.svg text 12 | *.dot text 13 | *.yml text 14 | *.in text 15 | *.sh text 16 | *.autopkg text 17 | Dockerfile text 18 | 19 | # Denote all files that are truly binary and should not be modified. 20 | *.png binary 21 | *.jpg binary 22 | *.json binary -------------------------------------------------------------------------------- /third_party/rapidjson/.gitignore: -------------------------------------------------------------------------------- 1 | /bin/* 2 | !/bin/data 3 | !/bin/encodings 4 | !/bin/jsonchecker 5 | !/bin/types 6 | !/bin/unittestschema 7 | /build 8 | /doc/html 9 | /doc/doxygen_*.db 10 | *.a 11 | 12 | # Temporary files created during CMake build 13 | CMakeCache.txt 14 | CMakeFiles 15 | cmake_install.cmake 16 | CTestTestfile.cmake 17 | Makefile 18 | RapidJSON*.cmake 19 | RapidJSON.pc 20 | Testing 21 | /googletest 22 | install_manifest.txt 23 | Doxyfile 24 | Doxyfile.zh-cn 25 | DartConfiguration.tcl 26 | *.nupkg 27 | 28 | # Files created by OS 29 | *.DS_Store 30 | -------------------------------------------------------------------------------- /third_party/rapidjson/.gitmodules: -------------------------------------------------------------------------------- 1 | [submodule "thirdparty/gtest"] 2 | path = thirdparty/gtest 3 | url = https://github.com/google/googletest.git 4 | -------------------------------------------------------------------------------- /third_party/rapidjson/RapidJSON.pc.in: -------------------------------------------------------------------------------- 1 | includedir=@INCLUDE_INSTALL_DIR@ 2 | 3 | Name: @PROJECT_NAME@ 4 | Description: A fast JSON parser/generator for C++ with both SAX/DOM style API 5 | Version: @LIB_VERSION_STRING@ 6 | URL: https://github.com/Tencent/rapidjson 7 | Cflags: -I${includedir} 8 | -------------------------------------------------------------------------------- /third_party/rapidjson/RapidJSONConfigVersion.cmake.in: -------------------------------------------------------------------------------- 1 | SET(PACKAGE_VERSION "@LIB_VERSION_STRING@") 2 | 3 | IF (PACKAGE_FIND_VERSION VERSION_EQUAL PACKAGE_VERSION) 4 | SET(PACKAGE_VERSION_EXACT "true") 5 | ENDIF (PACKAGE_FIND_VERSION VERSION_EQUAL PACKAGE_VERSION) 6 | IF (NOT PACKAGE_FIND_VERSION VERSION_GREATER PACKAGE_VERSION) 7 | SET(PACKAGE_VERSION_COMPATIBLE "true") 8 | ELSE (NOT PACKAGE_FIND_VERSION VERSION_GREATER PACKAGE_VERSION) 9 | SET(PACKAGE_VERSION_UNSUITABLE "true") 10 | ENDIF (NOT PACKAGE_FIND_VERSION VERSION_GREATER PACKAGE_VERSION) 11 | -------------------------------------------------------------------------------- /third_party/rapidjson/bin/data/abcde.txt: -------------------------------------------------------------------------------- 1 | abcde -------------------------------------------------------------------------------- /third_party/rapidjson/bin/data/glossary.json: -------------------------------------------------------------------------------- 1 | { 2 | "glossary": { 3 | "title": "example glossary", 4 | "GlossDiv": { 5 | "title": "S", 6 | "GlossList": { 7 | "GlossEntry": { 8 | "ID": "SGML", 9 | "SortAs": "SGML", 10 | "GlossTerm": "Standard Generalized Markup Language", 11 | "Acronym": "SGML", 12 | "Abbrev": "ISO 8879:1986", 13 | "GlossDef": { 14 | "para": "A meta-markup language, used to create markup languages such as DocBook.", 15 | "GlossSeeAlso": ["GML", "XML"] 16 | }, 17 | "GlossSee": "markup" 18 | } 19 | } 20 | } 21 | } 22 | } -------------------------------------------------------------------------------- /third_party/rapidjson/bin/data/readme.txt: -------------------------------------------------------------------------------- 1 | sample.json is obtained from http://code.google.com/p/json-test-suite/downloads/detail?name=sample.zip 2 | -------------------------------------------------------------------------------- /third_party/rapidjson/bin/data/widget.json: -------------------------------------------------------------------------------- 1 | {"widget": { 2 | "debug": "on", 3 | "window": { 4 | "title": "Sample Konfabulator Widget", 5 | "name": "main_window", 6 | "width": 500, 7 | "height": 500 8 | }, 9 | "image": { 10 | "src": "Images/Sun.png", 11 | "name": "sun1", 12 | "hOffset": 250, 13 | "vOffset": 250, 14 | "alignment": "center" 15 | }, 16 | "text": { 17 | "data": "Click Here", 18 | "size": 36, 19 | "style": "bold", 20 | "name": "text1", 21 | "hOffset": 250, 22 | "vOffset": 100, 23 | "alignment": "center", 24 | "onMouseUp": "sun1.opacity = (sun1.opacity / 100) * 90;" 25 | } 26 | }} -------------------------------------------------------------------------------- /third_party/rapidjson/bin/encodings/utf16be.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Project-OSRM/osrm-backend/560ed5c0e82d7bd6a0887eb58188bf4fa8662372/third_party/rapidjson/bin/encodings/utf16be.json -------------------------------------------------------------------------------- /third_party/rapidjson/bin/encodings/utf16bebom.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Project-OSRM/osrm-backend/560ed5c0e82d7bd6a0887eb58188bf4fa8662372/third_party/rapidjson/bin/encodings/utf16bebom.json -------------------------------------------------------------------------------- /third_party/rapidjson/bin/encodings/utf16le.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Project-OSRM/osrm-backend/560ed5c0e82d7bd6a0887eb58188bf4fa8662372/third_party/rapidjson/bin/encodings/utf16le.json -------------------------------------------------------------------------------- /third_party/rapidjson/bin/encodings/utf16lebom.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Project-OSRM/osrm-backend/560ed5c0e82d7bd6a0887eb58188bf4fa8662372/third_party/rapidjson/bin/encodings/utf16lebom.json -------------------------------------------------------------------------------- /third_party/rapidjson/bin/encodings/utf32be.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Project-OSRM/osrm-backend/560ed5c0e82d7bd6a0887eb58188bf4fa8662372/third_party/rapidjson/bin/encodings/utf32be.json -------------------------------------------------------------------------------- /third_party/rapidjson/bin/encodings/utf32bebom.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Project-OSRM/osrm-backend/560ed5c0e82d7bd6a0887eb58188bf4fa8662372/third_party/rapidjson/bin/encodings/utf32bebom.json -------------------------------------------------------------------------------- /third_party/rapidjson/bin/encodings/utf32le.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Project-OSRM/osrm-backend/560ed5c0e82d7bd6a0887eb58188bf4fa8662372/third_party/rapidjson/bin/encodings/utf32le.json -------------------------------------------------------------------------------- /third_party/rapidjson/bin/encodings/utf32lebom.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Project-OSRM/osrm-backend/560ed5c0e82d7bd6a0887eb58188bf4fa8662372/third_party/rapidjson/bin/encodings/utf32lebom.json -------------------------------------------------------------------------------- /third_party/rapidjson/bin/encodings/utf8.json: -------------------------------------------------------------------------------- 1 | { 2 | "en":"I can eat glass and it doesn't hurt me.", 3 | "zh-Hant":"我能吞下玻璃而不傷身體。", 4 | "zh-Hans":"我能吞下玻璃而不伤身体。", 5 | "ja":"私はガラスを食べられます。それは私を傷つけません。", 6 | "ko":"나는 유리를 먹을 수 있어요. 그래도 아프지 않아요" 7 | } -------------------------------------------------------------------------------- /third_party/rapidjson/bin/encodings/utf8bom.json: -------------------------------------------------------------------------------- 1 | { 2 | "en":"I can eat glass and it doesn't hurt me.", 3 | "zh-Hant":"我能吞下玻璃而不傷身體。", 4 | "zh-Hans":"我能吞下玻璃而不伤身体。", 5 | "ja":"私はガラスを食べられます。それは私を傷つけません。", 6 | "ko":"나는 유리를 먹을 수 있어요. 그래도 아프지 않아요" 7 | } -------------------------------------------------------------------------------- /third_party/rapidjson/bin/jsonchecker/fail1.json: -------------------------------------------------------------------------------- 1 | "A JSON payload should be an object or array, not a string." -------------------------------------------------------------------------------- /third_party/rapidjson/bin/jsonchecker/fail10.json: -------------------------------------------------------------------------------- 1 | {"Extra value after close": true} "misplaced quoted value" -------------------------------------------------------------------------------- /third_party/rapidjson/bin/jsonchecker/fail11.json: -------------------------------------------------------------------------------- 1 | {"Illegal expression": 1 + 2} -------------------------------------------------------------------------------- /third_party/rapidjson/bin/jsonchecker/fail12.json: -------------------------------------------------------------------------------- 1 | {"Illegal invocation": alert()} -------------------------------------------------------------------------------- /third_party/rapidjson/bin/jsonchecker/fail13.json: -------------------------------------------------------------------------------- 1 | {"Numbers cannot have leading zeroes": 013} -------------------------------------------------------------------------------- /third_party/rapidjson/bin/jsonchecker/fail14.json: -------------------------------------------------------------------------------- 1 | {"Numbers cannot be hex": 0x14} -------------------------------------------------------------------------------- /third_party/rapidjson/bin/jsonchecker/fail15.json: -------------------------------------------------------------------------------- 1 | ["Illegal backslash escape: \x15"] -------------------------------------------------------------------------------- /third_party/rapidjson/bin/jsonchecker/fail16.json: -------------------------------------------------------------------------------- 1 | [\naked] -------------------------------------------------------------------------------- /third_party/rapidjson/bin/jsonchecker/fail17.json: -------------------------------------------------------------------------------- 1 | ["Illegal backslash escape: \017"] -------------------------------------------------------------------------------- /third_party/rapidjson/bin/jsonchecker/fail18.json: -------------------------------------------------------------------------------- 1 | [[[[[[[[[[[[[[[[[[[["Too deep"]]]]]]]]]]]]]]]]]]]] -------------------------------------------------------------------------------- /third_party/rapidjson/bin/jsonchecker/fail19.json: -------------------------------------------------------------------------------- 1 | {"Missing colon" null} -------------------------------------------------------------------------------- /third_party/rapidjson/bin/jsonchecker/fail2.json: -------------------------------------------------------------------------------- 1 | ["Unclosed array" -------------------------------------------------------------------------------- /third_party/rapidjson/bin/jsonchecker/fail20.json: -------------------------------------------------------------------------------- 1 | {"Double colon":: null} -------------------------------------------------------------------------------- /third_party/rapidjson/bin/jsonchecker/fail21.json: -------------------------------------------------------------------------------- 1 | {"Comma instead of colon", null} -------------------------------------------------------------------------------- /third_party/rapidjson/bin/jsonchecker/fail22.json: -------------------------------------------------------------------------------- 1 | ["Colon instead of comma": false] -------------------------------------------------------------------------------- /third_party/rapidjson/bin/jsonchecker/fail23.json: -------------------------------------------------------------------------------- 1 | ["Bad value", truth] -------------------------------------------------------------------------------- /third_party/rapidjson/bin/jsonchecker/fail24.json: -------------------------------------------------------------------------------- 1 | ['single quote'] -------------------------------------------------------------------------------- /third_party/rapidjson/bin/jsonchecker/fail25.json: -------------------------------------------------------------------------------- 1 | [" tab character in string "] -------------------------------------------------------------------------------- /third_party/rapidjson/bin/jsonchecker/fail26.json: -------------------------------------------------------------------------------- 1 | ["tab\ character\ in\ string\ "] -------------------------------------------------------------------------------- /third_party/rapidjson/bin/jsonchecker/fail27.json: -------------------------------------------------------------------------------- 1 | ["line 2 | break"] -------------------------------------------------------------------------------- /third_party/rapidjson/bin/jsonchecker/fail28.json: -------------------------------------------------------------------------------- 1 | ["line\ 2 | break"] -------------------------------------------------------------------------------- /third_party/rapidjson/bin/jsonchecker/fail29.json: -------------------------------------------------------------------------------- 1 | [0e] -------------------------------------------------------------------------------- /third_party/rapidjson/bin/jsonchecker/fail3.json: -------------------------------------------------------------------------------- 1 | {unquoted_key: "keys must be quoted"} -------------------------------------------------------------------------------- /third_party/rapidjson/bin/jsonchecker/fail30.json: -------------------------------------------------------------------------------- 1 | [0e+] -------------------------------------------------------------------------------- /third_party/rapidjson/bin/jsonchecker/fail31.json: -------------------------------------------------------------------------------- 1 | [0e+-1] -------------------------------------------------------------------------------- /third_party/rapidjson/bin/jsonchecker/fail32.json: -------------------------------------------------------------------------------- 1 | {"Comma instead if closing brace": true, -------------------------------------------------------------------------------- /third_party/rapidjson/bin/jsonchecker/fail33.json: -------------------------------------------------------------------------------- 1 | ["mismatch"} -------------------------------------------------------------------------------- /third_party/rapidjson/bin/jsonchecker/fail4.json: -------------------------------------------------------------------------------- 1 | ["extra comma",] -------------------------------------------------------------------------------- /third_party/rapidjson/bin/jsonchecker/fail5.json: -------------------------------------------------------------------------------- 1 | ["double extra comma",,] -------------------------------------------------------------------------------- /third_party/rapidjson/bin/jsonchecker/fail6.json: -------------------------------------------------------------------------------- 1 | [ , "<-- missing value"] -------------------------------------------------------------------------------- /third_party/rapidjson/bin/jsonchecker/fail7.json: -------------------------------------------------------------------------------- 1 | ["Comma after the close"], -------------------------------------------------------------------------------- /third_party/rapidjson/bin/jsonchecker/fail8.json: -------------------------------------------------------------------------------- 1 | ["Extra close"]] -------------------------------------------------------------------------------- /third_party/rapidjson/bin/jsonchecker/fail9.json: -------------------------------------------------------------------------------- 1 | {"Extra comma": true,} -------------------------------------------------------------------------------- /third_party/rapidjson/bin/jsonchecker/pass2.json: -------------------------------------------------------------------------------- 1 | [[[[[[[[[[[[[[[[[[["Not too deep"]]]]]]]]]]]]]]]]]]] -------------------------------------------------------------------------------- /third_party/rapidjson/bin/jsonchecker/pass3.json: -------------------------------------------------------------------------------- 1 | { 2 | "JSON Test Pattern pass3": { 3 | "The outermost value": "must be an object or array.", 4 | "In this test": "It is an object." 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /third_party/rapidjson/bin/jsonchecker/readme.txt: -------------------------------------------------------------------------------- 1 | Test suite from http://json.org/JSON_checker/. 2 | 3 | If the JSON_checker is working correctly, it must accept all of the pass*.json files and reject all of the fail*.json files. 4 | -------------------------------------------------------------------------------- /third_party/rapidjson/bin/jsonschema/.gitignore: -------------------------------------------------------------------------------- 1 | TODO 2 | -------------------------------------------------------------------------------- /third_party/rapidjson/bin/jsonschema/.travis.yml: -------------------------------------------------------------------------------- 1 | language: python 2 | python: "2.7" 3 | install: pip install jsonschema 4 | script: bin/jsonschema_suite check 5 | -------------------------------------------------------------------------------- /third_party/rapidjson/bin/jsonschema/remotes/folder/folderInteger.json: -------------------------------------------------------------------------------- 1 | { 2 | "type": "integer" 3 | } -------------------------------------------------------------------------------- /third_party/rapidjson/bin/jsonschema/remotes/integer.json: -------------------------------------------------------------------------------- 1 | { 2 | "type": "integer" 3 | } -------------------------------------------------------------------------------- /third_party/rapidjson/bin/jsonschema/remotes/subSchemas.json: -------------------------------------------------------------------------------- 1 | { 2 | "integer": { 3 | "type": "integer" 4 | }, 5 | "refToInteger": { 6 | "$ref": "#/integer" 7 | } 8 | } -------------------------------------------------------------------------------- /third_party/rapidjson/bin/jsonschema/tests/draft3/optional/jsregex.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "description": "ECMA 262 regex dialect recognition", 4 | "schema": { "format": "regex" }, 5 | "tests": [ 6 | { 7 | "description": "[^] is a valid regex", 8 | "data": "[^]", 9 | "valid": true 10 | }, 11 | { 12 | "description": "ECMA 262 has no support for lookbehind", 13 | "data": "(?<=foo)bar", 14 | "valid": false 15 | } 16 | ] 17 | } 18 | ] 19 | -------------------------------------------------------------------------------- /third_party/rapidjson/bin/jsonschema/tests/draft3/optional/zeroTerminatedFloats.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "description": "some languages do not distinguish between different types of numeric value", 4 | "schema": { 5 | "type": "integer" 6 | }, 7 | "tests": [ 8 | { 9 | "description": "a float is not an integer even without fractional part", 10 | "data": 1.0, 11 | "valid": false 12 | } 13 | ] 14 | } 15 | ] 16 | -------------------------------------------------------------------------------- /third_party/rapidjson/bin/jsonschema/tests/draft4/optional/zeroTerminatedFloats.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "description": "some languages do not distinguish between different types of numeric value", 4 | "schema": { 5 | "type": "integer" 6 | }, 7 | "tests": [ 8 | { 9 | "description": "a float is not an integer even without fractional part", 10 | "data": 1.0, 11 | "valid": false 12 | } 13 | ] 14 | } 15 | ] 16 | -------------------------------------------------------------------------------- /third_party/rapidjson/bin/jsonschema/tox.ini: -------------------------------------------------------------------------------- 1 | [tox] 2 | minversion = 1.6 3 | envlist = py27 4 | skipsdist = True 5 | 6 | [testenv] 7 | deps = jsonschema 8 | commands = {envpython} bin/jsonschema_suite check 9 | -------------------------------------------------------------------------------- /third_party/rapidjson/bin/types/readme.txt: -------------------------------------------------------------------------------- 1 | Test data obtained from https://github.com/xpol/lua-rapidjson/tree/master/performance 2 | -------------------------------------------------------------------------------- /third_party/rapidjson/bin/unittestschema/allOf_address.json: -------------------------------------------------------------------------------- 1 | { 2 | "allOf": [ 3 | { 4 | "$ref": "http://localhost:1234/address.json#" 5 | } 6 | ] 7 | } -------------------------------------------------------------------------------- /third_party/rapidjson/bin/unittestschema/anyOf_address.json: -------------------------------------------------------------------------------- 1 | { 2 | "anyOf": [ 3 | { 4 | "$ref": "http://localhost:1234/address.json#" 5 | } 6 | ] 7 | } -------------------------------------------------------------------------------- /third_party/rapidjson/bin/unittestschema/oneOf_address.json: -------------------------------------------------------------------------------- 1 | { 2 | "oneOf": [ 3 | { 4 | "$ref": "http://localhost:1234/address.json#" 5 | } 6 | ] 7 | } -------------------------------------------------------------------------------- /third_party/rapidjson/contrib/natvis/README.md: -------------------------------------------------------------------------------- 1 | # rapidjson.natvis 2 | 3 | This file can be used as a [Visual Studio Visualizer](https://docs.microsoft.com/en-gb/visualstudio/debugger/create-custom-views-of-native-objects) to aid in visualizing rapidjson structures within the Visual Studio debugger. Natvis visualizers are supported in Visual Studio 2012 and later. To install, copy the file into this directory: 4 | 5 | `%USERPROFILE%\Documents\Visual Studio 2012\Visualizers` 6 | 7 | Each version of Visual Studio has a similar directory, it must be copied into each directory to be used with that particular version. In Visual Studio 2015 and later, this can be done without restarting Visual Studio (a new debugging session must be started). 8 | -------------------------------------------------------------------------------- /third_party/rapidjson/doc/diagram/architecture.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Project-OSRM/osrm-backend/560ed5c0e82d7bd6a0887eb58188bf4fa8662372/third_party/rapidjson/doc/diagram/architecture.png -------------------------------------------------------------------------------- /third_party/rapidjson/doc/diagram/insituparsing.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Project-OSRM/osrm-backend/560ed5c0e82d7bd6a0887eb58188bf4fa8662372/third_party/rapidjson/doc/diagram/insituparsing.png -------------------------------------------------------------------------------- /third_party/rapidjson/doc/diagram/iterative-parser-states-diagram.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Project-OSRM/osrm-backend/560ed5c0e82d7bd6a0887eb58188bf4fa8662372/third_party/rapidjson/doc/diagram/iterative-parser-states-diagram.png -------------------------------------------------------------------------------- /third_party/rapidjson/doc/diagram/makefile: -------------------------------------------------------------------------------- 1 | %.pdf: %.dot 2 | dot $< -Tpdf -o $@ 3 | 4 | %.png: %.dot 5 | dot $< -Tpng -o $@ 6 | 7 | DOTFILES = $(basename $(wildcard *.dot)) 8 | all: $(addsuffix .png, $(DOTFILES)) $(addsuffix .pdf, $(DOTFILES)) 9 | -------------------------------------------------------------------------------- /third_party/rapidjson/doc/diagram/move1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Project-OSRM/osrm-backend/560ed5c0e82d7bd6a0887eb58188bf4fa8662372/third_party/rapidjson/doc/diagram/move1.png -------------------------------------------------------------------------------- /third_party/rapidjson/doc/diagram/move2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Project-OSRM/osrm-backend/560ed5c0e82d7bd6a0887eb58188bf4fa8662372/third_party/rapidjson/doc/diagram/move2.png -------------------------------------------------------------------------------- /third_party/rapidjson/doc/diagram/move3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Project-OSRM/osrm-backend/560ed5c0e82d7bd6a0887eb58188bf4fa8662372/third_party/rapidjson/doc/diagram/move3.png -------------------------------------------------------------------------------- /third_party/rapidjson/doc/diagram/normalparsing.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Project-OSRM/osrm-backend/560ed5c0e82d7bd6a0887eb58188bf4fa8662372/third_party/rapidjson/doc/diagram/normalparsing.png -------------------------------------------------------------------------------- /third_party/rapidjson/doc/diagram/simpledom.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Project-OSRM/osrm-backend/560ed5c0e82d7bd6a0887eb58188bf4fa8662372/third_party/rapidjson/doc/diagram/simpledom.png -------------------------------------------------------------------------------- /third_party/rapidjson/doc/diagram/tutorial.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Project-OSRM/osrm-backend/560ed5c0e82d7bd6a0887eb58188bf4fa8662372/third_party/rapidjson/doc/diagram/tutorial.png -------------------------------------------------------------------------------- /third_party/rapidjson/doc/diagram/utilityclass.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Project-OSRM/osrm-backend/560ed5c0e82d7bd6a0887eb58188bf4fa8662372/third_party/rapidjson/doc/diagram/utilityclass.png -------------------------------------------------------------------------------- /third_party/rapidjson/doc/logo/rapidjson.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Project-OSRM/osrm-backend/560ed5c0e82d7bd6a0887eb58188bf4fa8662372/third_party/rapidjson/doc/logo/rapidjson.png -------------------------------------------------------------------------------- /third_party/rapidjson/doc/misc/footer.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /third_party/rapidjson/doc/npm.md: -------------------------------------------------------------------------------- 1 | ## NPM 2 | 3 | # package.json {#package} 4 | 5 | ~~~~~~~~~~js 6 | { 7 | ... 8 | "dependencies": { 9 | ... 10 | "rapidjson": "git@github.com:Tencent/rapidjson.git" 11 | }, 12 | ... 13 | "gypfile": true 14 | } 15 | ~~~~~~~~~~ 16 | 17 | # binding.gyp {#binding} 18 | 19 | ~~~~~~~~~~js 20 | { 21 | ... 22 | 'targets': [ 23 | { 24 | ... 25 | 'include_dirs': [ 26 | ' 3 | 4 | #include 5 | 6 | std::string read_file(const std::string& filename); 7 | 8 | void write_data_to_file(const std::string& buffer, const std::string& filename); 9 | 10 | vtzero::layer get_layer(const vtzero::vector_tile& tile, const std::string& layer_name_or_num); 11 | 12 | -------------------------------------------------------------------------------- /third_party/vtzero/test/data/mapbox-streets-v6-14-8714-8017.mvt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Project-OSRM/osrm-backend/560ed5c0e82d7bd6a0887eb58188bf4fa8662372/third_party/vtzero/test/data/mapbox-streets-v6-14-8714-8017.mvt -------------------------------------------------------------------------------- /third_party/vtzero/test/t/test_point.cpp: -------------------------------------------------------------------------------- 1 | 2 | #include 3 | 4 | #include 5 | 6 | TEST_CASE("default constructed point") { 7 | vtzero::point p{}; 8 | 9 | REQUIRE(p.x == 0); 10 | REQUIRE(p.y == 0); 11 | } 12 | 13 | TEST_CASE("point") { 14 | vtzero::point p1{4, 5}; 15 | vtzero::point p2{5, 4}; 16 | vtzero::point p3{4, 5}; 17 | 18 | REQUIRE(p1.x == 4); 19 | REQUIRE(p1.y == 5); 20 | 21 | REQUIRE_FALSE(p1 == p2); 22 | REQUIRE(p1 != p2); 23 | REQUIRE(p1 == p3); 24 | } 25 | 26 | -------------------------------------------------------------------------------- /third_party/vtzero/test/test_main.cpp: -------------------------------------------------------------------------------- 1 | #define CATCH_CONFIG_MAIN 2 | #include "catch.hpp" 3 | 4 | #include 5 | 6 | #include 7 | #include 8 | #include 9 | 10 | bool got_an_assert = false; 11 | 12 | std::string load_test_tile() { 13 | std::string path{"data/mapbox-streets-v6-14-8714-8017.mvt"}; 14 | std::ifstream stream{path, std::ios_base::in|std::ios_base::binary}; 15 | if (!stream.is_open()) { 16 | throw std::runtime_error{"could not open: '" + path + "'"}; 17 | } 18 | 19 | std::string message{std::istreambuf_iterator(stream.rdbuf()), 20 | std::istreambuf_iterator()}; 21 | 22 | stream.close(); 23 | return message; 24 | } 25 | 26 | -------------------------------------------------------------------------------- /unit_tests/contractor_tests.cpp: -------------------------------------------------------------------------------- 1 | #define BOOST_TEST_MODULE contractor tests 2 | 3 | #include 4 | 5 | /* 6 | * This file will contain an automatically generated main function. 7 | */ 8 | -------------------------------------------------------------------------------- /unit_tests/customizer_tests.cpp: -------------------------------------------------------------------------------- 1 | #define BOOST_TEST_MODULE customizer tests 2 | 3 | #include 4 | 5 | /* 6 | * This file will contain an automatically generated main function. 7 | */ 8 | -------------------------------------------------------------------------------- /unit_tests/engine/json_factory.cpp: -------------------------------------------------------------------------------- 1 | #include "engine/api/json_factory.hpp" 2 | #include "guidance/turn_instruction.hpp" 3 | 4 | #include 5 | 6 | BOOST_AUTO_TEST_SUITE(json_factory) 7 | 8 | BOOST_AUTO_TEST_CASE(instructionTypeToString_test_size) 9 | { 10 | using namespace osrm::engine::api::json::detail; 11 | using namespace osrm::guidance; 12 | 13 | BOOST_CHECK_EQUAL(instructionTypeToString(TurnType::Sliproad), "invalid"); 14 | } 15 | 16 | BOOST_AUTO_TEST_SUITE_END() 17 | -------------------------------------------------------------------------------- /unit_tests/engine_tests.cpp: -------------------------------------------------------------------------------- 1 | #define BOOST_TEST_MODULE engine tests 2 | 3 | #include 4 | 5 | /* 6 | * This file will contain an automatically generated main function. 7 | */ 8 | -------------------------------------------------------------------------------- /unit_tests/extractor_tests.cpp: -------------------------------------------------------------------------------- 1 | #define BOOST_TEST_MODULE extractor tests 2 | 3 | #include 4 | 5 | /* 6 | * This file will contain an automatically generated main function. 7 | */ 8 | -------------------------------------------------------------------------------- /unit_tests/fixtures/raster_data.asc: -------------------------------------------------------------------------------- 1 | 10 10 10 10 10 20 40 60 80 100 2 | 10 10 10 10 20 40 60 80 100 120 3 | 10 10 10 20 40 60 80 100 120 140 4 | 10 10 20 40 60 80 100 120 140 160 5 | 10 20 40 60 80 100 120 140 160 180 6 | 10 10 20 40 60 80 100 120 140 160 7 | 10 10 10 20 40 60 80 100 120 140 8 | 10 10 10 10 20 40 60 80 100 80 9 | 10 10 10 10 10 20 40 60 80 60 10 | 10 10 10 10 10 10 20 40 60 40 11 | -------------------------------------------------------------------------------- /unit_tests/library/algorithm.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | #include "fixture.hpp" 4 | 5 | #include "osrm/exception.hpp" 6 | 7 | BOOST_AUTO_TEST_SUITE(table) 8 | 9 | BOOST_AUTO_TEST_CASE(test_incompatible_with_mld) 10 | { 11 | // Can't use the MLD algorithm with CH data 12 | BOOST_CHECK_THROW( 13 | getOSRM(OSRM_TEST_DATA_DIR "/ch/monaco.osrm", osrm::EngineConfig::Algorithm::MLD), 14 | osrm::exception); 15 | } 16 | 17 | BOOST_AUTO_TEST_CASE(test_incompatible_with_ch) 18 | { 19 | // Can't use the CH algorithm with MLD data 20 | BOOST_CHECK_THROW( 21 | getOSRM(OSRM_TEST_DATA_DIR "/mld/monaco.osrm", osrm::EngineConfig::Algorithm::CH), 22 | osrm::exception); 23 | } 24 | 25 | BOOST_AUTO_TEST_SUITE_END() 26 | -------------------------------------------------------------------------------- /unit_tests/library/contract.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | #include "osrm/contractor.hpp" 4 | #include "osrm/contractor_config.hpp" 5 | 6 | #include 7 | 8 | BOOST_AUTO_TEST_SUITE(library_contract) 9 | 10 | BOOST_AUTO_TEST_CASE(test_contract_with_invalid_config) 11 | { 12 | using namespace osrm; 13 | 14 | osrm::ContractorConfig config; 15 | config.requested_num_threads = std::thread::hardware_concurrency(); 16 | BOOST_CHECK_THROW(osrm::contract(config), 17 | std::exception); // including osrm::util::exception, etc. 18 | } 19 | 20 | BOOST_AUTO_TEST_SUITE_END() 21 | -------------------------------------------------------------------------------- /unit_tests/library/customize.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | #include "osrm/customizer.hpp" 4 | #include "osrm/customizer_config.hpp" 5 | 6 | #include 7 | 8 | BOOST_AUTO_TEST_SUITE(library_customize) 9 | 10 | BOOST_AUTO_TEST_CASE(test_customize_with_invalid_config) 11 | { 12 | using namespace osrm; 13 | 14 | osrm::CustomizationConfig config; 15 | config.requested_num_threads = std::thread::hardware_concurrency(); 16 | BOOST_CHECK_THROW(osrm::customize(config), 17 | std::exception); // including osrm::util::exception, etc. 18 | } 19 | 20 | BOOST_AUTO_TEST_SUITE_END() 21 | -------------------------------------------------------------------------------- /unit_tests/library/fixture.hpp: -------------------------------------------------------------------------------- 1 | #ifndef OSRM_LIBRARY_TEST_FIXTURE 2 | #define OSRM_LIBRARY_TEST_FIXTURE 3 | 4 | #include "osrm/engine_config.hpp" 5 | #include "osrm/osrm.hpp" 6 | 7 | #include 8 | 9 | // I couldn't get Boost.UnitTest to provide a test suite level fixture with custom 10 | // arguments per test suite (osrm base path from argv), so this has to suffice. 11 | 12 | inline osrm::OSRM 13 | getOSRM(const std::string &base_path, 14 | osrm::EngineConfig::Algorithm algorithm = osrm::EngineConfig::Algorithm::CH) 15 | { 16 | osrm::EngineConfig config; 17 | config.storage_config = {base_path}; 18 | config.use_shared_memory = false; 19 | config.algorithm = algorithm; 20 | 21 | return osrm::OSRM{config}; 22 | } 23 | 24 | #endif 25 | -------------------------------------------------------------------------------- /unit_tests/library/partition.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | #include "osrm/partitioner.hpp" 4 | #include "osrm/partitioner_config.hpp" 5 | 6 | #include 7 | 8 | BOOST_AUTO_TEST_SUITE(library_partition) 9 | 10 | BOOST_AUTO_TEST_CASE(test_partition_with_invalid_config) 11 | { 12 | using namespace osrm; 13 | 14 | osrm::PartitionerConfig config; 15 | config.requested_num_threads = std::thread::hardware_concurrency(); 16 | BOOST_CHECK_THROW(osrm::partition(config), 17 | std::exception); // including osrm::util::exception, etc. 18 | } 19 | 20 | BOOST_AUTO_TEST_SUITE_END() 21 | -------------------------------------------------------------------------------- /unit_tests/library_tests.cpp: -------------------------------------------------------------------------------- 1 | #define BOOST_TEST_MODULE library tests 2 | 3 | #include 4 | 5 | /* 6 | * This file will contain an automatically generated main function. 7 | */ 8 | -------------------------------------------------------------------------------- /unit_tests/partitioner_tests.cpp: -------------------------------------------------------------------------------- 1 | #define BOOST_TEST_MODULE partition tests 2 | 3 | #include 4 | 5 | /* 6 | * This file will contain an automatically generated main function. 7 | */ 8 | -------------------------------------------------------------------------------- /unit_tests/server_tests.cpp: -------------------------------------------------------------------------------- 1 | #define BOOST_TEST_MODULE server tests 2 | 3 | #include 4 | 5 | /* 6 | * This file will contain an automatically generated main function. 7 | */ 8 | -------------------------------------------------------------------------------- /unit_tests/storage_tests.cpp: -------------------------------------------------------------------------------- 1 | #define BOOST_TEST_MODULE storage tests 2 | 3 | #include 4 | 5 | /* 6 | * This file will contain an automatically generated main function. 7 | */ 8 | -------------------------------------------------------------------------------- /unit_tests/updater_tests.cpp: -------------------------------------------------------------------------------- 1 | #define BOOST_TEST_MODULE updater tests 2 | 3 | #include 4 | 5 | /* 6 | * This file will contain an automatically generated main function. 7 | */ 8 | -------------------------------------------------------------------------------- /unit_tests/util/viewport.cpp: -------------------------------------------------------------------------------- 1 | #include "util/viewport.hpp" 2 | 3 | using namespace osrm::util; 4 | 5 | #include 6 | 7 | BOOST_AUTO_TEST_SUITE(viewport_test) 8 | 9 | using namespace osrm; 10 | using namespace osrm::util; 11 | 12 | BOOST_AUTO_TEST_CASE(zoom_level_test) 13 | { 14 | BOOST_CHECK_EQUAL( 15 | viewport::getFittedZoom( 16 | Coordinate(FloatLongitude{5.668343999999995}, FloatLatitude{45.111511000000014}), 17 | Coordinate(FloatLongitude{5.852471999999996}, FloatLatitude{45.26800200000002})), 18 | 12); 19 | } 20 | 21 | BOOST_AUTO_TEST_SUITE_END() 22 | -------------------------------------------------------------------------------- /unit_tests/util_tests.cpp: -------------------------------------------------------------------------------- 1 | #define BOOST_TEST_MODULE util tests 2 | 3 | #include 4 | 5 | /* 6 | * This file will contain an automatically generated main function. 7 | */ 8 | --------------------------------------------------------------------------------