├── .dockerignore ├── .gitignore ├── CMakeLists.txt ├── LICENSE.md ├── README.md ├── data ├── README.md ├── floating-car-data │ ├── .gitignore │ ├── README.md │ ├── conf │ │ ├── compare.conf │ │ ├── match.conf │ │ ├── match_raw.conf │ │ ├── prepare.conf │ │ └── prepare_all.conf │ └── points_anonymized.csv ├── gis-cup │ ├── .gitignore │ ├── README.md │ └── conf │ │ ├── compare.conf │ │ ├── ground_truth.conf │ │ ├── match.conf │ │ └── prepare.conf ├── hengfeng-li │ ├── .gitignore │ ├── README.md │ └── conf │ │ ├── compare.conf │ │ ├── compare_osm.conf │ │ ├── ground_truth.conf │ │ ├── match.conf │ │ ├── match_osm.conf │ │ ├── prepare.conf │ │ ├── prepare_ground_truth.conf │ │ └── prepare_osm.conf ├── kubicka-et-al │ ├── .gitignore │ ├── README.md │ └── conf │ │ ├── compare.conf │ │ ├── compare_edges.conf │ │ ├── ground_truth.conf │ │ ├── match.conf │ │ ├── match_edges.conf │ │ ├── prepare.conf │ │ └── prepare_ground_truth.conf └── newson-krumm │ ├── .gitignore │ ├── README.md │ └── conf │ ├── compare.conf │ ├── ground_truth.conf │ ├── match.conf │ └── prepare.conf ├── deploy ├── appimage │ ├── data │ │ ├── map_matching_2.desktop │ │ └── map_matching_2.svg │ └── package.sh ├── help │ └── help.sh └── licenses │ └── update.sh ├── docker ├── appimage │ └── Dockerfile ├── build │ ├── clang │ │ ├── 18 │ │ │ └── Dockerfile │ │ ├── 19 │ │ │ └── Dockerfile │ │ ├── 20 │ │ │ └── Dockerfile │ │ ├── 18-ubuntu-2004 │ │ │ └── Dockerfile │ │ ├── 19-ubuntu-2004 │ │ │ └── Dockerfile │ │ └── 20-ubuntu-2004 │ │ │ └── Dockerfile │ └── gcc │ │ ├── 14 │ │ └── Dockerfile │ │ ├── 15 │ │ └── Dockerfile │ │ ├── 14-ubuntu-2004 │ │ └── Dockerfile │ │ ├── 15-ubuntu-2004 │ │ └── Dockerfile │ │ ├── hub │ │ └── Dockerfile │ │ └── trunk │ │ └── Dockerfile ├── debug │ └── Dockerfile └── release │ └── Dockerfile ├── docs ├── figure12.png └── figure13.png ├── external ├── CMakeLists.txt ├── STL │ ├── LICENSE.txt │ └── README.md ├── boost │ ├── CMakeLists.txt │ ├── LICENSE_1_0.txt │ └── README.md ├── bz2 │ ├── CMakeLists.txt │ ├── COPYING │ └── README.md ├── csv_parser │ ├── CMakeLists.txt │ ├── LICENSE │ └── README.md ├── date │ ├── CMakeLists.txt │ ├── LICENSE.txt │ └── README.md ├── expat │ ├── CMakeLists.txt │ ├── COPYING │ └── README.md ├── gpx │ ├── CMakeLists.txt │ ├── COPYING.LESSER │ └── README.md ├── libc++ │ ├── LICENSE.TXT │ └── README.md ├── libosmium │ ├── CMakeLists.txt │ ├── LICENSE │ └── README.md ├── libstdc++ │ ├── COPYING.RUNTIME │ ├── COPYING3 │ ├── COPYING3.LIB │ └── README.md ├── protozero │ ├── CMakeLists.txt │ ├── LICENSE.md │ └── README.md ├── rpmalloc │ ├── CMakeLists.txt │ ├── LICENSE │ └── README.md └── zlib │ ├── CMakeLists.txt │ ├── LICENSE │ └── README.md ├── help.txt ├── src ├── CMakeLists.txt ├── app │ ├── CMakeLists.txt │ ├── include │ │ └── app │ │ │ ├── compare.hpp │ │ │ ├── global.hpp │ │ │ ├── match.hpp │ │ │ ├── match_cli.hpp │ │ │ ├── match_web.hpp │ │ │ ├── mode.hpp │ │ │ ├── network.hpp │ │ │ ├── options.hpp │ │ │ ├── prepare.hpp │ │ │ └── settings.hpp │ └── src │ │ └── app │ │ ├── compare.cpp │ │ ├── global.cpp │ │ ├── match.cpp │ │ ├── match_cli.cpp │ │ ├── mode.cpp │ │ ├── network.cpp │ │ ├── options.cpp │ │ ├── prepare.cpp │ │ └── settings.cpp ├── library │ ├── CMakeLists.txt │ ├── include │ │ ├── compare │ │ │ ├── comparator.hpp │ │ │ ├── comparator │ │ │ │ ├── comparator_forwarder_compares.hpp │ │ │ │ ├── comparator_forwarder_data.hpp │ │ │ │ ├── comparator_forwarder_matches.hpp │ │ │ │ ├── compare_output_settings.hpp │ │ │ │ ├── compare_result.hpp │ │ │ │ └── compare_task.hpp │ │ │ └── settings.hpp │ │ ├── environment │ │ │ └── environments │ │ │ │ ├── hmm.hpp │ │ │ │ └── single.hpp │ │ ├── geometry │ │ │ ├── algorithm │ │ │ │ ├── azimuth.hpp │ │ │ │ ├── buffer.hpp │ │ │ │ ├── compare.hpp │ │ │ │ ├── compare │ │ │ │ │ └── comparison.hpp │ │ │ │ ├── convert.hpp │ │ │ │ ├── direction.hpp │ │ │ │ ├── distance.hpp │ │ │ │ ├── equals.hpp │ │ │ │ ├── length.hpp │ │ │ │ ├── median.hpp │ │ │ │ ├── median_merge.hpp │ │ │ │ ├── reproject.hpp │ │ │ │ ├── reverse.hpp │ │ │ │ ├── simplify.hpp │ │ │ │ ├── split.hpp │ │ │ │ ├── srs_dispatch.hpp │ │ │ │ ├── substring.hpp │ │ │ │ └── wkt.hpp │ │ │ ├── cache.hpp │ │ │ ├── common.hpp │ │ │ ├── concepts.hpp │ │ │ ├── models.hpp │ │ │ ├── network │ │ │ │ ├── edge.hpp │ │ │ │ ├── network.hpp │ │ │ │ ├── network_base.hpp │ │ │ │ ├── network_import.hpp │ │ │ │ ├── node.hpp │ │ │ │ ├── route │ │ │ │ │ ├── common.hpp │ │ │ │ │ ├── concepts.hpp │ │ │ │ │ ├── eager_route.hpp │ │ │ │ │ ├── exception.hpp │ │ │ │ │ ├── lazy_route.hpp │ │ │ │ │ ├── route.hpp │ │ │ │ │ ├── route_data.hpp │ │ │ │ │ └── traits │ │ │ │ │ │ └── route.hpp │ │ │ │ └── traits │ │ │ │ │ ├── edge.hpp │ │ │ │ │ ├── network.hpp │ │ │ │ │ └── node.hpp │ │ │ ├── point.hpp │ │ │ ├── reprojector.hpp │ │ │ ├── rich_type │ │ │ │ ├── common.hpp │ │ │ │ ├── concepts.hpp │ │ │ │ ├── eager_multi_rich_line.hpp │ │ │ │ ├── eager_rich_line.hpp │ │ │ │ ├── eager_rich_segment.hpp │ │ │ │ ├── exception.hpp │ │ │ │ ├── lazy_multi_rich_line.hpp │ │ │ │ ├── lazy_rich_line.hpp │ │ │ │ ├── lazy_rich_segment.hpp │ │ │ │ ├── multi_rich_line.hpp │ │ │ │ ├── multi_rich_line_data.hpp │ │ │ │ ├── rich_line.hpp │ │ │ │ ├── rich_line_data.hpp │ │ │ │ ├── rich_segment.hpp │ │ │ │ ├── rich_segment_data.hpp │ │ │ │ └── traits │ │ │ │ │ ├── multi_rich_line.hpp │ │ │ │ │ ├── rich_line.hpp │ │ │ │ │ └── rich_segment.hpp │ │ │ ├── srs.hpp │ │ │ ├── track │ │ │ │ ├── multi_track.hpp │ │ │ │ └── track.hpp │ │ │ ├── traits.hpp │ │ │ └── types.hpp │ │ ├── graph │ │ │ ├── adjacency_list.hpp │ │ │ ├── algorithm │ │ │ │ ├── a_star_shortest_path.hpp │ │ │ │ ├── breadth_first_search.hpp │ │ │ │ ├── depth_first_search.hpp │ │ │ │ ├── dijkstra_shortest_path.hpp │ │ │ │ ├── priority_type_comparator.hpp │ │ │ │ └── visitor.hpp │ │ │ ├── common.hpp │ │ │ ├── compressed_sparse_row.hpp │ │ │ ├── concepts.hpp │ │ │ ├── container_subview.hpp │ │ │ ├── container_view.hpp │ │ │ └── traits │ │ │ │ └── graph.hpp │ │ ├── io │ │ │ ├── allocator │ │ │ │ ├── allocation_counter.hpp │ │ │ │ ├── concepts.hpp │ │ │ │ ├── counting_allocator.hpp │ │ │ │ ├── counting_polymorphic_allocator.hpp │ │ │ │ └── thread_safe_allocation_counter.hpp │ │ │ ├── csv_exporter.hpp │ │ │ ├── csv_importer.hpp │ │ │ ├── csv_settings.hpp │ │ │ ├── exporter.hpp │ │ │ ├── file_exporter.hpp │ │ │ ├── helper │ │ │ │ ├── concepts.hpp │ │ │ │ ├── graph_helper.hpp │ │ │ │ ├── index_build_helper.hpp │ │ │ │ ├── index_helper.hpp │ │ │ │ ├── osm_handler_helper.hpp │ │ │ │ └── tag_helper.hpp │ │ │ ├── importer.hpp │ │ │ ├── memory_mapped │ │ │ │ ├── allocator │ │ │ │ │ ├── counting_interprocess_allocator.hpp │ │ │ │ │ └── interprocess_allocator.hpp │ │ │ │ ├── concepts.hpp │ │ │ │ ├── storage │ │ │ │ │ ├── base_storage.hpp │ │ │ │ │ ├── graph_storage.hpp │ │ │ │ │ ├── index_build_storage.hpp │ │ │ │ │ ├── index_storage.hpp │ │ │ │ │ ├── osm_handler_storage.hpp │ │ │ │ │ └── tag_storage.hpp │ │ │ │ ├── types.hpp │ │ │ │ └── utils.hpp │ │ │ ├── network │ │ │ │ ├── arc_node_importer.hpp │ │ │ │ ├── giscup_importer.hpp │ │ │ │ ├── melbourne_importer.hpp │ │ │ │ ├── osm_car_importer.hpp │ │ │ │ ├── osm_exporter.hpp │ │ │ │ ├── osm_handler.hpp │ │ │ │ ├── osm_importer.hpp │ │ │ │ ├── osm_manual_importer.hpp │ │ │ │ ├── osm_pattern.hpp │ │ │ │ ├── osm_relations_manager.hpp │ │ │ │ └── seattle_importer.hpp │ │ │ ├── results │ │ │ │ ├── compare │ │ │ │ │ ├── compare_output_printer.hpp │ │ │ │ │ └── csv_compare_exporter.hpp │ │ │ │ ├── csv_results_exporter.hpp │ │ │ │ ├── match │ │ │ │ │ ├── csv_candidates_exporter.hpp │ │ │ │ │ ├── csv_match_exporter.hpp │ │ │ │ │ └── match_output_printer.hpp │ │ │ │ ├── results_output_printer.hpp │ │ │ │ └── track │ │ │ │ │ ├── csv_track_exporter.hpp │ │ │ │ │ └── track_output_printer.hpp │ │ │ ├── serialization │ │ │ │ ├── deserializer.hpp │ │ │ │ └── serializer.hpp │ │ │ └── track │ │ │ │ ├── csv_track_importer.hpp │ │ │ │ ├── edges_list_importer.hpp │ │ │ │ ├── filter │ │ │ │ ├── track_regional_filter.hpp │ │ │ │ └── track_time_splitter.hpp │ │ │ │ ├── gpx_track_importer.hpp │ │ │ │ ├── importer_dispatcher.hpp │ │ │ │ ├── importer_settings.hpp │ │ │ │ ├── input_importer.hpp │ │ │ │ ├── seattle_ground_truth_importer.hpp │ │ │ │ └── track_exporter.hpp │ │ ├── learning │ │ │ └── algorithms │ │ │ │ ├── policy_iteration.hpp │ │ │ │ ├── q_learning.hpp │ │ │ │ ├── value_iteration.hpp │ │ │ │ └── viterbi.hpp │ │ ├── matching │ │ │ ├── algorithm │ │ │ │ ├── algorithms.hpp │ │ │ │ ├── candidate_search.hpp │ │ │ │ ├── detect.hpp │ │ │ │ ├── route.hpp │ │ │ │ └── write.hpp │ │ │ ├── candidate │ │ │ │ ├── candidate.hpp │ │ │ │ ├── candidate_edge.hpp │ │ │ │ └── candidate_node.hpp │ │ │ ├── defect.hpp │ │ │ ├── matcher.hpp │ │ │ ├── matcher │ │ │ │ ├── match_result.hpp │ │ │ │ ├── match_task.hpp │ │ │ │ ├── matcher_forwarder.hpp │ │ │ │ └── matcher_output_settings.hpp │ │ │ ├── settings.hpp │ │ │ └── traits │ │ │ │ └── network.hpp │ │ ├── types │ │ │ ├── environment │ │ │ │ └── environments │ │ │ │ │ ├── hmm.hpp │ │ │ │ │ └── single.hpp │ │ │ ├── extern_define.hpp │ │ │ ├── extern_undefine.hpp │ │ │ ├── geometry │ │ │ │ ├── algorithm │ │ │ │ │ └── compare.hpp │ │ │ │ ├── index │ │ │ │ │ ├── compare.hpp │ │ │ │ │ ├── index.hpp │ │ │ │ │ ├── matcher.hpp │ │ │ │ │ ├── median_merge.hpp │ │ │ │ │ └── network.hpp │ │ │ │ ├── models.hpp │ │ │ │ ├── network │ │ │ │ │ ├── edge.hpp │ │ │ │ │ ├── network.hpp │ │ │ │ │ ├── network_base.hpp │ │ │ │ │ ├── network_import.hpp │ │ │ │ │ ├── node.hpp │ │ │ │ │ └── route │ │ │ │ │ │ ├── eager_route.hpp │ │ │ │ │ │ ├── lazy_route.hpp │ │ │ │ │ │ ├── route.hpp │ │ │ │ │ │ └── route_data.hpp │ │ │ │ ├── point.hpp │ │ │ │ ├── reprojector.hpp │ │ │ │ ├── rich_type │ │ │ │ │ ├── eager_multi_rich_line.hpp │ │ │ │ │ ├── eager_rich_line.hpp │ │ │ │ │ ├── eager_rich_segment.hpp │ │ │ │ │ ├── lazy_multi_rich_line.hpp │ │ │ │ │ ├── lazy_rich_line.hpp │ │ │ │ │ ├── lazy_rich_segment.hpp │ │ │ │ │ ├── multi_rich_line.hpp │ │ │ │ │ ├── multi_rich_line_data.hpp │ │ │ │ │ ├── rich_line.hpp │ │ │ │ │ ├── rich_line_data.hpp │ │ │ │ │ ├── rich_line_variant.hpp │ │ │ │ │ ├── rich_segment.hpp │ │ │ │ │ └── rich_segment_data.hpp │ │ │ │ └── track │ │ │ │ │ ├── multi_track.hpp │ │ │ │ │ └── track.hpp │ │ │ ├── graph │ │ │ │ ├── adjacency_list.hpp │ │ │ │ └── compressed_sparse_row.hpp │ │ │ ├── io │ │ │ │ ├── helper │ │ │ │ │ ├── graph_helper.hpp │ │ │ │ │ ├── index_build_helper.hpp │ │ │ │ │ ├── index_helper.hpp │ │ │ │ │ ├── osm_handler_helper.hpp │ │ │ │ │ └── tag_helper.hpp │ │ │ │ ├── memory_mapped │ │ │ │ │ ├── storage │ │ │ │ │ │ ├── base_storage.hpp │ │ │ │ │ │ ├── graph_storage.hpp │ │ │ │ │ │ ├── index_build_storage.hpp │ │ │ │ │ │ ├── index_storage.hpp │ │ │ │ │ │ ├── osm_handler_storage.hpp │ │ │ │ │ │ └── tag_storage.hpp │ │ │ │ │ └── types.hpp │ │ │ │ ├── network │ │ │ │ │ ├── arc_node_importer.hpp │ │ │ │ │ ├── giscup_importer.hpp │ │ │ │ │ ├── melbourne_importer.hpp │ │ │ │ │ ├── osm_exporter.hpp │ │ │ │ │ ├── osm_handler.hpp │ │ │ │ │ ├── osm_importer.hpp │ │ │ │ │ └── seattle_importer.hpp │ │ │ │ └── track │ │ │ │ │ ├── csv_track_importer.hpp │ │ │ │ │ ├── edges_list_importer.hpp │ │ │ │ │ ├── filter │ │ │ │ │ ├── track_regional_filter.hpp │ │ │ │ │ └── track_time_splitter.hpp │ │ │ │ │ ├── gpx_track_importer.hpp │ │ │ │ │ └── input_importer.hpp │ │ │ ├── learning │ │ │ │ └── algorithms │ │ │ │ │ ├── policy_iteration.hpp │ │ │ │ │ ├── q_learning.hpp │ │ │ │ │ ├── value_iteration.hpp │ │ │ │ │ └── viterbi.hpp │ │ │ └── matching │ │ │ │ ├── algorithm │ │ │ │ ├── algorithms.hpp │ │ │ │ ├── candidate_search.hpp │ │ │ │ ├── detect.hpp │ │ │ │ └── route.hpp │ │ │ │ ├── candidate │ │ │ │ ├── candidate.hpp │ │ │ │ ├── candidate_edge.hpp │ │ │ │ └── candidate_node.hpp │ │ │ │ ├── matcher.hpp │ │ │ │ └── matcher │ │ │ │ └── matcher_forwarder.hpp │ │ └── util │ │ │ ├── benchmark.hpp │ │ │ ├── checks.hpp │ │ │ ├── chrono.hpp │ │ │ ├── compiler.hpp │ │ │ ├── concepts.hpp │ │ │ ├── coordinator.hpp │ │ │ ├── macros.hpp │ │ │ ├── time_helper.hpp │ │ │ └── version.hpp │ └── src │ │ ├── compare │ │ ├── comparator.cpp │ │ └── comparator │ │ │ ├── comparator_forwarder_compares.cpp │ │ │ ├── comparator_forwarder_data.cpp │ │ │ ├── comparator_forwarder_matches.cpp │ │ │ └── compare_task.cpp │ │ ├── geometry │ │ ├── algorithm │ │ │ └── reproject.cpp │ │ ├── cache.cpp │ │ └── srs.cpp │ │ ├── io │ │ ├── csv_importer.cpp │ │ ├── file_exporter.cpp │ │ ├── importer.cpp │ │ ├── memory_mapped │ │ │ └── utils.cpp │ │ └── track │ │ │ └── track_exporter.cpp │ │ ├── matching │ │ ├── defect.cpp │ │ └── matcher │ │ │ └── match_task.cpp │ │ ├── types │ │ ├── environment │ │ │ └── environments │ │ │ │ ├── hmm.cpp │ │ │ │ └── single.cpp │ │ ├── geometry │ │ │ ├── algorithm │ │ │ │ └── compare.cpp │ │ │ ├── index │ │ │ │ ├── compare_points.cpp │ │ │ │ ├── compare_segments.cpp │ │ │ │ ├── index.cpp │ │ │ │ ├── matcher.cpp │ │ │ │ ├── median_merge.cpp │ │ │ │ ├── network_points.cpp │ │ │ │ └── network_segments.cpp │ │ │ ├── models.cpp │ │ │ ├── network │ │ │ │ ├── edge.cpp │ │ │ │ ├── network.cpp │ │ │ │ ├── network_base.cpp │ │ │ │ ├── network_import.cpp │ │ │ │ ├── node.cpp │ │ │ │ └── route │ │ │ │ │ ├── eager_route.cpp │ │ │ │ │ ├── lazy_route.cpp │ │ │ │ │ ├── route.cpp │ │ │ │ │ └── route_data.cpp │ │ │ ├── point.cpp │ │ │ ├── reprojector.cpp │ │ │ ├── rich_type │ │ │ │ ├── eager_multi_rich_line.cpp │ │ │ │ ├── eager_rich_line.cpp │ │ │ │ ├── eager_rich_segment.cpp │ │ │ │ ├── lazy_multi_rich_line.cpp │ │ │ │ ├── lazy_rich_line.cpp │ │ │ │ ├── lazy_rich_segment.cpp │ │ │ │ ├── multi_rich_line.cpp │ │ │ │ ├── multi_rich_line_data.cpp │ │ │ │ ├── rich_line.cpp │ │ │ │ ├── rich_line_data.cpp │ │ │ │ ├── rich_line_variant.cpp │ │ │ │ ├── rich_segment.cpp │ │ │ │ └── rich_segment_data.cpp │ │ │ └── track │ │ │ │ ├── multi_track.cpp │ │ │ │ └── track.cpp │ │ ├── graph │ │ │ ├── adjacency_list.cpp │ │ │ └── compressed_sparse_row.cpp │ │ ├── io │ │ │ ├── helper │ │ │ │ ├── graph_helper.cpp │ │ │ │ ├── index_build_helper.cpp │ │ │ │ ├── index_helper.cpp │ │ │ │ ├── osm_handler_helper.cpp │ │ │ │ └── tag_helper.cpp │ │ │ ├── memory_mapped │ │ │ │ ├── storage │ │ │ │ │ ├── base_storage.cpp │ │ │ │ │ ├── graph_storage.cpp │ │ │ │ │ ├── index_build_storage.cpp │ │ │ │ │ ├── index_storage.cpp │ │ │ │ │ ├── osm_handler_storage.cpp │ │ │ │ │ └── tag_storage.cpp │ │ │ │ └── types.cpp │ │ │ ├── network │ │ │ │ ├── arc_node_importer.cpp │ │ │ │ ├── giscup_importer.cpp │ │ │ │ ├── melbourne_importer.cpp │ │ │ │ ├── osm_exporter.cpp │ │ │ │ ├── osm_handler.cpp │ │ │ │ ├── osm_importer.cpp │ │ │ │ └── seattle_importer.cpp │ │ │ └── track │ │ │ │ ├── csv_track_importer.cpp │ │ │ │ ├── edges_list_importer.cpp │ │ │ │ ├── filter │ │ │ │ ├── track_regional_filter.cpp │ │ │ │ └── track_time_splitter.cpp │ │ │ │ ├── gpx_track_importer.cpp │ │ │ │ └── input_importer.cpp │ │ ├── learning │ │ │ └── algorithms │ │ │ │ ├── policy_iteration.cpp │ │ │ │ ├── q_learning.cpp │ │ │ │ ├── value_iteration.cpp │ │ │ │ └── viterbi.cpp │ │ └── matching │ │ │ ├── algorithm │ │ │ ├── algorithms.cpp │ │ │ ├── candidate_search.cpp │ │ │ ├── detect.cpp │ │ │ └── route.cpp │ │ │ ├── candidate │ │ │ ├── candidate.cpp │ │ │ ├── candidate_edge.cpp │ │ │ └── candidate_node.cpp │ │ │ ├── matcher.cpp │ │ │ └── matcher │ │ │ └── matcher_forwarder.cpp │ │ └── util │ │ ├── checks.cpp │ │ ├── chrono.cpp │ │ ├── compiler.cpp │ │ ├── time_helper.cpp │ │ └── version.cpp.in └── main.cpp └── tests ├── CMakeLists.txt ├── compare_tests.cpp ├── concept_inheritance.cpp ├── graph_algorithm_tests.cpp ├── graph_tests.cpp ├── helper ├── cache_fixture.hpp ├── geometry_helper.hpp ├── matcher_fixture.hpp └── network_fixture.hpp ├── matcher_tests.cpp ├── memory_mapped_index_tests.cpp ├── memory_mapped_tests.cpp ├── memory_mapped_wrapper_tests.cpp ├── model_algorithm_tests.cpp ├── model_tests.cpp ├── network_tests.cpp ├── route_tests.cpp ├── serialization_tests.cpp └── util_tests.cpp /.dockerignore: -------------------------------------------------------------------------------- 1 | .idea 2 | .git 3 | .gitignore 4 | .dockerignore 5 | cmake-* 6 | cmake.lock 7 | data 8 | run 9 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | .idea/ 2 | cmake-*/ 3 | run/ 4 | cmake.lock 5 | **/*.osm.pbf 6 | **/*.AppImage 7 | -------------------------------------------------------------------------------- /data/README.md: -------------------------------------------------------------------------------- 1 | ### Data Examples 2 | 3 | In the subdirectories, we provide examples of public data sets with prepared configuration files. 4 | 5 | There is a readme in every subdirectory. 6 | Most of the data sets are not directly provided due to licence reasons, however, links and descriptions on how to 7 | download and provide the data sets are given in the respective readmes. 8 | 9 | The commands to the binary need to be adjusted depending on your setup. 10 | Moreover, it has to be noted that the paths in the config files are relative and depend on the location from where the 11 | `map_matching_2` binary is called. 12 | The config files in the example directories need to be called from the root directory of this project, i.e., the 13 | `map_matching_2` folder containing this `data/` folder. 14 | 15 | Feel free to try it out! 16 | -------------------------------------------------------------------------------- /data/floating-car-data/.gitignore: -------------------------------------------------------------------------------- 1 | points.csv 2 | tracks_anonymized.csv 3 | ground_truth.csv 4 | odbl-10.txt 5 | *.osm.pbf 6 | network/ 7 | results/ -------------------------------------------------------------------------------- /data/floating-car-data/conf/compare.conf: -------------------------------------------------------------------------------- 1 | compare=yes 2 | output=data/floating-car-data/results/ 3 | filename=comparison.csv 4 | match-tracks=data/floating-car-data/results/matches.csv 5 | match-wkt=yes 6 | match-geometry=match 7 | compare-tracks=data/floating-car-data/ground_truth.csv 8 | compare-wkt=yes 9 | compare-geometry=WKT 10 | verbose=yes -------------------------------------------------------------------------------- /data/floating-car-data/conf/match.conf: -------------------------------------------------------------------------------- 1 | match=yes 2 | input=data/floating-car-data/network/ 3 | output=data/floating-car-data/results/ 4 | filename=matches.csv 5 | tracks=data/floating-car-data/points.csv 6 | wkt=yes 7 | time-format=%F %T%Oz 8 | verbose=yes -------------------------------------------------------------------------------- /data/floating-car-data/conf/match_raw.conf: -------------------------------------------------------------------------------- 1 | match=yes 2 | input=data/floating-car-data/network/ 3 | output=data/floating-car-data/results/ 4 | filename=matches_raw.csv 5 | tracks=data/floating-car-data/points_anonymized.csv 6 | delimiter=; 7 | id=device 8 | id=subid 9 | x=lon 10 | y=lat 11 | time=timestamp 12 | time-format=%F %T%Oz 13 | verbose=yes -------------------------------------------------------------------------------- /data/floating-car-data/conf/prepare.conf: -------------------------------------------------------------------------------- 1 | prepare=yes 2 | file=data/floating-car-data/oberfranken-latest.osm.pbf 3 | output=data/floating-car-data/network/ 4 | #export-nodes-csv-file=nodes.csv 5 | #export-edges-csv-file=edges.csv 6 | verbose=yes -------------------------------------------------------------------------------- /data/floating-car-data/conf/prepare_all.conf: -------------------------------------------------------------------------------- 1 | prepare=yes 2 | file=data/floating-car-data/oberfranken-latest.osm.pbf 3 | output=data/floating-car-data/network/ 4 | osm-profile=manual 5 | osm-query=false|true,highway 6 | #export-nodes-csv-file=nodes_all.csv 7 | #export-edges-csv-file=edges_all.csv 8 | verbose=yes -------------------------------------------------------------------------------- /data/gis-cup/.gitignore: -------------------------------------------------------------------------------- 1 | WA_Nodes.txt 2 | WA_Edges.txt 3 | WA_EdgeGeometry.txt 4 | RoadNetworkData.zip 5 | GIS_Contest_Training_Data.zip 6 | GisContestTrainingData/ 7 | network/ 8 | results/ -------------------------------------------------------------------------------- /data/gis-cup/conf/compare.conf: -------------------------------------------------------------------------------- 1 | compare=yes 2 | output=data/gis-cup/results/ 3 | filename=comparison.csv 4 | match-tracks=data/gis-cup/results/match.csv 5 | match-wkt=yes 6 | match-geometry=match 7 | compare-tracks=data/gis-cup/results/ground_truth.csv 8 | compare-wkt=yes 9 | compare-geometry=track 10 | verbose=yes -------------------------------------------------------------------------------- /data/gis-cup/conf/ground_truth.conf: -------------------------------------------------------------------------------- 1 | match=yes 2 | input=data/gis-cup/network/ 3 | output=data/gis-cup/results/ 4 | filename=ground_truth.csv 5 | tracks=data/gis-cup/GisContestTrainingData/output/output_01.txt 6 | tracks=data/gis-cup/GisContestTrainingData/output/output_02.txt 7 | tracks=data/gis-cup/GisContestTrainingData/output/output_03.txt 8 | tracks=data/gis-cup/GisContestTrainingData/output/output_04.txt 9 | tracks=data/gis-cup/GisContestTrainingData/output/output_05.txt 10 | tracks=data/gis-cup/GisContestTrainingData/output/output_06.txt 11 | tracks=data/gis-cup/GisContestTrainingData/output/output_07.txt 12 | tracks=data/gis-cup/GisContestTrainingData/output/output_08.txt 13 | tracks=data/gis-cup/GisContestTrainingData/output/output_09.txt 14 | tracks=data/gis-cup/GisContestTrainingData/output/output_10.txt 15 | tracks-file-type=list 16 | delimiter=, 17 | id=1 18 | verbose=yes -------------------------------------------------------------------------------- /data/gis-cup/conf/match.conf: -------------------------------------------------------------------------------- 1 | match=yes 2 | input=data/gis-cup/network/ 3 | output=data/gis-cup/results/ 4 | filename=match.csv 5 | export-edges=yes 6 | tracks=data/gis-cup/GisContestTrainingData/input/input_01.txt 7 | tracks=data/gis-cup/GisContestTrainingData/input/input_02.txt 8 | tracks=data/gis-cup/GisContestTrainingData/input/input_03.txt 9 | tracks=data/gis-cup/GisContestTrainingData/input/input_04.txt 10 | tracks=data/gis-cup/GisContestTrainingData/input/input_05.txt 11 | tracks=data/gis-cup/GisContestTrainingData/input/input_06.txt 12 | tracks=data/gis-cup/GisContestTrainingData/input/input_07.txt 13 | tracks=data/gis-cup/GisContestTrainingData/input/input_08.txt 14 | tracks=data/gis-cup/GisContestTrainingData/input/input_09.txt 15 | tracks=data/gis-cup/GisContestTrainingData/input/input_10.txt 16 | tracks-file-type=csv 17 | delimiter=, 18 | no-header=yes 19 | no-id=yes 20 | no-id-whole-file=yes 21 | x=2 22 | y=1 23 | no-parse-time=yes 24 | verbose=yes -------------------------------------------------------------------------------- /data/gis-cup/conf/prepare.conf: -------------------------------------------------------------------------------- 1 | prepare=yes 2 | file=data/gis-cup/WA_Nodes.txt 3 | file=data/gis-cup/WA_Edges.txt 4 | file=data/gis-cup/WA_EdgeGeometry.txt 5 | format=giscup 6 | output=data/gis-cup/network/ 7 | simplify=none 8 | #export-nodes-csv-file=nodes.csv 9 | #export-edges-csv-file=edges.csv 10 | verbose=yes -------------------------------------------------------------------------------- /data/hengfeng-li/.gitignore: -------------------------------------------------------------------------------- 1 | gps_track.txt 2 | groundtruth.txt 3 | melbourne.osm 4 | melbourne.osm.zip 5 | complete-osm-map.zip 6 | complete-osm-map/ 7 | network/ 8 | network_ground_truth/ 9 | network_osm/ 10 | results/ -------------------------------------------------------------------------------- /data/hengfeng-li/conf/compare.conf: -------------------------------------------------------------------------------- 1 | compare=yes 2 | output=data/hengfeng-li/results/ 3 | filename=comparison.csv 4 | match-tracks=data/hengfeng-li/results/match.csv 5 | match-wkt=yes 6 | match-geometry=match 7 | compare-tracks=data/hengfeng-li/results/ground_truth.csv 8 | compare-wkt=yes 9 | compare-geometry=track 10 | verbose=yes -------------------------------------------------------------------------------- /data/hengfeng-li/conf/compare_osm.conf: -------------------------------------------------------------------------------- 1 | compare=yes 2 | output=data/hengfeng-li/results/ 3 | filename=comparison_osm.csv 4 | match-tracks=data/hengfeng-li/results/match_osm.csv 5 | match-wkt=yes 6 | match-geometry=match 7 | compare-tracks=data/hengfeng-li/results/ground_truth.csv 8 | compare-wkt=yes 9 | compare-geometry=track 10 | verbose=yes -------------------------------------------------------------------------------- /data/hengfeng-li/conf/ground_truth.conf: -------------------------------------------------------------------------------- 1 | match=yes 2 | input=data/hengfeng-li/network_ground_truth/ 3 | output=data/hengfeng-li/results/ 4 | filename=ground_truth.csv 5 | tracks=data/hengfeng-li/groundtruth.txt 6 | tracks-file-type=list 7 | skip-lines=1 8 | verbose=yes -------------------------------------------------------------------------------- /data/hengfeng-li/conf/match.conf: -------------------------------------------------------------------------------- 1 | match=yes 2 | input=data/hengfeng-li/network/ 3 | output=data/hengfeng-li/results/ 4 | filename=match.csv 5 | export-edges=yes 6 | tracks=data/hengfeng-li/gps_track.txt 7 | tracks-file-type=csv 8 | delimiter=\s 9 | no-header=yes 10 | skip-lines=1 11 | no-id=yes 12 | no-id-whole-file=yes 13 | x=2 14 | y=1 15 | time=0 16 | no-parse-time=yes 17 | verbose=yes -------------------------------------------------------------------------------- /data/hengfeng-li/conf/match_osm.conf: -------------------------------------------------------------------------------- 1 | match=yes 2 | input=data/hengfeng-li/network_osm/ 3 | output=data/hengfeng-li/results/ 4 | filename=match_osm.csv 5 | export-edges=yes 6 | tracks=data/hengfeng-li/gps_track.txt 7 | tracks-file-type=csv 8 | delimiter=\s 9 | no-header=yes 10 | skip-lines=1 11 | no-id=yes 12 | no-id-whole-file=yes 13 | x=2 14 | y=1 15 | time=0 16 | no-parse-time=yes 17 | verbose=yes -------------------------------------------------------------------------------- /data/hengfeng-li/conf/prepare.conf: -------------------------------------------------------------------------------- 1 | prepare=yes 2 | file=data/hengfeng-li/complete-osm-map/vertex.txt 3 | file=data/hengfeng-li/complete-osm-map/edges.txt 4 | file=data/hengfeng-li/complete-osm-map/streets.txt 5 | format=melbourne 6 | output=data/hengfeng-li/network/ 7 | #export-nodes-csv-file=nodes.csv 8 | #export-edges-csv-file=edges.csv 9 | verbose=yes -------------------------------------------------------------------------------- /data/hengfeng-li/conf/prepare_ground_truth.conf: -------------------------------------------------------------------------------- 1 | prepare=yes 2 | file=data/hengfeng-li/complete-osm-map/vertex.txt 3 | file=data/hengfeng-li/complete-osm-map/edges.txt 4 | file=data/hengfeng-li/complete-osm-map/streets.txt 5 | format=melbourne 6 | output=data/hengfeng-li/network_ground_truth/ 7 | simplify=none 8 | #export-nodes-csv-file=nodes.csv 9 | #export-edges-csv-file=edges.csv 10 | verbose=yes -------------------------------------------------------------------------------- /data/hengfeng-li/conf/prepare_osm.conf: -------------------------------------------------------------------------------- 1 | prepare=yes 2 | file=data/hengfeng-li/melbourne.osm 3 | output=data/hengfeng-li/network_osm/ 4 | #export-nodes-csv-file=nodes.csv 5 | #export-edges-csv-file=edges.csv 6 | verbose=yes -------------------------------------------------------------------------------- /data/kubicka-et-al/.gitignore: -------------------------------------------------------------------------------- 1 | map-matching-dataset.zip 2 | map-matching-dataset/ 3 | network/ 4 | network_ground_truth/ 5 | results/ -------------------------------------------------------------------------------- /data/kubicka-et-al/conf/compare.conf: -------------------------------------------------------------------------------- 1 | compare=yes 2 | output=data/kubicka-et-al/results/ 3 | filename=comparison.csv 4 | match-tracks=data/kubicka-et-al/results/match.csv 5 | match-wkt=yes 6 | match-geometry=match 7 | compare-tracks=data/kubicka-et-al/results/ground_truth.csv 8 | compare-wkt=yes 9 | compare-geometry=track 10 | verbose=yes -------------------------------------------------------------------------------- /data/kubicka-et-al/conf/compare_edges.conf: -------------------------------------------------------------------------------- 1 | compare=yes 2 | output=data/kubicka-et-al/results/ 3 | filename=comparison_edges.csv 4 | match-tracks=data/kubicka-et-al/results/match_edges.csv 5 | match-wkt=yes 6 | match-geometry=match 7 | compare-tracks=data/kubicka-et-al/results/ground_truth.csv 8 | compare-wkt=yes 9 | compare-geometry=track 10 | verbose=yes -------------------------------------------------------------------------------- /data/newson-krumm/.gitignore: -------------------------------------------------------------------------------- 1 | gps_data.txt 2 | ground_truth_route.txt 3 | road_network.txt 4 | road_network.zip 5 | network/ 6 | results/ -------------------------------------------------------------------------------- /data/newson-krumm/conf/compare.conf: -------------------------------------------------------------------------------- 1 | compare=yes 2 | output=data/newson-krumm/results/ 3 | filename=comparison.csv 4 | match-tracks=data/newson-krumm/results/match.csv 5 | match-wkt=yes 6 | match-geometry=match 7 | compare-tracks=data/newson-krumm/results/ground_truth.csv 8 | compare-wkt=yes 9 | compare-geometry=track 10 | verbose=yes -------------------------------------------------------------------------------- /data/newson-krumm/conf/ground_truth.conf: -------------------------------------------------------------------------------- 1 | match=yes 2 | input=data/newson-krumm/network/ 3 | output=data/newson-krumm/results/ 4 | filename=ground_truth.csv 5 | tracks=data/newson-krumm/road_network.txt 6 | tracks=data/newson-krumm/ground_truth_route.txt 7 | tracks-file-type=seattle 8 | verbose=yes -------------------------------------------------------------------------------- /data/newson-krumm/conf/match.conf: -------------------------------------------------------------------------------- 1 | match=yes 2 | input=data/newson-krumm/network/ 3 | output=data/newson-krumm/results/ 4 | filename=match.csv 5 | export-edges=yes 6 | tracks=data/newson-krumm/gps_data.txt 7 | tracks-file-type=csv 8 | delimiter=\t 9 | no-id=yes 10 | no-id-whole-file=yes 11 | x=Longitude 12 | y=Latitude 13 | time=Date (UTC) 14 | time=Time (UTC) 15 | time-format=%d-%b-%Y_%T 16 | verbose=yes -------------------------------------------------------------------------------- /data/newson-krumm/conf/prepare.conf: -------------------------------------------------------------------------------- 1 | prepare=yes 2 | file=data/newson-krumm/road_network.txt 3 | format=seattle 4 | output=data/newson-krumm/network/ 5 | remove-duplicate-nodes=yes 6 | #export-nodes-csv-file=nodes.csv 7 | #export-edges-csv-file=edges.csv 8 | verbose=yes -------------------------------------------------------------------------------- /deploy/appimage/data/map_matching_2.desktop: -------------------------------------------------------------------------------- 1 | [Desktop Entry] 2 | Type=Application 3 | Version=1.0 4 | Name=map_matching_2 5 | Exec=map_matching_2 6 | Icon=map_matching_2 7 | Categories=Utility 8 | Terminal=true 9 | -------------------------------------------------------------------------------- /deploy/help/help.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # this file is for updating the help.txt 3 | 4 | # argument AppImage 5 | if [ -z "$1" ]; then 6 | echo "Usage: $0 map_matching_2.AppImage" 7 | exit 1 8 | fi 9 | 10 | appimage="$1" 11 | appimage=$(realpath "$appimage") 12 | if [ ! -f "$appimage" ]; then 13 | echo "The file $appimage does not exist." 14 | exit 1 15 | fi 16 | 17 | # change to script dir 18 | currentdir="$(realpath .)" 19 | pwd="$(dirname "$0")" 20 | cd "$pwd" || exit 1 21 | 22 | # build help.txt 23 | dir="../../" 24 | if [ ! -d "$dir" ]; then 25 | echo "Directory $dir does not exist." 26 | exit 1 27 | fi 28 | 29 | cd "$dir" || exit 1 30 | 31 | # create help.txt 32 | echo "# ./map_matching_2 --help" > help.txt 33 | "$appimage" --help >> help.txt 34 | echo "# ./map_matching_2 --prepare --help" >> help.txt 35 | "$appimage" --prepare --help >> help.txt 36 | echo "# ./map_matching_2 --match --help" >> help.txt 37 | "$appimage" --match --help >> help.txt 38 | echo "# ./map_matching_2 --compare --help" >> help.txt 39 | "$appimage" --compare --help >> help.txt 40 | 41 | echo "Finished creating help.txt." 42 | -------------------------------------------------------------------------------- /deploy/licenses/update.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # this file is for updating the license information in the external folder from the current release build 3 | 4 | # check if commands exists 5 | if ! command -v docker &> /dev/null; then 6 | echo "docker is missing." 7 | fi 8 | 9 | # change to script dir 10 | currentdir="$(realpath .)" 11 | pwd="$(dirname "$0")" 12 | cd "$pwd" || exit 1 13 | 14 | # build app 15 | dir="../../" 16 | if [ ! -d "$dir" ]; then 17 | echo "Directory $dir does not exist." 18 | exit 1 19 | fi 20 | 21 | cd "$dir" || exit 1 22 | dockerfile="docker/build/gcc/14-ubuntu-2004/Dockerfile" 23 | if [ ! -e "$dockerfile" ]; then 24 | echo "Dockerfile $dockerfile does not exist." 25 | exit 1 26 | fi 27 | 28 | if ! docker images -q "map_matching_2-gcc-ubuntu-2004-build" > /dev/null 2>&1; then 29 | docker build -t map_matching_2-gcc-ubuntu-2004-build -f "$dockerfile" . || exit 1 30 | fi 31 | docker run -u $(id -u):$(id -g) -v .:/tmp/map-matching-2 -it --rm map_matching_2-gcc-ubuntu-2004-build \ 32 | /bin/bash -c "cmake --build /tmp/map-matching-2/cmake-build-release --target install -j $(nproc)" 33 | 34 | # update licenses 35 | directories=("boost" "bz2" "csv_parser" "date" "expat" "gpx" "libosmium" "protozero" "rpmalloc" "zlib") 36 | for dir in "${directories[@]}"; do 37 | cp -p "run/gcc/release/doc/${dir}/"* "external/${dir}/" 38 | done 39 | 40 | printf "\n" 41 | echo "Updated license information." 42 | -------------------------------------------------------------------------------- /docker/appimage/Dockerfile: -------------------------------------------------------------------------------- 1 | # Build and run from project directory: 2 | # DOCKER_BUILDKIT=1 docker build --privileged -t map_matching_2-appimage -f docker/appimage/Dockerfile --output . . 3 | # docker run --device /dev/fuse --cap-add SYS_ADMIN --security-opt apparmor:unconfined -it --rm map_matching_2-appimage 4 | # docker run -u $(id -u):$(id -g) -v .:/tmp/map-matching-2 -it --rm map_matching_2-appimage 5 | 6 | FROM map_matching_2-gcc-ubuntu-2004-build AS build 7 | 8 | ARG DEBIAN_FRONTEND="noninteractive" 9 | 10 | WORKDIR /app 11 | 12 | COPY LICENSE.md . 13 | COPY CMakeLists.txt . 14 | COPY external external 15 | COPY src src 16 | 17 | RUN cmake -G Ninja -DCMAKE_BUILD_TYPE=Release -DENABLE_TESTS=OFF -DEXPLICIT_TEMPLATES=OFF -DCMAKE_INSTALL_PREFIX=/usr -B build && \ 18 | DESTDIR=/app/AppDir cmake --build build --parallel $(nproc) --target install 19 | 20 | FROM scratch AS export 21 | 22 | COPY --from=build /app/AppDir/ /AppDir 23 | -------------------------------------------------------------------------------- /docker/build/gcc/hub/Dockerfile: -------------------------------------------------------------------------------- 1 | # Build and run from project directory: 2 | # docker build -t map_matching_2-gcc-hub-build -f docker/build/gcc/hub/Dockerfile . 3 | # docker run -u $(id -u):$(id -g) -v .:/tmp/map-matching-2 -it --rm map_matching_2-gcc-docker-build 4 | 5 | FROM gcc:15 AS build 6 | 7 | ARG DEBIAN_FRONTEND="noninteractive" 8 | ARG CMAKE_VERSION=3.31.6 9 | 10 | RUN apt-get update && apt-get dist-upgrade -y && \ 11 | apt-get install --no-install-recommends -y \ 12 | tzdata make wget file xz-utils libssl-dev && \ 13 | apt-get install -y \ 14 | build-essential && \ 15 | # CMake 16 | wget "https://github.com/Kitware/CMake/releases/download/v${CMAKE_VERSION}/cmake-${CMAKE_VERSION}.tar.gz" && \ 17 | tar -xzf "cmake-${CMAKE_VERSION}.tar.gz" && \ 18 | rm -f "cmake-${CMAKE_VERSION}.tar.gz" && \ 19 | cd "cmake-${CMAKE_VERSION}" && \ 20 | ./bootstrap --parallel=$(nproc) && make -j $(nproc) && make install && \ 21 | cd .. && rm -rf "cmake-${CMAKE_VERSION}" && \ 22 | update-alternatives --install /usr/bin/cmake cmake /usr/local/bin/cmake 100 && \ 23 | # debug tools 24 | apt-get install --no-install-recommends -y \ 25 | gdb clang ninja-build autoconf automake libtool valgrind \ 26 | locales-all dos2unix rsync tar python3 python3-dev linux-perf time git && \ 27 | rm -rf /var/lib/apt/lists/* 28 | -------------------------------------------------------------------------------- /docker/debug/Dockerfile: -------------------------------------------------------------------------------- 1 | # Build and run from project directory: 2 | # docker build -t map_matching_2-debug -f docker/debug/Dockerfile . 3 | # docker run -u $(id -u):$(id -g) -v .:/tmp/map-matching-2 -it --rm map_matching_2-debug-build 4 | 5 | FROM map_matching_2-gcc-build AS build 6 | 7 | ARG DEBIAN_FRONTEND="noninteractive" 8 | 9 | WORKDIR /app 10 | 11 | RUN git clone https://github.com/royjacobson/externis.git 12 | RUN git clone https://github.com/fmtlib/fmt.git 13 | RUN git clone https://github.com/aras-p/ClangBuildAnalyzer.git 14 | 15 | WORKDIR /app/fmt 16 | 17 | RUN git checkout 11.2.0 && \ 18 | cmake -DCMAKE_CXX_COMPILER=g++ -B build && \ 19 | cmake --build build --parallel $(nproc) --target install 20 | 21 | WORKDIR /app/externis 22 | 23 | RUN cmake -DCMAKE_C_COMPILER=gcc -DCMAKE_CXX_COMPILER=g++ -B build && \ 24 | cmake --build build --parallel $(nproc) --target install 25 | 26 | WORKDIR /app/ClangBuildAnalyzer 27 | 28 | RUN cmake -DCMAKE_C_COMPILER=gcc -DCMAKE_CXX_COMPILER=g++ -B build && \ 29 | cmake --build build --parallel $(nproc) --target install 30 | 31 | # Commands: 32 | # FOLDER=/tmp/map-matching-2/cmake-build-debug-clang/src 33 | # 34 | # ./ClangBuildAnalyzer --start "$FOLDER" 35 | # ./ClangBuildAnalyzer --stop "$FOLDER" "$FOLDER/Capture.bin" 36 | # ./ClangBuildAnalyzer --analyze "$FOLDER/Capture.bin" 37 | # or 38 | # ./ClangBuildAnalyzer --all "$FOLDER" "$FOLDER/Capture.bin" 39 | -------------------------------------------------------------------------------- /docker/release/Dockerfile: -------------------------------------------------------------------------------- 1 | # Build and run from project directory: 2 | # docker build -t map_matching_2 -f docker/release/Dockerfile . 3 | # docker run --rm -v .:/tmp/map-matching-2 -u $(id -u):$(id -g) map_matching_2 4 | 5 | FROM map_matching_2-gcc-ubuntu-2004-build AS build 6 | 7 | ARG DEBIAN_FRONTEND="noninteractive" 8 | 9 | WORKDIR /app 10 | 11 | COPY LICENSE.md . 12 | COPY CMakeLists.txt . 13 | COPY external external 14 | COPY src src 15 | 16 | RUN cmake -G Ninja -DCMAKE_BUILD_TYPE=Release -DENABLE_TESTS=OFF -DEXPLICIT_TEMPLATES=OFF -B build && \ 17 | cmake --build build --parallel $(nproc) --target install 18 | 19 | FROM ubuntu:20.04 AS run 20 | 21 | COPY --from=build /app/run/gcc/release /app/run 22 | 23 | VOLUME /app/data 24 | 25 | WORKDIR /app 26 | 27 | ENTRYPOINT ["/app/run/bin/map_matching_2"] 28 | -------------------------------------------------------------------------------- /docs/figure12.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iisys-hof/map-matching-2/cf0295428a8d730875058ef0978345c6c7363a5d/docs/figure12.png -------------------------------------------------------------------------------- /docs/figure13.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iisys-hof/map-matching-2/cf0295428a8d730875058ef0978345c6c7363a5d/docs/figure13.png -------------------------------------------------------------------------------- /external/STL/README.md: -------------------------------------------------------------------------------- 1 | # Microsoft C++ Standard Library 2 | 3 | - licensed under **Apache License v2.0** with **LLVM Exception** 4 | - used as the runtime library for MSVC builds 5 | - is part of Microsoft Visual C++ (MSVC): \ 6 | https://visualstudio.microsoft.com/ 7 | - also available at: \ 8 | https://github.com/microsoft/STL 9 | -------------------------------------------------------------------------------- /external/boost/LICENSE_1_0.txt: -------------------------------------------------------------------------------- 1 | Boost Software License - Version 1.0 - August 17th, 2003 2 | 3 | Permission is hereby granted, free of charge, to any person or organization 4 | obtaining a copy of the software and accompanying documentation covered by 5 | this license (the "Software") to use, reproduce, display, distribute, 6 | execute, and transmit the Software, and to prepare derivative works of the 7 | Software, and to permit third-parties to whom the Software is furnished to 8 | do so, all subject to the following: 9 | 10 | The copyright notices in the Software and this entire statement, including 11 | the above license grant, this restriction and the following disclaimer, 12 | must be included in all copies of the Software, in whole or in part, and 13 | all derivative works of the Software, unless such copies or derivative 14 | works are solely in the form of machine-executable object code generated by 15 | a source language processor. 16 | 17 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 18 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 19 | FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT 20 | SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE 21 | FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE, 22 | ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 23 | DEALINGS IN THE SOFTWARE. 24 | -------------------------------------------------------------------------------- /external/boost/README.md: -------------------------------------------------------------------------------- 1 | # Boost 2 | 3 | - licensed under **Boost Software License - Version 1.0** 4 | - used in various algorithms when the standard library was not enough, e.g., \ 5 | string processing, ordered and unordered containers, index structures, geometric computations, 6 | multithreading and thread pools, program options, unit tests, serialization, memory mapping, and more 7 | - available at: \ 8 | https://www.boost.org/ and \ 9 | https://github.com/boostorg 10 | -------------------------------------------------------------------------------- /external/bz2/README.md: -------------------------------------------------------------------------------- 1 | # Bzip2 2 | 3 | - copyright **(C) 1996-2010 Julian R Seward** 4 | - used as dependency for libosmium 5 | - available at: \ 6 | https://gitlab.com/bzip2/bzip2.git 7 | -------------------------------------------------------------------------------- /external/csv_parser/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # csv parser 2 | set(csv_parser_SOURCE_DIR "${FETCHCONTENT_BASE_DIR}/csv_parser-src") 3 | if (EXISTS "${csv_parser_SOURCE_DIR}") 4 | set(csv_parser_EXISTS ON) 5 | set(FETCHCONTENT_FULLY_DISCONNECTED ON) 6 | endif () 7 | 8 | FetchContent_Declare(csv_parser 9 | GIT_REPOSITORY https://github.com/vincentlaucsb/csv-parser.git 10 | GIT_TAG 2.3.0 11 | GIT_SUBMODULES "" 12 | EXCLUDE_FROM_ALL) 13 | 14 | set(CSV_BUILD_PROGRAMS OFF CACHE BOOL "do not build csv-parser programs" FORCE) 15 | 16 | FetchContent_MakeAvailable(csv_parser) 17 | 18 | set(CSV_INCLUDE_DIR "${csv_parser_SOURCE_DIR}/single_include" CACHE PATH "csv parser include dir" FORCE) 19 | 20 | if (NOT BUILD_ONLY_LIBRARY) 21 | install(FILES 22 | "${csv_parser_SOURCE_DIR}/LICENSE" 23 | DESTINATION doc/csv_parser) 24 | endif () 25 | 26 | unset(FETCHCONTENT_FULLY_DISCONNECTED) 27 | -------------------------------------------------------------------------------- /external/csv_parser/LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2017-2019 Vincent La 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /external/csv_parser/README.md: -------------------------------------------------------------------------------- 1 | # Vince's CSV Parser 2 | 3 | - licensed under **MIT License** 4 | - used for reading and writing of CSV files 5 | - available at: \ 6 | https://github.com/vincentlaucsb/csv-parser.git 7 | -------------------------------------------------------------------------------- /external/date/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # date 2 | set(date_SOURCE_DIR "${FETCHCONTENT_BASE_DIR}/date-src") 3 | if (EXISTS "${date_SOURCE_DIR}") 4 | set(date_EXISTS ON) 5 | set(FETCHCONTENT_FULLY_DISCONNECTED ON) 6 | endif () 7 | 8 | FetchContent_Declare(date 9 | GIT_REPOSITORY https://github.com/HowardHinnant/date.git 10 | GIT_TAG v3.0.3 11 | EXCLUDE_FROM_ALL) 12 | 13 | set(ENABLE_DATE_INSTALL OFF CACHE BOOL "disable date install" FORCE) 14 | set(USE_SYSTEM_TZ_DB ON CACHE BOOL "use system timezone database" FORCE) 15 | set(BUILD_TZ_LIB ON CACHE BOOL "enable date timezone library" FORCE) 16 | 17 | FetchContent_MakeAvailable(date) 18 | 19 | if (NOT BUILD_ONLY_LIBRARY) 20 | install(FILES 21 | "${date_SOURCE_DIR}/LICENSE.txt" 22 | DESTINATION doc/date) 23 | endif () 24 | 25 | unset(FETCHCONTENT_FULLY_DISCONNECTED) 26 | -------------------------------------------------------------------------------- /external/date/LICENSE.txt: -------------------------------------------------------------------------------- 1 | The source code in this project is released using the MIT License. There is no 2 | global license for the project because each file is licensed individually with 3 | different author names and/or dates. 4 | 5 | If you contribute to this project, please add your name to the license of each 6 | file you modify. If you have already contributed to this project and forgot to 7 | add your name to the license, please feel free to submit a new P/R to add your 8 | name to the license in each file you modified. 9 | 10 | For convenience, here is a copy of the MIT license found in each file except 11 | without author names or dates: 12 | 13 | The MIT License (MIT) 14 | 15 | Permission is hereby granted, free of charge, to any person obtaining a copy 16 | of this software and associated documentation files (the "Software"), to deal 17 | in the Software without restriction, including without limitation the rights 18 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 19 | copies of the Software, and to permit persons to whom the Software is 20 | furnished to do so, subject to the following conditions: 21 | 22 | The above copyright notice and this permission notice shall be included in all 23 | copies or substantial portions of the Software. 24 | 25 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 26 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 27 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 28 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 29 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 30 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 31 | SOFTWARE. 32 | -------------------------------------------------------------------------------- /external/date/README.md: -------------------------------------------------------------------------------- 1 | # Date 2 | 3 | - licensed under **The MIT License** 4 | - used as an alternative when std::chrono::parse (which is based on date::parse) 5 | is not yet available in a specific compiler version 6 | - available at: \ 7 | https://github.com/HowardHinnant/date.git 8 | -------------------------------------------------------------------------------- /external/expat/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # expat 2 | set(expat_SOURCE_DIR "${FETCHCONTENT_BASE_DIR}/expat-src") 3 | if (EXISTS "${expat_SOURCE_DIR}") 4 | set(expat_EXISTS ON) 5 | set(FETCHCONTENT_FULLY_DISCONNECTED ON) 6 | endif () 7 | 8 | FetchContent_Declare(expat 9 | GIT_REPOSITORY https://github.com/libexpat/libexpat.git 10 | GIT_TAG R_2_7_1 11 | SOURCE_SUBDIR expat 12 | EXCLUDE_FROM_ALL) 13 | 14 | FetchContent_MakeAvailable(expat) 15 | 16 | if (MSVC) 17 | if (USE_STATIC_MSVC_RUNTIME_LIBRARY) 18 | set(EXPAT_MSVC_STATIC_CRT "-DEXPAT_MSVC_STATIC_CRT=ON") 19 | endif () 20 | endif () 21 | 22 | if (NOT expat_EXISTS) 23 | execute_process(COMMAND ${CMAKE_COMMAND} 24 | -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE} 25 | -DCMAKE_GENERATOR=${CMAKE_GENERATOR} 26 | ${EXPAT_MSVC_STATIC_CRT} 27 | -DEXPAT_BUILD_EXAMPLES=OFF 28 | -DEXPAT_BUILD_TESTS=OFF 29 | -DEXPAT_BUILD_TOOLS=OFF 30 | -DEXPAT_SHARED_LIBS=OFF 31 | -DEXPAT_ENABLE_INSTALL=OFF 32 | -S "${expat_SOURCE_DIR}/expat" 33 | -B "${expat_BINARY_DIR}" 34 | COMMAND_ECHO STDOUT) 35 | execute_process(COMMAND ${CMAKE_COMMAND} 36 | --build "${expat_BINARY_DIR}") 37 | endif () 38 | 39 | set(EXPAT_ROOT "${expat_BINARY_DIR};${expat_SOURCE_DIR}/expat/lib" CACHE PATH "expat root path" FORCE) 40 | 41 | find_package(EXPAT REQUIRED) 42 | 43 | if (NOT BUILD_ONLY_LIBRARY) 44 | install(FILES 45 | "${expat_SOURCE_DIR}/COPYING" 46 | DESTINATION doc/expat) 47 | endif () 48 | 49 | unset(FETCHCONTENT_FULLY_DISCONNECTED) 50 | -------------------------------------------------------------------------------- /external/expat/COPYING: -------------------------------------------------------------------------------- 1 | Copyright (c) 1998-2000 Thai Open Source Software Center Ltd and Clark Cooper 2 | Copyright (c) 2001-2025 Expat maintainers 3 | 4 | Permission is hereby granted, free of charge, to any person obtaining 5 | a copy of this software and associated documentation files (the 6 | "Software"), to deal in the Software without restriction, including 7 | without limitation the rights to use, copy, modify, merge, publish, 8 | distribute, sublicense, and/or sell copies of the Software, and to 9 | permit persons to whom the Software is furnished to do so, subject to 10 | the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included 13 | in all copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 16 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 17 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 18 | IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 19 | CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 20 | TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 21 | SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 22 | -------------------------------------------------------------------------------- /external/expat/README.md: -------------------------------------------------------------------------------- 1 | # Expat 2 | 3 | - **Copyright (c) 1998-2000 Thai Open Source Software Center Ltd and Clark Cooper** and \ 4 | **Copyright (c) 2001-2022 Expat maintainers** 5 | - used as dependency for libosmium 6 | - available at: \ 7 | https://github.com/libexpat/libexpat.git 8 | -------------------------------------------------------------------------------- /external/gpx/README.md: -------------------------------------------------------------------------------- 1 | # gpxlib 2 | 3 | - licensed under **GNU LESSER GENERAL PUBLIC LICENSE Version 3** 4 | - used for reading of GPX files 5 | - available at: \ 6 | https://github.com/irdvo/gpxlib.git 7 | -------------------------------------------------------------------------------- /external/libc++/README.md: -------------------------------------------------------------------------------- 1 | # "libc++" C++ Standard Library 2 | 3 | - licensed under **Apache License v2.0** with **LLVM Exceptions** 4 | - used as the runtime library for Clang builds 5 | - is part of LLVM: \ 6 | https://llvm.org/ 7 | - also available at: \ 8 | https://github.com/llvm/llvm-project 9 | -------------------------------------------------------------------------------- /external/libosmium/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # libosmium 2 | set(libosmium_SOURCE_DIR "${FETCHCONTENT_BASE_DIR}/libosmium-src") 3 | if (EXISTS "${libosmium_SOURCE_DIR}") 4 | set(libosmium_EXISTS ON) 5 | set(FETCHCONTENT_FULLY_DISCONNECTED ON) 6 | endif () 7 | 8 | FetchContent_Declare(libosmium 9 | GIT_REPOSITORY https://github.com/osmcode/libosmium.git 10 | GIT_TAG v2.22.0 11 | GIT_SUBMODULES "" 12 | SOURCE_SUBDIR this-directory-does-not-exist 13 | EXCLUDE_FROM_ALL) 14 | 15 | set(BUILD_EXAMPLES OFF CACHE BOOL "do not build libosmium examples" FORCE) 16 | set(BUILD_TESTING OFF CACHE BOOL "do not build libosmium tests" FORCE) 17 | 18 | FetchContent_MakeAvailable(libosmium) 19 | 20 | set(CMAKE_MODULE_PATH "${CMAKE_MODULE_PATH};${libosmium_SOURCE_DIR}/cmake" CACHE STRING "cmake module path" FORCE) 21 | set(Osmium_ROOT "${libosmium_SOURCE_DIR}" CACHE PATH "osmium root path" FORCE) 22 | 23 | find_package(Osmium MODULE REQUIRED COMPONENTS io) 24 | 25 | if (NOT BUILD_ONLY_LIBRARY) 26 | install(FILES 27 | "${libosmium_SOURCE_DIR}/LICENSE" 28 | DESTINATION doc/libosmium) 29 | endif () 30 | 31 | unset(FETCHCONTENT_FULLY_DISCONNECTED) 32 | -------------------------------------------------------------------------------- /external/libosmium/LICENSE: -------------------------------------------------------------------------------- 1 | Boost Software License - Version 1.0 - August 17th, 2003 2 | 3 | Permission is hereby granted, free of charge, to any person or organization 4 | obtaining a copy of the software and accompanying documentation covered by 5 | this license (the "Software") to use, reproduce, display, distribute, 6 | execute, and transmit the Software, and to prepare derivative works of the 7 | Software, and to permit third-parties to whom the Software is furnished to 8 | do so, all subject to the following: 9 | 10 | The copyright notices in the Software and this entire statement, including 11 | the above license grant, this restriction and the following disclaimer, 12 | must be included in all copies of the Software, in whole or in part, and 13 | all derivative works of the Software, unless such copies or derivative 14 | works are solely in the form of machine-executable object code generated by 15 | a source language processor. 16 | 17 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 18 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 19 | FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT 20 | SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE 21 | FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE, 22 | ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 23 | DEALINGS IN THE SOFTWARE. 24 | -------------------------------------------------------------------------------- /external/libosmium/README.md: -------------------------------------------------------------------------------- 1 | # Libosmium 2 | 3 | - licensed under **Boost Software License - Version 1.0** 4 | - used for the processing of [OpenStreetMap ©](https://www.openstreetmap.org/) data, i.e., importing of road networks 5 | - available at: \ 6 | https://github.com/osmcode/libosmium.git 7 | -------------------------------------------------------------------------------- /external/libstdc++/README.md: -------------------------------------------------------------------------------- 1 | # "libstdc++" C++ Standard Library 2 | 3 | - licensed under **GNU General Public License version 3** with **GCC RUNTIME LIBRARY EXCEPTION** 4 | - used as the runtime library for GCC builds 5 | - is part of GCC: \ 6 | https://gcc.gnu.org/ 7 | - also available at: \ 8 | https://github.com/gcc-mirror/gcc 9 | -------------------------------------------------------------------------------- /external/protozero/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # protozero 2 | set(protozero_SOURCE_DIR "${FETCHCONTENT_BASE_DIR}/protozero-src") 3 | if (EXISTS "${protozero_SOURCE_DIR}") 4 | set(protozero_EXISTS ON) 5 | set(FETCHCONTENT_FULLY_DISCONNECTED ON) 6 | endif () 7 | 8 | FetchContent_Declare(protozero 9 | GIT_REPOSITORY https://github.com/mapbox/protozero.git 10 | GIT_TAG v1.8.0 11 | EXCLUDE_FROM_ALL) 12 | 13 | set(BUILD_TESTING OFF CACHE BOOL "do not build protozero tests" FORCE) 14 | 15 | FetchContent_MakeAvailable(protozero) 16 | 17 | set(CMAKE_MODULE_PATH "${CMAKE_MODULE_PATH};${protozero_SOURCE_DIR}/cmake" CACHE STRING "cmake module path" FORCE) 18 | set(Protozero_ROOT "${protozero_SOURCE_DIR}" CACHE PATH "protozero root path" FORCE) 19 | 20 | find_package(Protozero MODULE REQUIRED) 21 | 22 | if (NOT BUILD_ONLY_LIBRARY) 23 | install(FILES 24 | "${protozero_SOURCE_DIR}/LICENSE.md" 25 | DESTINATION doc/protozero) 26 | endif () 27 | 28 | unset(FETCHCONTENT_FULLY_DISCONNECTED) 29 | -------------------------------------------------------------------------------- /external/protozero/LICENSE.md: -------------------------------------------------------------------------------- 1 | Copyright (C) 2022, Mapbox. 2 | All rights reserved. 3 | 4 | Redistribution and use in source and binary forms, with or without 5 | modification, are permitted provided that the following conditions are 6 | met: 7 | 8 | 1. Redistributions of source code must retain the above copyright 9 | notice, this list of conditions and the following disclaimer. 10 | 11 | 2. Redistributions in binary form must reproduce the above copyright 12 | notice, this list of conditions and the following disclaimer in 13 | the documentation and/or other materials provided with the 14 | distribution. 15 | 16 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS 17 | IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, 18 | THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 19 | PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR 20 | CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 21 | EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, 22 | PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 23 | PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 24 | LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 25 | NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 26 | SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 27 | -------------------------------------------------------------------------------- /external/protozero/README.md: -------------------------------------------------------------------------------- 1 | # protozero 2 | 3 | - **protozero copyright (c) Mapbox** 4 | - used as dependency for libosmium 5 | - available at: \ 6 | https://github.com/mapbox/protozero.git 7 | -------------------------------------------------------------------------------- /external/rpmalloc/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # rpmalloc 2 | set(rpmalloc_SOURCE_DIR "${FETCHCONTENT_BASE_DIR}/rpmalloc-src") 3 | if (EXISTS "${rpmalloc_SOURCE_DIR}") 4 | set(rpmalloc_EXISTS ON) 5 | set(FETCHCONTENT_FULLY_DISCONNECTED ON) 6 | endif () 7 | 8 | FetchContent_Declare(rpmalloc 9 | GIT_REPOSITORY https://github.com/mjansson/rpmalloc.git 10 | GIT_TAG 1.4.5 11 | SOURCE_SUBDIR this-directory-does-not-exist 12 | EXCLUDE_FROM_ALL) 13 | 14 | FetchContent_MakeAvailable(rpmalloc) 15 | 16 | if (NOT rpmalloc_EXISTS) 17 | file(WRITE "${rpmalloc_SOURCE_DIR}/CMakeLists.txt" 18 | [[ 19 | project(rpmalloc 20 | VERSION 1.4.5 21 | DESCRIPTION "rpmalloc" 22 | LANGUAGES C) 23 | 24 | add_library(rpmalloc STATIC) 25 | 26 | target_compile_definitions(rpmalloc 27 | PRIVATE 28 | _GNU_SOURCE 29 | ENABLE_OVERRIDE=1 30 | DEFAULT_SPAN_MAP_COUNT=256 31 | PUBLIC 32 | ENABLE_PRELOAD=1) 33 | 34 | target_sources(rpmalloc 35 | PRIVATE 36 | rpmalloc/rpmalloc.c) 37 | 38 | target_include_directories(rpmalloc 39 | PUBLIC 40 | rpmalloc) 41 | 42 | target_link_libraries(rpmalloc 43 | PRIVATE 44 | ${CMAKE_DL_LIBS}) 45 | ]]) 46 | endif () 47 | 48 | add_subdirectory("${rpmalloc_SOURCE_DIR}" "${rpmalloc_BINARY_DIR}" EXCLUDE_FROM_ALL) 49 | 50 | set(RPMALLOC_INCLUDE_DIR "${rpmalloc_SOURCE_DIR}/rpmalloc" CACHE PATH "rpmalloc include dir" FORCE) 51 | 52 | if (NOT BUILD_ONLY_LIBRARY) 53 | install(FILES 54 | "${rpmalloc_SOURCE_DIR}/LICENSE" 55 | DESTINATION doc/rpmalloc) 56 | endif () 57 | 58 | unset(FETCHCONTENT_FULLY_DISCONNECTED) 59 | -------------------------------------------------------------------------------- /external/rpmalloc/README.md: -------------------------------------------------------------------------------- 1 | # rpmalloc 2 | 3 | - distributed as **public domain** 4 | - used for improving memory allocation and deallocation performance 5 | - available at: \ 6 | https://github.com/mjansson/rpmalloc.git 7 | -------------------------------------------------------------------------------- /external/zlib/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # zlib 2 | set(zlib_SOURCE_DIR "${FETCHCONTENT_BASE_DIR}/zlib-src") 3 | if (EXISTS "${zlib_SOURCE_DIR}") 4 | set(zlib_EXISTS ON) 5 | set(FETCHCONTENT_FULLY_DISCONNECTED ON) 6 | endif () 7 | 8 | FetchContent_Declare(zlib 9 | GIT_REPOSITORY https://github.com/madler/zlib.git 10 | GIT_TAG v1.3.1 11 | SOURCE_SUBDIR this-directory-does-not-exist 12 | EXCLUDE_FROM_ALL) 13 | 14 | FetchContent_MakeAvailable(zlib) 15 | 16 | if (NOT zlib_EXISTS) 17 | execute_process(COMMAND ${CMAKE_COMMAND} 18 | -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE} 19 | -DCMAKE_GENERATOR=${CMAKE_GENERATOR} 20 | -DCMAKE_MSVC_RUNTIME_LIBRARY=${CMAKE_MSVC_RUNTIME_LIBRARY} 21 | -DZLIB_BUILD_EXAMPLES=OFF 22 | -S "${zlib_SOURCE_DIR}" 23 | -B "${zlib_BINARY_DIR}") 24 | execute_process(COMMAND ${CMAKE_COMMAND} 25 | --build "${zlib_BINARY_DIR}") 26 | 27 | if (EXISTS ${zlib_SOURCE_DIR}/zconf.h.included) 28 | # in case the zconf.h file was renamed, rename it back 29 | file(RENAME ${zlib_SOURCE_DIR}/zconf.h.included ${zlib_SOURCE_DIR}/zconf.h) 30 | endif () 31 | endif () 32 | 33 | set(ZLIB_ROOT "${zlib_BINARY_DIR};${zlib_SOURCE_DIR}" CACHE PATH "zlib root path" FORCE) 34 | set(ZLIB_USE_STATIC_LIBS ON CACHE BOOL "zlib use static libs" FORCE) 35 | 36 | find_package(ZLIB REQUIRED) 37 | 38 | if (NOT BUILD_ONLY_LIBRARY) 39 | install(FILES 40 | "${zlib_SOURCE_DIR}/LICENSE" 41 | DESTINATION doc/zlib) 42 | endif () 43 | 44 | unset(FETCHCONTENT_FULLY_DISCONNECTED) 45 | -------------------------------------------------------------------------------- /external/zlib/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright notice: 2 | 3 | (C) 1995-2022 Jean-loup Gailly and Mark Adler 4 | 5 | This software is provided 'as-is', without any express or implied 6 | warranty. In no event will the authors be held liable for any damages 7 | arising from the use of this software. 8 | 9 | Permission is granted to anyone to use this software for any purpose, 10 | including commercial applications, and to alter it and redistribute it 11 | freely, subject to the following restrictions: 12 | 13 | 1. The origin of this software must not be misrepresented; you must not 14 | claim that you wrote the original software. If you use this software 15 | in a product, an acknowledgment in the product documentation would be 16 | appreciated but is not required. 17 | 2. Altered source versions must be plainly marked as such, and must not be 18 | misrepresented as being the original software. 19 | 3. This notice may not be removed or altered from any source distribution. 20 | 21 | Jean-loup Gailly Mark Adler 22 | jloup@gzip.org madler@alumni.caltech.edu 23 | -------------------------------------------------------------------------------- /external/zlib/README.md: -------------------------------------------------------------------------------- 1 | # zlib 2 | 3 | - copyright **(C) 1995-2022 Jean-loup Gailly and Mark Adler** 4 | - used as dependency for libosmium 5 | - available at: \ 6 | https://github.com/madler/zlib.git 7 | -------------------------------------------------------------------------------- /src/app/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | set(THREADS_PREFER_PTHREAD_FLAG ON) 2 | 3 | find_package(Threads REQUIRED) 4 | find_package(Boost REQUIRED COMPONENTS thread program_options) 5 | 6 | add_library(app STATIC) 7 | 8 | target_sources(app 9 | PRIVATE 10 | src/app/compare.cpp 11 | src/app/global.cpp 12 | src/app/match.cpp 13 | src/app/match_cli.cpp 14 | src/app/mode.cpp 15 | src/app/network.cpp 16 | src/app/options.cpp 17 | src/app/prepare.cpp 18 | src/app/settings.cpp) 19 | 20 | target_compile_definitions(app 21 | PUBLIC 22 | BOOST_THREAD_VERSION=5 23 | BOOST_ALLOW_DEPRECATED_HEADERS 24 | BOOST_GEOMETRY_INDEX_DETAIL_EXPERIMENTAL) 25 | 26 | target_include_directories(app 27 | PUBLIC 28 | ${CMAKE_CURRENT_SOURCE_DIR}/include 29 | ${CMAKE_CURRENT_BINARY_DIR}/include) 30 | 31 | target_link_libraries(app 32 | PUBLIC 33 | library 34 | Boost::program_options) 35 | -------------------------------------------------------------------------------- /src/app/include/app/compare.hpp: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2024-2025 Adrian Wöltche 2 | // 3 | // This program is free software: you can redistribute it and/or modify 4 | // it under the terms of the GNU Affero General Public License as 5 | // published by the Free Software Foundation, either version 3 of the 6 | // License, or (at your option) any later version. 7 | // 8 | // This program is distributed in the hope that it will be useful, 9 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 10 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 | // GNU Affero General Public License for more details. 12 | // 13 | // You should have received a copy of the GNU Affero General Public License 14 | // along with this program. If not, see https://www.gnu.org/licenses/. 15 | 16 | #ifndef MAP_MATCHING_2_APP_COMPARE_HPP 17 | #define MAP_MATCHING_2_APP_COMPARE_HPP 18 | 19 | #include 20 | 21 | #include "global.hpp" 22 | #include "options.hpp" 23 | 24 | #include "compare/comparator.hpp" 25 | 26 | namespace map_matching_2::app { 27 | 28 | [[nodiscard]] std::unique_ptr _start_comparator(const compare_data &data); 29 | 30 | void _join_comparator(std::unique_ptr &comparator); 31 | 32 | void _read_compares(std::unique_ptr &comparator, const compare_data &data); 33 | 34 | void _start_comparison(const compare_data &data); 35 | 36 | void _compare(const compare_data &data); 37 | 38 | int compare(int argc, char *argv[]); 39 | 40 | } 41 | 42 | #endif //MAP_MATCHING_2_APP_COMPARE_HPP 43 | -------------------------------------------------------------------------------- /src/app/include/app/match_cli.hpp: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2024-2025 Adrian Wöltche 2 | // 3 | // This program is free software: you can redistribute it and/or modify 4 | // it under the terms of the GNU Affero General Public License as 5 | // published by the Free Software Foundation, either version 3 of the 6 | // License, or (at your option) any later version. 7 | // 8 | // This program is distributed in the hope that it will be useful, 9 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 10 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 | // GNU Affero General Public License for more details. 12 | // 13 | // You should have received a copy of the GNU Affero General Public License 14 | // along with this program. If not, see https://www.gnu.org/licenses/. 15 | 16 | #ifndef MAP_MATCHING_2_APP_MATCH_CLI_HPP 17 | #define MAP_MATCHING_2_APP_MATCH_CLI_HPP 18 | 19 | #include "match.hpp" 20 | 21 | namespace map_matching_2::app { 22 | 23 | void _match_cli(const match_data &data); 24 | 25 | int match_cli(int argc, char *argv[]); 26 | 27 | } 28 | 29 | #endif //MAP_MATCHING_2_APP_MATCH_CLI_HPP 30 | -------------------------------------------------------------------------------- /src/app/include/app/match_web.hpp: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2024-2025 Adrian Wöltche 2 | // 3 | // This program is free software: you can redistribute it and/or modify 4 | // it under the terms of the GNU Affero General Public License as 5 | // published by the Free Software Foundation, either version 3 of the 6 | // License, or (at your option) any later version. 7 | // 8 | // This program is distributed in the hope that it will be useful, 9 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 10 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 | // GNU Affero General Public License for more details. 12 | // 13 | // You should have received a copy of the GNU Affero General Public License 14 | // along with this program. If not, see https://www.gnu.org/licenses/. 15 | 16 | #ifndef MAP_MATCHING_2_APP_MATCH_WEB_HPP 17 | #define MAP_MATCHING_2_APP_MATCH_WEB_HPP 18 | 19 | #include "match.hpp" 20 | 21 | namespace map_matching_2::app { 22 | 23 | void _match_web(const match_data &data); 24 | 25 | int match_web(int argc, char *argv[]); 26 | 27 | } 28 | 29 | #endif //MAP_MATCHING_2_APP_MATCH_WEB_HPP 30 | -------------------------------------------------------------------------------- /src/app/include/app/mode.hpp: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2024-2025 Adrian Wöltche 2 | // 3 | // This program is free software: you can redistribute it and/or modify 4 | // it under the terms of the GNU Affero General Public License as 5 | // published by the Free Software Foundation, either version 3 of the 6 | // License, or (at your option) any later version. 7 | // 8 | // This program is distributed in the hope that it will be useful, 9 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 10 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 | // GNU Affero General Public License for more details. 12 | // 13 | // You should have received a copy of the GNU Affero General Public License 14 | // along with this program. If not, see https://www.gnu.org/licenses/. 15 | 16 | #ifndef MAP_MATCHING_2_MODE_HPP 17 | #define MAP_MATCHING_2_MODE_HPP 18 | 19 | #include "global.hpp" 20 | #include "options.hpp" 21 | 22 | namespace map_matching_2::app { 23 | 24 | void _mode(const mode_data &data); 25 | 26 | int mode(int argc, char *argv[]); 27 | 28 | } 29 | 30 | #endif //MAP_MATCHING_2_MODE_HPP 31 | -------------------------------------------------------------------------------- /src/app/include/app/settings.hpp: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2024-2025 Adrian Wöltche 2 | // 3 | // This program is free software: you can redistribute it and/or modify 4 | // it under the terms of the GNU Affero General Public License as 5 | // published by the Free Software Foundation, either version 3 of the 6 | // License, or (at your option) any later version. 7 | // 8 | // This program is distributed in the hope that it will be useful, 9 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 10 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 | // GNU Affero General Public License for more details. 12 | // 13 | // You should have received a copy of the GNU Affero General Public License 14 | // along with this program. If not, see https://www.gnu.org/licenses/. 15 | 16 | #ifndef MAP_MATCHING_2_APP_SETTINGS_HPP 17 | #define MAP_MATCHING_2_APP_SETTINGS_HPP 18 | 19 | #include "options.hpp" 20 | 21 | #include "matching/settings.hpp" 22 | #include "compare/settings.hpp" 23 | #include "io/track/importer_settings.hpp" 24 | #include "io/csv_settings.hpp" 25 | 26 | namespace map_matching_2::app { 27 | 28 | matching::settings _match_settings(const match_data &data); 29 | 30 | compare::settings _compare_settings(const compare_data &data); 31 | 32 | io::track::importer_settings _importer_settings(const match_data &data); 33 | 34 | io::track::importer_settings _matches_importer_settings(const compare_data &data); 35 | 36 | io::track::importer_settings _compares_importer_settings(const compare_data &data); 37 | 38 | io::csv_settings _csv_settings(const csv_data &csv); 39 | 40 | io::csv_settings _csv_tracks_settings(const csv_tracks_data &csv); 41 | 42 | } 43 | 44 | #endif //MAP_MATCHING_2_APP_SETTINGS_HPP 45 | -------------------------------------------------------------------------------- /src/library/include/compare/comparator/comparator_forwarder_compares.hpp: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2024-2025 Adrian Wöltche 2 | // 3 | // This program is free software: you can redistribute it and/or modify 4 | // it under the terms of the GNU Affero General Public License as 5 | // published by the Free Software Foundation, either version 3 of the 6 | // License, or (at your option) any later version. 7 | // 8 | // This program is distributed in the hope that it will be useful, 9 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 10 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 | // GNU Affero General Public License for more details. 12 | // 13 | // You should have received a copy of the GNU Affero General Public License 14 | // along with this program. If not, see https://www.gnu.org/licenses/. 15 | 16 | #ifndef MAP_MATCHING_2_COMPARE_COMPARATOR_COMPARATOR_FORWARDER_COMPARES_HPP 17 | #define MAP_MATCHING_2_COMPARE_COMPARATOR_COMPARATOR_FORWARDER_COMPARES_HPP 18 | 19 | #include "comparator_forwarder_data.hpp" 20 | 21 | namespace map_matching_2::compare { 22 | 23 | class comparator_forwarder_compares { 24 | 25 | public: 26 | using import_multi_track_variant_type = geometry::track::import_multi_track_variant_type; 27 | 28 | constexpr explicit comparator_forwarder_compares(comparator_forwarder_data &data) 29 | : _data{data} {} 30 | 31 | void pass(import_multi_track_variant_type multi_track) const; 32 | 33 | private: 34 | comparator_forwarder_data &_data; 35 | 36 | }; 37 | 38 | } 39 | 40 | #endif //MAP_MATCHING_2_COMPARE_COMPARATOR_COMPARATOR_FORWARDER_COMPARES_HPP 41 | -------------------------------------------------------------------------------- /src/library/include/compare/comparator/comparator_forwarder_matches.hpp: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2024-2025 Adrian Wöltche 2 | // 3 | // This program is free software: you can redistribute it and/or modify 4 | // it under the terms of the GNU Affero General Public License as 5 | // published by the Free Software Foundation, either version 3 of the 6 | // License, or (at your option) any later version. 7 | // 8 | // This program is distributed in the hope that it will be useful, 9 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 10 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 | // GNU Affero General Public License for more details. 12 | // 13 | // You should have received a copy of the GNU Affero General Public License 14 | // along with this program. If not, see https://www.gnu.org/licenses/. 15 | 16 | #ifndef MAP_MATCHING_2_COMPARE_COMPARATOR_COMPARATOR_FORWARDER_MATCHES_HPP 17 | #define MAP_MATCHING_2_COMPARE_COMPARATOR_COMPARATOR_FORWARDER_MATCHES_HPP 18 | 19 | #include "comparator_forwarder_data.hpp" 20 | 21 | namespace map_matching_2::compare { 22 | 23 | class comparator_forwarder_matches { 24 | 25 | public: 26 | using import_multi_track_variant_type = geometry::track::import_multi_track_variant_type; 27 | 28 | constexpr explicit comparator_forwarder_matches(comparator_forwarder_data &data) 29 | : _data{data} {} 30 | 31 | void pass(import_multi_track_variant_type multi_track) const; 32 | 33 | private: 34 | comparator_forwarder_data &_data; 35 | 36 | }; 37 | 38 | } 39 | 40 | #endif //MAP_MATCHING_2_COMPARE_COMPARATOR_COMPARATOR_FORWARDER_MATCHES_HPP 41 | -------------------------------------------------------------------------------- /src/library/include/compare/comparator/compare_result.hpp: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2024-2025 Adrian Wöltche 2 | // 3 | // This program is free software: you can redistribute it and/or modify 4 | // it under the terms of the GNU Affero General Public License as 5 | // published by the Free Software Foundation, either version 3 of the 6 | // License, or (at your option) any later version. 7 | // 8 | // This program is distributed in the hope that it will be useful, 9 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 10 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 | // GNU Affero General Public License for more details. 12 | // 13 | // You should have received a copy of the GNU Affero General Public License 14 | // along with this program. If not, see https://www.gnu.org/licenses/. 15 | 16 | #ifndef MAP_MATCHING_2_COMPARE_COMPARATOR_COMPARE_RESULT_HPP 17 | #define MAP_MATCHING_2_COMPARE_COMPARATOR_COMPARE_RESULT_HPP 18 | 19 | #include "geometry/algorithm/compare/comparison.hpp" 20 | 21 | #include "../settings.hpp" 22 | 23 | namespace map_matching_2::compare { 24 | 25 | template 26 | struct compare_result { 27 | using multi_track_type = MultiTrack; 28 | using multi_rich_line_type = typename multi_track_type::multi_rich_line_type; 29 | using rich_segment_type = typename multi_track_type::rich_segment_type; 30 | 31 | const compare::settings &compare_settings; 32 | multi_track_type match; 33 | multi_track_type ground_truth; 34 | geometry::comparison comparison; 35 | double duration{0.0}; 36 | }; 37 | 38 | } 39 | 40 | #endif //MAP_MATCHING_2_COMPARE_COMPARATOR_COMPARE_RESULT_HPP 41 | -------------------------------------------------------------------------------- /src/library/include/compare/comparator/compare_task.hpp: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2024-2025 Adrian Wöltche 2 | // 3 | // This program is free software: you can redistribute it and/or modify 4 | // it under the terms of the GNU Affero General Public License as 5 | // published by the Free Software Foundation, either version 3 of the 6 | // License, or (at your option) any later version. 7 | // 8 | // This program is distributed in the hope that it will be useful, 9 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 10 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 | // GNU Affero General Public License for more details. 12 | // 13 | // You should have received a copy of the GNU Affero General Public License 14 | // along with this program. If not, see https://www.gnu.org/licenses/. 15 | 16 | #ifndef MAP_MATCHING_2_COMPARE_COMPARATOR_COMPARE_TASK_HPP 17 | #define MAP_MATCHING_2_COMPARE_COMPARATOR_COMPARE_TASK_HPP 18 | 19 | #include "types/geometry/track/multi_track.hpp" 20 | 21 | #include "../settings.hpp" 22 | 23 | namespace map_matching_2::compare { 24 | 25 | struct compare_task { 26 | using import_multi_track_variant_type = geometry::track::import_multi_track_variant_type; 27 | 28 | import_multi_track_variant_type match{}, ground_truth{}; 29 | compare::settings compare_settings{}; 30 | 31 | compare_task() = default; 32 | 33 | compare_task(import_multi_track_variant_type match, import_multi_track_variant_type ground_truth, 34 | compare::settings compare_settings = {}); 35 | }; 36 | 37 | } 38 | 39 | #endif //MAP_MATCHING_2_COMPARE_COMPARATOR_COMPARE_TASK_HPP 40 | -------------------------------------------------------------------------------- /src/library/include/compare/settings.hpp: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2020-2025 Adrian Wöltche 2 | // 3 | // This program is free software: you can redistribute it and/or modify 4 | // it under the terms of the GNU Affero General Public License as 5 | // published by the Free Software Foundation, either version 3 of the 6 | // License, or (at your option) any later version. 7 | // 8 | // This program is distributed in the hope that it will be useful, 9 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 10 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 | // GNU Affero General Public License for more details. 12 | // 13 | // You should have received a copy of the GNU Affero General Public License 14 | // along with this program. If not, see https://www.gnu.org/licenses/. 15 | 16 | #ifndef MAP_MATCHING_2_COMPARE_SETTINGS_HPP 17 | #define MAP_MATCHING_2_COMPARE_SETTINGS_HPP 18 | 19 | #include 20 | 21 | #include "geometry/srs.hpp" 22 | 23 | namespace map_matching_2::compare { 24 | 25 | struct settings { 26 | 27 | bool verbose{false}, quiet{false}, debug{false}; 28 | 29 | geometry::srs_transform matches_srs_transform{}, ground_truth_srs_transform{}; 30 | 31 | std::string output{}, filename{}; 32 | 33 | bool console{false}, ignore_non_existent{false}; 34 | 35 | double simplifying_tolerance{0.1}, simplifying_reverse_tolerance{0.1}, adoption_distance_tolerance{0.1}, 36 | split_distance_tolerance{1.0}, split_direction_tolerance{90.0}; 37 | 38 | }; 39 | 40 | } 41 | 42 | #endif //MAP_MATCHING_2_COMPARE_SETTINGS_HPP 43 | -------------------------------------------------------------------------------- /src/library/include/geometry/algorithm/wkt.hpp: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2020-2025 Adrian Wöltche 2 | // 3 | // This program is free software: you can redistribute it and/or modify 4 | // it under the terms of the GNU Affero General Public License as 5 | // published by the Free Software Foundation, either version 3 of the 6 | // License, or (at your option) any later version. 7 | // 8 | // This program is distributed in the hope that it will be useful, 9 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 10 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 | // GNU Affero General Public License for more details. 12 | // 13 | // You should have received a copy of the GNU Affero General Public License 14 | // along with this program. If not, see https://www.gnu.org/licenses/. 15 | 16 | #ifndef MAP_MATCHING_2_GEOMETRY_ALGORITHM_WKT_HPP 17 | #define MAP_MATCHING_2_GEOMETRY_ALGORITHM_WKT_HPP 18 | 19 | #include 20 | #include 21 | 22 | #include 23 | 24 | namespace map_matching_2::geometry { 25 | 26 | template 27 | [[nodiscard]] std::string to_wkt(const Geometry &geometry, const std::int32_t precision = 12) { 28 | return boost::geometry::to_wkt(geometry, precision); 29 | } 30 | 31 | } 32 | 33 | #endif //MAP_MATCHING_2_GEOMETRY_ALGORITHM_WKT_HPP 34 | -------------------------------------------------------------------------------- /src/library/include/geometry/concepts.hpp: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2020-2025 Adrian Wöltche 2 | // 3 | // This program is free software: you can redistribute it and/or modify 4 | // it under the terms of the GNU Affero General Public License as 5 | // published by the Free Software Foundation, either version 3 of the 6 | // License, or (at your option) any later version. 7 | // 8 | // This program is distributed in the hope that it will be useful, 9 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 10 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 | // GNU Affero General Public License for more details. 12 | // 13 | // You should have received a copy of the GNU Affero General Public License 14 | // along with this program. If not, see https://www.gnu.org/licenses/. 15 | 16 | #ifndef MAP_MATCHING_2_GEOMETRY_CONCEPTS_HPP 17 | #define MAP_MATCHING_2_GEOMETRY_CONCEPTS_HPP 18 | 19 | #include 20 | 21 | #include "types.hpp" 22 | 23 | namespace map_matching_2::geometry { 24 | 25 | template 26 | concept is_segment = std::is_same_v>::segment_type>; 28 | 29 | template 30 | concept is_referring_segment = std::is_same_v>::referring_segment_type>; 32 | 33 | template 34 | concept is_pointing_segment = std::is_same_v>::pointing_segment_type>; 36 | 37 | } 38 | 39 | #endif //MAP_MATCHING_2_GEOMETRY_CONCEPTS_HPP 40 | -------------------------------------------------------------------------------- /src/library/include/geometry/network/route/concepts.hpp: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2020-2025 Adrian Wöltche 2 | // 3 | // This program is free software: you can redistribute it and/or modify 4 | // it under the terms of the GNU Affero General Public License as 5 | // published by the Free Software Foundation, either version 3 of the 6 | // License, or (at your option) any later version. 7 | // 8 | // This program is distributed in the hope that it will be useful, 9 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 10 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 | // GNU Affero General Public License for more details. 12 | // 13 | // You should have received a copy of the GNU Affero General Public License 14 | // along with this program. If not, see https://www.gnu.org/licenses/. 15 | 16 | #ifndef MAP_MATCHING_2_GEOMETRY_NETWORK_ROUTE_CONCEPTS_HPP 17 | #define MAP_MATCHING_2_GEOMETRY_NETWORK_ROUTE_CONCEPTS_HPP 18 | 19 | namespace map_matching_2::geometry::network { 20 | 21 | template 22 | concept is_route = requires { 23 | typename Route::rich_line_variant_type; 24 | typename Route::rich_line_reference_variant_type; 25 | }; 26 | 27 | } 28 | 29 | #endif //MAP_MATCHING_2_GEOMETRY_NETWORK_ROUTE_CONCEPTS_HPP 30 | -------------------------------------------------------------------------------- /src/library/include/geometry/network/route/exception.hpp: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2020-2025 Adrian Wöltche 2 | // 3 | // This program is free software: you can redistribute it and/or modify 4 | // it under the terms of the GNU Affero General Public License as 5 | // published by the Free Software Foundation, either version 3 of the 6 | // License, or (at your option) any later version. 7 | // 8 | // This program is distributed in the hope that it will be useful, 9 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 10 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 | // GNU Affero General Public License for more details. 12 | // 13 | // You should have received a copy of the GNU Affero General Public License 14 | // along with this program. If not, see https://www.gnu.org/licenses/. 15 | 16 | #ifndef MAP_MATCHING_2_GEOMETRY_NETWORK_ROUTE_EXCEPTION_HPP 17 | #define MAP_MATCHING_2_GEOMETRY_NETWORK_ROUTE_EXCEPTION_HPP 18 | 19 | #include 20 | 21 | namespace map_matching_2::geometry::network { 22 | 23 | struct route_merge_exception : std::exception {}; 24 | 25 | } 26 | 27 | #endif //MAP_MATCHING_2_GEOMETRY_NETWORK_ROUTE_EXCEPTION_HPP 28 | -------------------------------------------------------------------------------- /src/library/include/geometry/network/traits/edge.hpp: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2020-2025 Adrian Wöltche 2 | // 3 | // This program is free software: you can redistribute it and/or modify 4 | // it under the terms of the GNU Affero General Public License as 5 | // published by the Free Software Foundation, either version 3 of the 6 | // License, or (at your option) any later version. 7 | // 8 | // This program is distributed in the hope that it will be useful, 9 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 10 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 | // GNU Affero General Public License for more details. 12 | // 13 | // You should have received a copy of the GNU Affero General Public License 14 | // along with this program. If not, see https://www.gnu.org/licenses/. 15 | 16 | #ifndef MAP_MATCHING_2_TRAITS_EDGE_HPP 17 | #define MAP_MATCHING_2_TRAITS_EDGE_HPP 18 | 19 | #include 20 | #include 21 | 22 | namespace map_matching_2::geometry::network { 23 | 24 | template 25 | concept is_edge = requires(Edge edge) { 26 | requires std::same_as; 27 | requires std::same_as; 28 | }; 29 | 30 | template 31 | struct edge_traits { 32 | using edge_type = Edge; 33 | using rich_line_type = typename edge_type::rich_line_type; 34 | }; 35 | 36 | } 37 | 38 | #endif //MAP_MATCHING_2_TRAITS_EDGE_HPP 39 | -------------------------------------------------------------------------------- /src/library/include/geometry/network/traits/node.hpp: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2020-2025 Adrian Wöltche 2 | // 3 | // This program is free software: you can redistribute it and/or modify 4 | // it under the terms of the GNU Affero General Public License as 5 | // published by the Free Software Foundation, either version 3 of the 6 | // License, or (at your option) any later version. 7 | // 8 | // This program is distributed in the hope that it will be useful, 9 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 10 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 | // GNU Affero General Public License for more details. 12 | // 13 | // You should have received a copy of the GNU Affero General Public License 14 | // along with this program. If not, see https://www.gnu.org/licenses/. 15 | 16 | #ifndef MAP_MATCHING_2_TRAITS_NODE_HPP 17 | #define MAP_MATCHING_2_TRAITS_NODE_HPP 18 | 19 | #include 20 | #include 21 | 22 | namespace map_matching_2::geometry::network { 23 | 24 | template 25 | concept is_node = requires(Node node) { 26 | requires std::same_as; 27 | requires std::same_as; 28 | }; 29 | 30 | template 31 | struct node_traits { 32 | using node_type = Node; 33 | using point_type = typename node_type::point_type; 34 | }; 35 | 36 | } 37 | 38 | #endif //MAP_MATCHING_2_TRAITS_NODE_HPP 39 | -------------------------------------------------------------------------------- /src/library/include/geometry/rich_type/common.hpp: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2024-2025 Adrian Wöltche 2 | // 3 | // This program is free software: you can redistribute it and/or modify 4 | // it under the terms of the GNU Affero General Public License as 5 | // published by the Free Software Foundation, either version 3 of the 6 | // License, or (at your option) any later version. 7 | // 8 | // This program is distributed in the hope that it will be useful, 9 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 10 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 | // GNU Affero General Public License for more details. 12 | // 13 | // You should have received a copy of the GNU Affero General Public License 14 | // along with this program. If not, see https://www.gnu.org/licenses/. 15 | 16 | #ifndef MAP_MATCHING_2_RICH_TYPE_COMMON_HPP 17 | #define MAP_MATCHING_2_RICH_TYPE_COMMON_HPP 18 | 19 | #include 20 | #include 21 | 22 | namespace map_matching_2::geometry { 23 | 24 | template requires std::numeric_limits::has_signaling_NaN 25 | static constexpr Float not_initialized = std::numeric_limits::signaling_NaN(); 26 | 27 | template requires std::numeric_limits::has_infinity 28 | static constexpr Float not_valid = std::numeric_limits::infinity(); 29 | 30 | template 31 | [[nodiscard]] constexpr bool initialized(Float data) { 32 | return not std::isnan(data); 33 | } 34 | 35 | template 36 | [[nodiscard]] constexpr bool valid(Float data) { 37 | return initialized(data) and not std::isinf(data); 38 | } 39 | 40 | } 41 | 42 | #endif //MAP_MATCHING_2_RICH_TYPE_COMMON_HPP 43 | -------------------------------------------------------------------------------- /src/library/include/geometry/rich_type/traits/rich_segment.hpp: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2024-2025 Adrian Wöltche 2 | // 3 | // This program is free software: you can redistribute it and/or modify 4 | // it under the terms of the GNU Affero General Public License as 5 | // published by the Free Software Foundation, either version 3 of the 6 | // License, or (at your option) any later version. 7 | // 8 | // This program is distributed in the hope that it will be useful, 9 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 10 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 | // GNU Affero General Public License for more details. 12 | // 13 | // You should have received a copy of the GNU Affero General Public License 14 | // along with this program. If not, see https://www.gnu.org/licenses/. 15 | 16 | #ifndef MAP_MATCHING_2_TRAITS_RICH_SEGMENT_HPP 17 | #define MAP_MATCHING_2_TRAITS_RICH_SEGMENT_HPP 18 | 19 | #include "geometry/point.hpp" 20 | 21 | #include "../concepts.hpp" 22 | 23 | namespace map_matching_2::geometry { 24 | 25 | template 26 | struct rich_segment_traits { 27 | using rich_segment_type = RichSegment; 28 | using segment_type = typename rich_segment_type::segment_type; 29 | using point_type = point_type_t; 30 | using coordinate_system_type = typename data::coordinate_system_type; 31 | using coordinate_type = typename data::coordinate_type; 32 | using distance_type = typename data::distance_type; 33 | using length_type = typename data::length_type; 34 | using angle_type = typename data::angle_type; 35 | }; 36 | 37 | } 38 | 39 | #endif //MAP_MATCHING_2_TRAITS_RICH_SEGMENT_HPP 40 | -------------------------------------------------------------------------------- /src/library/include/graph/algorithm/priority_type_comparator.hpp: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2024-2025 Adrian Wöltche 2 | // 3 | // This program is free software: you can redistribute it and/or modify 4 | // it under the terms of the GNU Affero General Public License as 5 | // published by the Free Software Foundation, either version 3 of the 6 | // License, or (at your option) any later version. 7 | // 8 | // This program is distributed in the hope that it will be useful, 9 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 10 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 | // GNU Affero General Public License for more details. 12 | // 13 | // You should have received a copy of the GNU Affero General Public License 14 | // along with this program. If not, see https://www.gnu.org/licenses/. 15 | 16 | #ifndef MAP_MATCHING_2_GRAPH_ALGORITHM_PRIORITY_TYPE_COMPARATOR_HPP 17 | #define MAP_MATCHING_2_GRAPH_ALGORITHM_PRIORITY_TYPE_COMPARATOR_HPP 18 | 19 | namespace map_matching_2::graph { 20 | 21 | template 22 | struct priority_type_comparator { 23 | constexpr bool operator()(const Priority &left, const Priority &right) const { 24 | return left.first > right.first; 25 | } 26 | }; 27 | 28 | } 29 | 30 | #endif //MAP_MATCHING_2_GRAPH_ALGORITHM_PRIORITY_TYPE_COMPARATOR_HPP 31 | -------------------------------------------------------------------------------- /src/library/include/graph/common.hpp: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2023-2025 Adrian Wöltche 2 | // 3 | // This program is free software: you can redistribute it and/or modify 4 | // it under the terms of the GNU Affero General Public License as 5 | // published by the Free Software Foundation, either version 3 of the 6 | // License, or (at your option) any later version. 7 | // 8 | // This program is distributed in the hope that it will be useful, 9 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 10 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 | // GNU Affero General Public License for more details. 12 | // 13 | // You should have received a copy of the GNU Affero General Public License 14 | // along with this program. If not, see https://www.gnu.org/licenses/. 15 | 16 | #ifndef MAP_MATCHING_2_GRAPH_COMMON_HPP 17 | #define MAP_MATCHING_2_GRAPH_COMMON_HPP 18 | 19 | namespace map_matching_2::graph { 20 | 21 | struct undirected {}; 22 | 23 | struct directional {}; 24 | 25 | struct bidirectional : directional {}; 26 | 27 | enum color { 28 | WHITE, GRAY, BLACK 29 | }; 30 | 31 | } 32 | 33 | #endif //MAP_MATCHING_2_GRAPH_COMMON_HPP 34 | -------------------------------------------------------------------------------- /src/library/include/graph/concepts.hpp: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2024-2025 Adrian Wöltche 2 | // 3 | // This program is free software: you can redistribute it and/or modify 4 | // it under the terms of the GNU Affero General Public License as 5 | // published by the Free Software Foundation, either version 3 of the 6 | // License, or (at your option) any later version. 7 | // 8 | // This program is distributed in the hope that it will be useful, 9 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 10 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 | // GNU Affero General Public License for more details. 12 | // 13 | // You should have received a copy of the GNU Affero General Public License 14 | // along with this program. If not, see https://www.gnu.org/licenses/. 15 | 16 | #ifndef MAP_MATCHING_2_GRAPH_CONCEPTS_HPP 17 | #define MAP_MATCHING_2_GRAPH_CONCEPTS_HPP 18 | 19 | namespace map_matching_2::graph { 20 | 21 | template 22 | concept is_adjacency_list = requires(Graph &graph) { 23 | typename Graph::vertex_container; 24 | typename Graph::edge_container; 25 | typename Graph::out_edge_container; 26 | }; 27 | 28 | template 29 | concept is_compressed_sparse_row = not is_adjacency_list and requires(Graph &graph) { 30 | typename Graph::vertex_container; 31 | typename Graph::edge_container; 32 | }; 33 | 34 | } 35 | 36 | #endif //MAP_MATCHING_2_GRAPH_CONCEPTS_HPP 37 | -------------------------------------------------------------------------------- /src/library/include/io/csv_exporter.hpp: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2020-2025 Adrian Wöltche 2 | // 3 | // This program is free software: you can redistribute it and/or modify 4 | // it under the terms of the GNU Affero General Public License as 5 | // published by the Free Software Foundation, either version 3 of the 6 | // License, or (at your option) any later version. 7 | // 8 | // This program is distributed in the hope that it will be useful, 9 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 10 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 | // GNU Affero General Public License for more details. 12 | // 13 | // You should have received a copy of the GNU Affero General Public License 14 | // along with this program. If not, see https://www.gnu.org/licenses/. 15 | 16 | #ifndef MAP_MATCHING_2_IO_CSV_EXPORTER_HPP 17 | #define MAP_MATCHING_2_IO_CSV_EXPORTER_HPP 18 | 19 | #include 20 | 21 | #include "file_exporter.hpp" 22 | 23 | namespace map_matching_2::io { 24 | 25 | template 26 | class csv_exporter : public file_exporter, public csv::DelimWriter { 27 | 28 | public: 29 | explicit csv_exporter(std::string filename) 30 | : file_exporter{std::move(filename)}, csv::DelimWriter{out()} {} 31 | 32 | ~csv_exporter() override = default; 33 | 34 | }; 35 | 36 | } 37 | 38 | #endif //MAP_MATCHING_2_IO_CSV_EXPORTER_HPP 39 | -------------------------------------------------------------------------------- /src/library/include/io/csv_settings.hpp: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2024-2025 Adrian Wöltche 2 | // 3 | // This program is free software: you can redistribute it and/or modify 4 | // it under the terms of the GNU Affero General Public License as 5 | // published by the Free Software Foundation, either version 3 of the 6 | // License, or (at your option) any later version. 7 | // 8 | // This program is distributed in the hope that it will be useful, 9 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 10 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 | // GNU Affero General Public License for more details. 12 | // 13 | // You should have received a copy of the GNU Affero General Public License 14 | // along with this program. If not, see https://www.gnu.org/licenses/. 15 | 16 | #ifndef MAP_MATCHING_2_IO_CSV_SETTINGS_HPP 17 | #define MAP_MATCHING_2_IO_CSV_SETTINGS_HPP 18 | 19 | #include 20 | #include 21 | #include 22 | 23 | namespace map_matching_2::io { 24 | 25 | struct csv_settings { 26 | 27 | bool grouped{true}, no_header{false}, no_id{false}, no_id_whole_file{false}, wkt{false}, no_parse_time{false}; 28 | 29 | std::size_t skip_lines{0}; 30 | 31 | std::string delimiter{","}, id_aggregator{"_"}, field_x{"x"}, field_y{"y"}, field_geometry{"geometry"}, 32 | time_aggregator{"_"}, time_format{"%FT%T%Oz"}; 33 | 34 | std::vector field_id{"id"}, field_time{"time"}, selectors{}; 35 | 36 | }; 37 | 38 | } 39 | 40 | #endif //MAP_MATCHING_2_IO_CSV_SETTINGS_HPP 41 | -------------------------------------------------------------------------------- /src/library/include/io/exporter.hpp: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2020-2025 Adrian Wöltche 2 | // 3 | // This program is free software: you can redistribute it and/or modify 4 | // it under the terms of the GNU Affero General Public License as 5 | // published by the Free Software Foundation, either version 3 of the 6 | // License, or (at your option) any later version. 7 | // 8 | // This program is distributed in the hope that it will be useful, 9 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 10 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 | // GNU Affero General Public License for more details. 12 | // 13 | // You should have received a copy of the GNU Affero General Public License 14 | // along with this program. If not, see https://www.gnu.org/licenses/. 15 | 16 | #ifndef MAP_MATCHING_2_IO_EXPORTER_HPP 17 | #define MAP_MATCHING_2_IO_EXPORTER_HPP 18 | 19 | #include 20 | 21 | namespace map_matching_2::io { 22 | 23 | class exporter { 24 | 25 | public: 26 | explicit constexpr exporter(std::string filename) 27 | : _filename{std::move(filename)} {} 28 | 29 | [[nodiscard]] constexpr const std::string &filename() const { 30 | return _filename; 31 | } 32 | 33 | virtual constexpr ~exporter() = default; 34 | 35 | private: 36 | std::string _filename; 37 | 38 | }; 39 | 40 | } 41 | 42 | #endif //MAP_MATCHING_2_IO_EXPORTER_HPP 43 | -------------------------------------------------------------------------------- /src/library/include/io/helper/concepts.hpp: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2023-2025 Adrian Wöltche 2 | // 3 | // This program is free software: you can redistribute it and/or modify 4 | // it under the terms of the GNU Affero General Public License as 5 | // published by the Free Software Foundation, either version 3 of the 6 | // License, or (at your option) any later version. 7 | // 8 | // This program is distributed in the hope that it will be useful, 9 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 10 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 | // GNU Affero General Public License for more details. 12 | // 13 | // You should have received a copy of the GNU Affero General Public License 14 | // along with this program. If not, see https://www.gnu.org/licenses/. 15 | 16 | #ifndef MAP_MATCHING_2_IO_HELPER_CONCEPTS_HPP 17 | #define MAP_MATCHING_2_IO_HELPER_CONCEPTS_HPP 18 | 19 | #include "io/memory_mapped/concepts.hpp" 20 | 21 | namespace map_matching_2::io::helper { 22 | 23 | template 24 | concept has_mmap_types = requires { 25 | typename Types::mmap_types; 26 | }; 27 | 28 | template 29 | concept has_memory_types = requires { 30 | typename Types::memory_types; 31 | }; 32 | 33 | template 34 | concept is_memory_types = has_memory_types and 35 | io::memory_mapped::is_memory_types; 36 | 37 | template 38 | concept is_mmap_types = has_mmap_types and 39 | io::memory_mapped::is_mmap_types; 40 | 41 | } 42 | 43 | #endif //MAP_MATCHING_2_IO_HELPER_CONCEPTS_HPP 44 | -------------------------------------------------------------------------------- /src/library/include/io/network/osm_pattern.hpp: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2020-2025 Adrian Wöltche 2 | // 3 | // This program is free software: you can redistribute it and/or modify 4 | // it under the terms of the GNU Affero General Public License as 5 | // published by the Free Software Foundation, either version 3 of the 6 | // License, or (at your option) any later version. 7 | // 8 | // This program is distributed in the hope that it will be useful, 9 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 10 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 | // GNU Affero General Public License for more details. 12 | // 13 | // You should have received a copy of the GNU Affero General Public License 14 | // along with this program. If not, see https://www.gnu.org/licenses/. 15 | 16 | #ifndef MAP_MATCHING_2_IO_NETWORK_OSM_PATTERN_HPP 17 | #define MAP_MATCHING_2_IO_NETWORK_OSM_PATTERN_HPP 18 | 19 | #include 20 | 21 | namespace map_matching_2::io::network { 22 | 23 | const std::regex OSM_TAGS_FILTER_PATTERN{"^(true|false)(\\|(true|false),[^,=]+(=[^,|]+)?)*$"}; 24 | 25 | } 26 | 27 | #endif //MAP_MATCHING_2_IO_NETWORK_OSM_PATTERN_HPP 28 | -------------------------------------------------------------------------------- /src/library/include/io/track/importer_settings.hpp: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2025 Adrian Wöltche 2 | // 3 | // This program is free software: you can redistribute it and/or modify 4 | // it under the terms of the GNU Affero General Public License as 5 | // published by the Free Software Foundation, either version 3 of the 6 | // License, or (at your option) any later version. 7 | // 8 | // This program is distributed in the hope that it will be useful, 9 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 10 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 | // GNU Affero General Public License for more details. 12 | // 13 | // You should have received a copy of the GNU Affero General Public License 14 | // along with this program. If not, see https://www.gnu.org/licenses/. 15 | 16 | #ifndef MAP_MATCHING_2_IO_TRACK_IMPORTER_SETTINGS_HPP 17 | #define MAP_MATCHING_2_IO_TRACK_IMPORTER_SETTINGS_HPP 18 | 19 | #include 20 | 21 | #include "io/csv_settings.hpp" 22 | 23 | namespace map_matching_2::io::track { 24 | 25 | struct importer_settings { 26 | 27 | enum FILE_TYPE { 28 | UNKNOWN, 29 | CSV, 30 | GPX 31 | }; 32 | 33 | bool quiet{false}, verbose{false}; 34 | 35 | geometry::srs_transform tracks_srs_transform{}; 36 | 37 | FILE_TYPE file_extension{UNKNOWN}; 38 | std::vector files; 39 | 40 | io::csv_settings csv_settings{}; 41 | 42 | }; 43 | 44 | } 45 | 46 | #endif //MAP_MATCHING_2_IO_TRACK_IMPORTER_SETTINGS_HPP 47 | -------------------------------------------------------------------------------- /src/library/include/io/track/track_exporter.hpp: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2024-2025 Adrian Wöltche 2 | // 3 | // This program is free software: you can redistribute it and/or modify 4 | // it under the terms of the GNU Affero General Public License as 5 | // published by the Free Software Foundation, either version 3 of the 6 | // License, or (at your option) any later version. 7 | // 8 | // This program is distributed in the hope that it will be useful, 9 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 10 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 | // GNU Affero General Public License for more details. 12 | // 13 | // You should have received a copy of the GNU Affero General Public License 14 | // along with this program. If not, see https://www.gnu.org/licenses/. 15 | 16 | #ifndef MAP_MATCHING_2_IO_TRACK_TRACK_EXPORTER_HPP 17 | #define MAP_MATCHING_2_IO_TRACK_TRACK_EXPORTER_HPP 18 | 19 | #include 20 | 21 | #include "types/geometry/track/multi_track.hpp" 22 | 23 | #include "io/results/track/csv_track_exporter.hpp" 24 | #include "io/results/track/track_output_printer.hpp" 25 | 26 | namespace map_matching_2::io::track { 27 | 28 | class track_exporter { 29 | 30 | public: 31 | using import_multi_track_variant_type = geometry::track::import_multi_track_variant_type; 32 | 33 | track_exporter(std::string filename, bool console, bool verbose); 34 | 35 | ~track_exporter(); 36 | 37 | void pass(const import_multi_track_variant_type &multi_track); 38 | 39 | private: 40 | io::results::csv_track_exporter<> _exporter; 41 | io::results::track_output_printer _output_printer; 42 | 43 | }; 44 | 45 | } 46 | 47 | #endif //MAP_MATCHING_2_IO_TRACK_TRACK_EXPORTER_HPP 48 | -------------------------------------------------------------------------------- /src/library/include/matching/defect.hpp: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2021-2025 Adrian Wöltche 2 | // 3 | // This program is free software: you can redistribute it and/or modify 4 | // it under the terms of the GNU Affero General Public License as 5 | // published by the Free Software Foundation, either version 3 of the 6 | // License, or (at your option) any later version. 7 | // 8 | // This program is distributed in the hope that it will be useful, 9 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 10 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 | // GNU Affero General Public License for more details. 12 | // 13 | // You should have received a copy of the GNU Affero General Public License 14 | // along with this program. If not, see https://www.gnu.org/licenses/. 15 | 16 | #ifndef MAP_MATCHING_2_MATCHING_DEFECT_HPP 17 | #define MAP_MATCHING_2_MATCHING_DEFECT_HPP 18 | 19 | #include 20 | 21 | namespace map_matching_2::matching { 22 | 23 | enum defect { 24 | none, 25 | equal, 26 | forward_backward 27 | }; 28 | 29 | std::ostream &operator<<(std::ostream &out, const boost::unordered_flat_set &defect_set); 30 | 31 | } 32 | 33 | #endif //MAP_MATCHING_2_MATCHING_DEFECT_HPP 34 | -------------------------------------------------------------------------------- /src/library/include/matching/matcher/match_task.hpp: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2024-2025 Adrian Wöltche 2 | // 3 | // This program is free software: you can redistribute it and/or modify 4 | // it under the terms of the GNU Affero General Public License as 5 | // published by the Free Software Foundation, either version 3 of the 6 | // License, or (at your option) any later version. 7 | // 8 | // This program is distributed in the hope that it will be useful, 9 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 10 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 | // GNU Affero General Public License for more details. 12 | // 13 | // You should have received a copy of the GNU Affero General Public License 14 | // along with this program. If not, see https://www.gnu.org/licenses/. 15 | 16 | #ifndef MAP_MATCHING_2_MATCHING_MATCHER_MATCH_TASK_HPP 17 | #define MAP_MATCHING_2_MATCHING_MATCHER_MATCH_TASK_HPP 18 | 19 | #include "types/geometry/track/multi_track.hpp" 20 | 21 | #include "../settings.hpp" 22 | 23 | namespace map_matching_2::matching { 24 | 25 | struct match_task { 26 | using import_multi_track_variant_type = geometry::track::import_multi_track_variant_type; 27 | 28 | import_multi_track_variant_type multi_track{}; 29 | matching::settings match_settings{}; 30 | 31 | constexpr match_task() = default; 32 | 33 | explicit match_task(import_multi_track_variant_type multi_track, matching::settings match_settings = {}); 34 | 35 | }; 36 | 37 | } 38 | 39 | #endif //MAP_MATCHING_2_MATCHING_MATCHER_MATCH_TASK_HPP 40 | -------------------------------------------------------------------------------- /src/library/include/matching/matcher/matcher_forwarder.hpp: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2024-2025 Adrian Wöltche 2 | // 3 | // This program is free software: you can redistribute it and/or modify 4 | // it under the terms of the GNU Affero General Public License as 5 | // published by the Free Software Foundation, either version 3 of the 6 | // License, or (at your option) any later version. 7 | // 8 | // This program is distributed in the hope that it will be useful, 9 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 10 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 | // GNU Affero General Public License for more details. 12 | // 13 | // You should have received a copy of the GNU Affero General Public License 14 | // along with this program. If not, see https://www.gnu.org/licenses/. 15 | 16 | #ifndef MAP_MATCHING_2_MATCHING_MATCHER_MATCHER_FORWARDER_HPP 17 | #define MAP_MATCHING_2_MATCHING_MATCHER_MATCHER_FORWARDER_HPP 18 | 19 | #include "../settings.hpp" 20 | 21 | namespace map_matching_2::matching { 22 | 23 | template 24 | class matcher_forwarder { 25 | 26 | public: 27 | using matcher_type = Matcher; 28 | using import_multi_track_variant_type = typename matcher_type::import_multi_track_variant_type; 29 | 30 | matcher_forwarder(matcher_type &matcher, matching::settings settings) 31 | : _matcher{matcher}, _settings{std::move(settings)} {} 32 | 33 | void pass(import_multi_track_variant_type multi_track) { 34 | _matcher.match(std::move(multi_track), _settings); 35 | } 36 | 37 | private: 38 | matcher_type &_matcher; 39 | const matching::settings _settings; 40 | 41 | }; 42 | 43 | } 44 | 45 | #endif //MAP_MATCHING_2_MATCHING_MATCHER_MATCHER_FORWARDER_HPP 46 | -------------------------------------------------------------------------------- /src/library/include/types/extern_define.hpp: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2024-2025 Adrian Wöltche 2 | // 3 | // This program is free software: you can redistribute it and/or modify 4 | // it under the terms of the GNU Affero General Public License as 5 | // published by the Free Software Foundation, either version 3 of the 6 | // License, or (at your option) any later version. 7 | // 8 | // This program is distributed in the hope that it will be useful, 9 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 10 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 | // GNU Affero General Public License for more details. 12 | // 13 | // You should have received a copy of the GNU Affero General Public License 14 | // along with this program. If not, see https://www.gnu.org/licenses/. 15 | 16 | #ifndef MAP_MATCHING_2_TYPES_EXTERN_DEFINE_HPP 17 | #define MAP_MATCHING_2_TYPES_EXTERN_DEFINE_HPP 18 | 19 | #ifdef MM2_EXTERN 20 | #undef MM2_EXTERN 21 | #endif 22 | 23 | #define MM2_EXTERN extern 24 | 25 | #endif //MAP_MATCHING_2_TYPES_EXTERN_DEFINE_HPP 26 | -------------------------------------------------------------------------------- /src/library/include/types/extern_undefine.hpp: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2024-2025 Adrian Wöltche 2 | // 3 | // This program is free software: you can redistribute it and/or modify 4 | // it under the terms of the GNU Affero General Public License as 5 | // published by the Free Software Foundation, either version 3 of the 6 | // License, or (at your option) any later version. 7 | // 8 | // This program is distributed in the hope that it will be useful, 9 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 10 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 | // GNU Affero General Public License for more details. 12 | // 13 | // You should have received a copy of the GNU Affero General Public License 14 | // along with this program. If not, see https://www.gnu.org/licenses/. 15 | 16 | #ifndef MAP_MATCHING_2_TYPES_EXTERN_UNDEFINE_HPP 17 | #define MAP_MATCHING_2_TYPES_EXTERN_UNDEFINE_HPP 18 | 19 | #ifdef MM2_EXTERN 20 | #undef MM2_EXTERN 21 | #endif 22 | 23 | #define MM2_EXTERN 24 | 25 | #endif //MAP_MATCHING_2_TYPES_EXTERN_UNDEFINE_HPP 26 | -------------------------------------------------------------------------------- /src/library/include/types/geometry/network/node.hpp: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2020-2025 Adrian Wöltche 2 | // 3 | // This program is free software: you can redistribute it and/or modify 4 | // it under the terms of the GNU Affero General Public License as 5 | // published by the Free Software Foundation, either version 3 of the 6 | // License, or (at your option) any later version. 7 | // 8 | // This program is distributed in the hope that it will be useful, 9 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 10 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 | // GNU Affero General Public License for more details. 12 | // 13 | // You should have received a copy of the GNU Affero General Public License 14 | // along with this program. If not, see https://www.gnu.org/licenses/. 15 | 16 | #ifndef MAP_MATCHING_2_TYPES_GEOMETRY_NETWORK_NODE_HPP 17 | #define MAP_MATCHING_2_TYPES_GEOMETRY_NETWORK_NODE_HPP 18 | 19 | #include "types/extern_define.hpp" 20 | 21 | #include "types/io/memory_mapped/types.hpp" 22 | 23 | #include "geometry/network/node.hpp" 24 | 25 | #define MM2_NODE(CS) map_matching_2::geometry::network::node 26 | 27 | #ifdef EXPLICIT_TEMPLATES 28 | 29 | #define MM2_NODE_TEMPLATE_CS(CS) \ 30 | MM2_EXTERN template class MM2_NODE(CS); 31 | 32 | MM2_NODE_TEMPLATE_CS(MM2_GEOGRAPHIC) 33 | MM2_NODE_TEMPLATE_CS(MM2_SPHERICAL_EQUATORIAL) 34 | MM2_NODE_TEMPLATE_CS(MM2_CARTESIAN) 35 | 36 | #endif 37 | 38 | namespace map_matching_2::geometry::network { 39 | 40 | template 41 | using node_type = node; 42 | 43 | } 44 | 45 | #endif //MAP_MATCHING_2_TYPES_GEOMETRY_NETWORK_NODE_HPP 46 | -------------------------------------------------------------------------------- /src/library/include/types/geometry/network/route/route.hpp: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2020-2025 Adrian Wöltche 2 | // 3 | // This program is free software: you can redistribute it and/or modify 4 | // it under the terms of the GNU Affero General Public License as 5 | // published by the Free Software Foundation, either version 3 of the 6 | // License, or (at your option) any later version. 7 | // 8 | // This program is distributed in the hope that it will be useful, 9 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 10 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 | // GNU Affero General Public License for more details. 12 | // 13 | // You should have received a copy of the GNU Affero General Public License 14 | // along with this program. If not, see https://www.gnu.org/licenses/. 15 | 16 | #ifndef MAP_MATCHING_2_TYPES_GEOMETRY_NETWORK_ROUTE_ROUTE_HPP 17 | #define MAP_MATCHING_2_TYPES_GEOMETRY_NETWORK_ROUTE_ROUTE_HPP 18 | 19 | #include "types/extern_define.hpp" 20 | 21 | #include "types/geometry/rich_type/rich_line_variant.hpp" 22 | 23 | #include "route_data.hpp" 24 | 25 | #include "geometry/network/route/route.hpp" 26 | 27 | #define MM2_ROUTE(CS) map_matching_2::geometry::network::route 28 | 29 | #ifdef EXPLICIT_TEMPLATES 30 | 31 | #define MM2_ROUTE_TEMPLATE(CS) \ 32 | MM2_EXTERN template class MM2_ROUTE(CS); 33 | 34 | MM2_ROUTE_TEMPLATE(MM2_GEOGRAPHIC) 35 | MM2_ROUTE_TEMPLATE(MM2_SPHERICAL_EQUATORIAL) 36 | MM2_ROUTE_TEMPLATE(MM2_CARTESIAN) 37 | 38 | #endif 39 | 40 | namespace map_matching_2::geometry::network { 41 | 42 | template 43 | using route_type = route>; 44 | 45 | } 46 | 47 | #endif //MAP_MATCHING_2_TYPES_GEOMETRY_NETWORK_ROUTE_ROUTE_HPP 48 | -------------------------------------------------------------------------------- /src/library/include/types/geometry/network/route/route_data.hpp: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2020-2025 Adrian Wöltche 2 | // 3 | // This program is free software: you can redistribute it and/or modify 4 | // it under the terms of the GNU Affero General Public License as 5 | // published by the Free Software Foundation, either version 3 of the 6 | // License, or (at your option) any later version. 7 | // 8 | // This program is distributed in the hope that it will be useful, 9 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 10 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 | // GNU Affero General Public License for more details. 12 | // 13 | // You should have received a copy of the GNU Affero General Public License 14 | // along with this program. If not, see https://www.gnu.org/licenses/. 15 | 16 | #ifndef MAP_MATCHING_2_TYPES_GEOMETRY_NETWORK_ROUTE_ROUTE_DATA_HPP 17 | #define MAP_MATCHING_2_TYPES_GEOMETRY_NETWORK_ROUTE_ROUTE_DATA_HPP 18 | 19 | #include "types/extern_define.hpp" 20 | 21 | #include "geometry/network/route/route_data.hpp" 22 | 23 | #define MM2_ROUTE_DATA(LENGTH, ANGLE) map_matching_2::geometry::network::route_data 24 | 25 | #ifdef EXPLICIT_TEMPLATES 26 | 27 | #define MM2_ROUTE_DATA_TEMPLATE(LENGTH, ANGLE) \ 28 | MM2_EXTERN template class MM2_ROUTE_DATA(LENGTH, ANGLE); 29 | 30 | #define MM2_ROUTE_DATA_TEMPLATE_LENGTH(LENGTH) \ 31 | MM2_ROUTE_DATA_TEMPLATE(LENGTH, float) \ 32 | MM2_ROUTE_DATA_TEMPLATE(LENGTH, double) \ 33 | MM2_ROUTE_DATA_TEMPLATE(LENGTH, long double) 34 | 35 | MM2_ROUTE_DATA_TEMPLATE_LENGTH(float) 36 | MM2_ROUTE_DATA_TEMPLATE_LENGTH(double) 37 | MM2_ROUTE_DATA_TEMPLATE_LENGTH(long double) 38 | 39 | #endif 40 | 41 | #endif //MAP_MATCHING_2_TYPES_GEOMETRY_NETWORK_ROUTE_ROUTE_DATA_HPP 42 | -------------------------------------------------------------------------------- /src/library/include/util/benchmark.hpp: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2020-2025 Adrian Wöltche 2 | // 3 | // This program is free software: you can redistribute it and/or modify 4 | // it under the terms of the GNU Affero General Public License as 5 | // published by the Free Software Foundation, either version 3 of the 6 | // License, or (at your option) any later version. 7 | // 8 | // This program is distributed in the hope that it will be useful, 9 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 10 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 | // GNU Affero General Public License for more details. 12 | // 13 | // You should have received a copy of the GNU Affero General Public License 14 | // along with this program. If not, see https://www.gnu.org/licenses/. 15 | 16 | #ifndef MAP_MATCHING_2_UTIL_BENCHMARK_HPP 17 | #define MAP_MATCHING_2_UTIL_BENCHMARK_HPP 18 | 19 | #include 20 | 21 | namespace map_matching_2::util { 22 | 23 | template 24 | [[nodiscard]] double benchmark(const Function &function) { 25 | using clock_type = std::chrono::steady_clock; 26 | 27 | const auto start = clock_type::now(); 28 | function(); 29 | const auto end = clock_type::now(); 30 | 31 | const std::chrono::duration duration = end - start; 32 | return duration.count(); 33 | } 34 | 35 | } 36 | 37 | #endif //MAP_MATCHING_2_UTIL_BENCHMARK_HPP 38 | -------------------------------------------------------------------------------- /src/library/include/util/checks.hpp: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2025 Adrian Wöltche 2 | // 3 | // This program is free software: you can redistribute it and/or modify 4 | // it under the terms of the GNU Affero General Public License as 5 | // published by the Free Software Foundation, either version 3 of the 6 | // License, or (at your option) any later version. 7 | // 8 | // This program is distributed in the hope that it will be useful, 9 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 10 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 | // GNU Affero General Public License for more details. 12 | // 13 | // You should have received a copy of the GNU Affero General Public License 14 | // along with this program. If not, see https://www.gnu.org/licenses/. 15 | 16 | #ifndef MAP_MATCHING_2_UTIL_CHECKS_HPP 17 | #define MAP_MATCHING_2_UTIL_CHECKS_HPP 18 | 19 | #include 20 | 21 | namespace map_matching_2::util { 22 | 23 | [[nodiscard]] bool is_number(const std::string &str); 24 | 25 | } 26 | 27 | #endif //MAP_MATCHING_2_UTIL_CHECKS_HPP 28 | -------------------------------------------------------------------------------- /src/library/include/util/chrono.hpp: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2025 Adrian Wöltche 2 | // 3 | // This program is free software: you can redistribute it and/or modify 4 | // it under the terms of the GNU Affero General Public License as 5 | // published by the Free Software Foundation, either version 3 of the 6 | // License, or (at your option) any later version. 7 | // 8 | // This program is distributed in the hope that it will be useful, 9 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 10 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 | // GNU Affero General Public License for more details. 12 | // 13 | // You should have received a copy of the GNU Affero General Public License 14 | // along with this program. If not, see https://www.gnu.org/licenses/. 15 | 16 | #ifndef MAP_MATCHING_2_UTIL_CHRONO_HPP 17 | #define MAP_MATCHING_2_UTIL_CHRONO_HPP 18 | 19 | #include 20 | #include 21 | 22 | namespace map_matching_2::util { 23 | 24 | [[nodiscard]] std::uint64_t parse_time(const std::string &time_str, const std::string &format); 25 | 26 | [[nodiscard]] std::string format_time(std::uint64_t time, const std::string &locale); 27 | 28 | [[nodiscard]] std::string current_time_zone(); 29 | 30 | } 31 | 32 | #endif //MAP_MATCHING_2_UTIL_CHRONO_HPP 33 | -------------------------------------------------------------------------------- /src/library/include/util/compiler.hpp: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2024-2025 Adrian Wöltche 2 | // 3 | // This program is free software: you can redistribute it and/or modify 4 | // it under the terms of the GNU Affero General Public License as 5 | // published by the Free Software Foundation, either version 3 of the 6 | // License, or (at your option) any later version. 7 | // 8 | // This program is distributed in the hope that it will be useful, 9 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 10 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 | // GNU Affero General Public License for more details. 12 | // 13 | // You should have received a copy of the GNU Affero General Public License 14 | // along with this program. If not, see https://www.gnu.org/licenses/. 15 | 16 | #ifndef MAP_MATCHING_2_UTIL_COMPILER_HPP 17 | #define MAP_MATCHING_2_UTIL_COMPILER_HPP 18 | 19 | #include 20 | 21 | namespace map_matching_2::util { 22 | 23 | [[nodiscard]] std::string get_compiler_info(); 24 | 25 | } 26 | 27 | #endif //MAP_MATCHING_2_UTIL_COMPILER_HPP 28 | -------------------------------------------------------------------------------- /src/library/include/util/macros.hpp: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2024-2025 Adrian Wöltche 2 | // 3 | // This program is free software: you can redistribute it and/or modify 4 | // it under the terms of the GNU Affero General Public License as 5 | // published by the Free Software Foundation, either version 3 of the 6 | // License, or (at your option) any later version. 7 | // 8 | // This program is distributed in the hope that it will be useful, 9 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 10 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 | // GNU Affero General Public License for more details. 12 | // 13 | // You should have received a copy of the GNU Affero General Public License 14 | // along with this program. If not, see https://www.gnu.org/licenses/. 15 | 16 | #ifndef MAP_MATCHING_2_UTIL_MACROS_HPP 17 | #define MAP_MATCHING_2_UTIL_MACROS_HPP 18 | 19 | #if defined(_WIN32) || defined(_WIN64) 20 | #define MM2_WINDOWS 21 | #elif defined(__linux__) 22 | #define MM2_LINUX 23 | #endif 24 | 25 | #define CONCATENATE_IMPL(x, y) x##y 26 | #define CONCATENATE(x, y) CONCATENATE_IMPL(x, y) 27 | 28 | #define UNPACK(...) __VA_ARGS__ 29 | 30 | #endif //MAP_MATCHING_2_UTIL_MACROS_HPP 31 | -------------------------------------------------------------------------------- /src/library/include/util/version.hpp: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2024-2025 Adrian Wöltche 2 | // 3 | // This program is free software: you can redistribute it and/or modify 4 | // it under the terms of the GNU Affero General Public License as 5 | // published by the Free Software Foundation, either version 3 of the 6 | // License, or (at your option) any later version. 7 | // 8 | // This program is distributed in the hope that it will be useful, 9 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 10 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 | // GNU Affero General Public License for more details. 12 | // 13 | // You should have received a copy of the GNU Affero General Public License 14 | // along with this program. If not, see https://www.gnu.org/licenses/. 15 | 16 | #ifndef MAP_MATCHING_2_UTIL_VERSION_HPP 17 | #define MAP_MATCHING_2_UTIL_VERSION_HPP 18 | 19 | #include 20 | 21 | namespace map_matching_2::util { 22 | 23 | [[nodiscard]] const std::string version(); 24 | 25 | } 26 | 27 | #endif //MAP_MATCHING_2_APP_VERSION_HPP 28 | -------------------------------------------------------------------------------- /src/library/src/compare/comparator/comparator_forwarder_compares.cpp: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2024-2025 Adrian Wöltche 2 | // 3 | // This program is free software: you can redistribute it and/or modify 4 | // it under the terms of the GNU Affero General Public License as 5 | // published by the Free Software Foundation, either version 3 of the 6 | // License, or (at your option) any later version. 7 | // 8 | // This program is distributed in the hope that it will be useful, 9 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 10 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 | // GNU Affero General Public License for more details. 12 | // 13 | // You should have received a copy of the GNU Affero General Public License 14 | // along with this program. If not, see https://www.gnu.org/licenses/. 15 | 16 | #include "compare/comparator/comparator_forwarder_compares.hpp" 17 | 18 | namespace map_matching_2::compare { 19 | 20 | void comparator_forwarder_compares::pass(import_multi_track_variant_type multi_track) const { 21 | const std::string id = comparator_forwarder_data::id(multi_track); 22 | auto it = _data.matches.find(id); 23 | if (it != _data.matches.end()) { 24 | _data.comparator_ref.compare(it->second, std::move(multi_track), _data.settings); 25 | _data.matches.erase(it); 26 | } else { 27 | _data.compares.emplace(id, std::move(multi_track)); 28 | } 29 | } 30 | 31 | } 32 | -------------------------------------------------------------------------------- /src/library/src/compare/comparator/comparator_forwarder_matches.cpp: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2024-2025 Adrian Wöltche 2 | // 3 | // This program is free software: you can redistribute it and/or modify 4 | // it under the terms of the GNU Affero General Public License as 5 | // published by the Free Software Foundation, either version 3 of the 6 | // License, or (at your option) any later version. 7 | // 8 | // This program is distributed in the hope that it will be useful, 9 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 10 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 | // GNU Affero General Public License for more details. 12 | // 13 | // You should have received a copy of the GNU Affero General Public License 14 | // along with this program. If not, see https://www.gnu.org/licenses/. 15 | 16 | #include "compare/comparator/comparator_forwarder_matches.hpp" 17 | 18 | namespace map_matching_2::compare { 19 | 20 | void comparator_forwarder_matches::pass(import_multi_track_variant_type multi_track) const { 21 | const std::string id = comparator_forwarder_data::id(multi_track); 22 | auto it = _data.compares.find(id); 23 | if (it != _data.compares.end()) { 24 | _data.comparator_ref.compare(std::move(multi_track), it->second, _data.settings); 25 | _data.compares.erase(it); 26 | } else { 27 | _data.matches.emplace(id, std::move(multi_track)); 28 | } 29 | } 30 | 31 | } 32 | -------------------------------------------------------------------------------- /src/library/src/compare/comparator/compare_task.cpp: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2024-2025 Adrian Wöltche 2 | // 3 | // This program is free software: you can redistribute it and/or modify 4 | // it under the terms of the GNU Affero General Public License as 5 | // published by the Free Software Foundation, either version 3 of the 6 | // License, or (at your option) any later version. 7 | // 8 | // This program is distributed in the hope that it will be useful, 9 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 10 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 | // GNU Affero General Public License for more details. 12 | // 13 | // You should have received a copy of the GNU Affero General Public License 14 | // along with this program. If not, see https://www.gnu.org/licenses/. 15 | 16 | #include "compare/comparator/compare_task.hpp" 17 | 18 | namespace map_matching_2::compare { 19 | 20 | compare_task::compare_task(import_multi_track_variant_type match, import_multi_track_variant_type ground_truth, 21 | compare::settings compare_settings) 22 | : match{std::move(match)}, ground_truth{std::move(ground_truth)}, 23 | compare_settings{std::move(compare_settings)} {} 24 | 25 | } 26 | -------------------------------------------------------------------------------- /src/library/src/geometry/algorithm/reproject.cpp: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2022-2025 Adrian Wöltche 2 | // 3 | // This program is free software: you can redistribute it and/or modify 4 | // it under the terms of the GNU Affero General Public License as 5 | // published by the Free Software Foundation, either version 3 of the 6 | // License, or (at your option) any later version. 7 | // 8 | // This program is distributed in the hope that it will be useful, 9 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 10 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 | // GNU Affero General Public License for more details. 12 | // 13 | // You should have received a copy of the GNU Affero General Public License 14 | // along with this program. If not, see https://www.gnu.org/licenses/. 15 | 16 | #include "geometry/algorithm/reproject.hpp" 17 | #include "geometry/algorithm/srs_dispatch.hpp" 18 | 19 | namespace map_matching_2::geometry { 20 | 21 | point_reprojector_variant create_point_reprojector(const srs_transform &srs_transform) { 22 | return srs_dispatch(srs_transform, [&srs_transform]() { 23 | return point_reprojector_variant{ 24 | point_reprojector_type, point_type>{srs_transform} 25 | }; 26 | }); 27 | } 28 | 29 | } 30 | -------------------------------------------------------------------------------- /src/library/src/geometry/cache.cpp: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2024-2025 Adrian Wöltche 2 | // 3 | // This program is free software: you can redistribute it and/or modify 4 | // it under the terms of the GNU Affero General Public License as 5 | // published by the Free Software Foundation, either version 3 of the 6 | // License, or (at your option) any later version. 7 | // 8 | // This program is distributed in the hope that it will be useful, 9 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 10 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 | // GNU Affero General Public License for more details. 12 | // 13 | // You should have received a copy of the GNU Affero General Public License 14 | // along with this program. If not, see https://www.gnu.org/licenses/. 15 | 16 | #include "geometry/cache.hpp" 17 | 18 | namespace map_matching_2::geometry { 19 | 20 | thread_local std::unique_ptr distance_cache{}; 21 | thread_local std::unique_ptr azimuth_cache{}; 22 | bool use_distance_cache{false}; 23 | bool use_azimuth_cache{false}; 24 | 25 | void enable_cache() { 26 | use_distance_cache = true; 27 | use_azimuth_cache = true; 28 | } 29 | 30 | void disable_cache() { 31 | use_distance_cache = false; 32 | use_azimuth_cache = false; 33 | } 34 | 35 | void reset_distance_cache() { 36 | distance_cache = std::make_unique(); 37 | } 38 | 39 | void reset_azimuth_cache() { 40 | azimuth_cache = std::make_unique(); 41 | } 42 | 43 | } 44 | -------------------------------------------------------------------------------- /src/library/src/io/file_exporter.cpp: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2021-2025 Adrian Wöltche 2 | // 3 | // This program is free software: you can redistribute it and/or modify 4 | // it under the terms of the GNU Affero General Public License as 5 | // published by the Free Software Foundation, either version 3 of the 6 | // License, or (at your option) any later version. 7 | // 8 | // This program is distributed in the hope that it will be useful, 9 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 10 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 | // GNU Affero General Public License for more details. 12 | // 13 | // You should have received a copy of the GNU Affero General Public License 14 | // along with this program. If not, see https://www.gnu.org/licenses/. 15 | 16 | #include "io/file_exporter.hpp" 17 | 18 | namespace map_matching_2::io { 19 | 20 | void file_exporter::open() { 21 | if (not filename().empty()) { 22 | _out = std::ofstream{filename(), std::ofstream::out | std::ofstream::trunc}; 23 | } 24 | } 25 | 26 | void file_exporter::close() { 27 | if (_out.is_open()) { 28 | try { 29 | _out.close(); 30 | } catch (std::exception &e) {} 31 | } 32 | } 33 | 34 | file_exporter::file_exporter(std::string filename) 35 | : exporter{std::move(filename)} { 36 | open(); 37 | } 38 | 39 | file_exporter::~file_exporter() { 40 | close(); 41 | } 42 | 43 | [[nodiscard]] bool file_exporter::is_writable() const { 44 | return _out.is_open() and _out.good() and not filename().empty(); 45 | } 46 | 47 | } 48 | -------------------------------------------------------------------------------- /src/library/src/matching/defect.cpp: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2024-2025 Adrian Wöltche 2 | // 3 | // This program is free software: you can redistribute it and/or modify 4 | // it under the terms of the GNU Affero General Public License as 5 | // published by the Free Software Foundation, either version 3 of the 6 | // License, or (at your option) any later version. 7 | // 8 | // This program is distributed in the hope that it will be useful, 9 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 10 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 | // GNU Affero General Public License for more details. 12 | // 13 | // You should have received a copy of the GNU Affero General Public License 14 | // along with this program. If not, see https://www.gnu.org/licenses/. 15 | 16 | #include "matching/defect.hpp" 17 | 18 | #include 19 | #include 20 | 21 | namespace map_matching_2::matching { 22 | 23 | std::ostream &operator<<(std::ostream &out, const boost::unordered_flat_set &defect_set) { 24 | std::string defect_str; 25 | if (defect_set.contains(defect::none)) { 26 | defect_str.append("none, "); 27 | } 28 | if (defect_set.contains(defect::equal)) { 29 | defect_str.append("equal, "); 30 | } 31 | if (defect_set.contains(defect::forward_backward)) { 32 | defect_str.append("forward_backward, "); 33 | } 34 | if (not defect_str.empty() and defect_str.ends_with(", ")) { 35 | defect_str.erase(defect_str.length() - 2); 36 | } 37 | out << defect_str; 38 | return out; 39 | } 40 | 41 | } 42 | -------------------------------------------------------------------------------- /src/library/src/matching/matcher/match_task.cpp: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2024-2025 Adrian Wöltche 2 | // 3 | // This program is free software: you can redistribute it and/or modify 4 | // it under the terms of the GNU Affero General Public License as 5 | // published by the Free Software Foundation, either version 3 of the 6 | // License, or (at your option) any later version. 7 | // 8 | // This program is distributed in the hope that it will be useful, 9 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 10 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 | // GNU Affero General Public License for more details. 12 | // 13 | // You should have received a copy of the GNU Affero General Public License 14 | // along with this program. If not, see https://www.gnu.org/licenses/. 15 | 16 | #include "matching/matcher/match_task.hpp" 17 | 18 | namespace map_matching_2::matching { 19 | 20 | match_task::match_task(import_multi_track_variant_type multi_track, matching::settings match_settings) 21 | : multi_track{std::move(multi_track)}, match_settings{std::move(match_settings)} {} 22 | 23 | } 24 | -------------------------------------------------------------------------------- /src/library/src/types/environment/environments/hmm.cpp: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2024-2025 Adrian Wöltche 2 | // 3 | // This program is free software: you can redistribute it and/or modify 4 | // it under the terms of the GNU Affero General Public License as 5 | // published by the Free Software Foundation, either version 3 of the 6 | // License, or (at your option) any later version. 7 | // 8 | // This program is distributed in the hope that it will be useful, 9 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 10 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 | // GNU Affero General Public License for more details. 12 | // 13 | // You should have received a copy of the GNU Affero General Public License 14 | // along with this program. If not, see https://www.gnu.org/licenses/. 15 | 16 | #include "types/environment/environments/hmm.hpp" 17 | 18 | #include "types/extern_undefine.hpp" 19 | 20 | MM2_HMM_TEMPLATE_CS(MM2_GEOGRAPHIC) 21 | MM2_HMM_TEMPLATE_CS(MM2_SPHERICAL_EQUATORIAL) 22 | MM2_HMM_TEMPLATE_CS(MM2_CARTESIAN) 23 | -------------------------------------------------------------------------------- /src/library/src/types/environment/environments/single.cpp: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2024-2025 Adrian Wöltche 2 | // 3 | // This program is free software: you can redistribute it and/or modify 4 | // it under the terms of the GNU Affero General Public License as 5 | // published by the Free Software Foundation, either version 3 of the 6 | // License, or (at your option) any later version. 7 | // 8 | // This program is distributed in the hope that it will be useful, 9 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 10 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 | // GNU Affero General Public License for more details. 12 | // 13 | // You should have received a copy of the GNU Affero General Public License 14 | // along with this program. If not, see https://www.gnu.org/licenses/. 15 | 16 | #include "types/environment/environments/single.hpp" 17 | 18 | #include "types/extern_undefine.hpp" 19 | 20 | MM2_SINGLE_TEMPLATE_CS(MM2_GEOGRAPHIC) 21 | MM2_SINGLE_TEMPLATE_CS(MM2_SPHERICAL_EQUATORIAL) 22 | MM2_SINGLE_TEMPLATE_CS(MM2_CARTESIAN) 23 | -------------------------------------------------------------------------------- /src/library/src/types/geometry/algorithm/compare.cpp: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2020-2025 Adrian Wöltche 2 | // 3 | // This program is free software: you can redistribute it and/or modify 4 | // it under the terms of the GNU Affero General Public License as 5 | // published by the Free Software Foundation, either version 3 of the 6 | // License, or (at your option) any later version. 7 | // 8 | // This program is distributed in the hope that it will be useful, 9 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 10 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 | // GNU Affero General Public License for more details. 12 | // 13 | // You should have received a copy of the GNU Affero General Public License 14 | // along with this program. If not, see https://www.gnu.org/licenses/. 15 | 16 | #include "types/geometry/algorithm/compare.hpp" 17 | 18 | #include "types/extern_undefine.hpp" 19 | 20 | MM2_LINE_COMPARATOR_TEMPLATE_CS(MM2_GEOGRAPHIC) 21 | MM2_LINE_COMPARATOR_TEMPLATE_CS(MM2_SPHERICAL_EQUATORIAL) 22 | MM2_LINE_COMPARATOR_TEMPLATE_CS(MM2_CARTESIAN) 23 | -------------------------------------------------------------------------------- /src/library/src/types/geometry/index/compare_points.cpp: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2020-2025 Adrian Wöltche 2 | // 3 | // This program is free software: you can redistribute it and/or modify 4 | // it under the terms of the GNU Affero General Public License as 5 | // published by the Free Software Foundation, either version 3 of the 6 | // License, or (at your option) any later version. 7 | // 8 | // This program is distributed in the hope that it will be useful, 9 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 10 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 | // GNU Affero General Public License for more details. 12 | // 13 | // You should have received a copy of the GNU Affero General Public License 14 | // along with this program. If not, see https://www.gnu.org/licenses/. 15 | 16 | #include "types/geometry/index/compare.hpp" 17 | 18 | #include "types/extern_undefine.hpp" 19 | 20 | MM2_COMPARE_RTREE_POINTS_TEMPLATE(MM2_GEOGRAPHIC) 21 | MM2_COMPARE_RTREE_POINTS_TEMPLATE(MM2_SPHERICAL_EQUATORIAL) 22 | MM2_COMPARE_RTREE_POINTS_TEMPLATE(MM2_CARTESIAN) 23 | -------------------------------------------------------------------------------- /src/library/src/types/geometry/index/compare_segments.cpp: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2020-2025 Adrian Wöltche 2 | // 3 | // This program is free software: you can redistribute it and/or modify 4 | // it under the terms of the GNU Affero General Public License as 5 | // published by the Free Software Foundation, either version 3 of the 6 | // License, or (at your option) any later version. 7 | // 8 | // This program is distributed in the hope that it will be useful, 9 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 10 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 | // GNU Affero General Public License for more details. 12 | // 13 | // You should have received a copy of the GNU Affero General Public License 14 | // along with this program. If not, see https://www.gnu.org/licenses/. 15 | 16 | #include "types/geometry/index/compare.hpp" 17 | 18 | #include "types/extern_undefine.hpp" 19 | 20 | MM2_COMPARE_RTREE_SEGMENTS_TEMPLATE_CS(MM2_GEOGRAPHIC) 21 | MM2_COMPARE_RTREE_SEGMENTS_TEMPLATE_CS(MM2_SPHERICAL_EQUATORIAL) 22 | MM2_COMPARE_RTREE_SEGMENTS_TEMPLATE_CS(MM2_CARTESIAN) 23 | -------------------------------------------------------------------------------- /src/library/src/types/geometry/index/index.cpp: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2020-2025 Adrian Wöltche 2 | // 3 | // This program is free software: you can redistribute it and/or modify 4 | // it under the terms of the GNU Affero General Public License as 5 | // published by the Free Software Foundation, either version 3 of the 6 | // License, or (at your option) any later version. 7 | // 8 | // This program is distributed in the hope that it will be useful, 9 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 10 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 | // GNU Affero General Public License for more details. 12 | // 13 | // You should have received a copy of the GNU Affero General Public License 14 | // along with this program. If not, see https://www.gnu.org/licenses/. 15 | 16 | #include "types/geometry/index/index.hpp" 17 | 18 | #include "types/extern_undefine.hpp" 19 | 20 | MM2_RTREE_RSTAR_PARAMETERS_TEMPLATE(16) 21 | -------------------------------------------------------------------------------- /src/library/src/types/geometry/index/matcher.cpp: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2020-2025 Adrian Wöltche 2 | // 3 | // This program is free software: you can redistribute it and/or modify 4 | // it under the terms of the GNU Affero General Public License as 5 | // published by the Free Software Foundation, either version 3 of the 6 | // License, or (at your option) any later version. 7 | // 8 | // This program is distributed in the hope that it will be useful, 9 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 10 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 | // GNU Affero General Public License for more details. 12 | // 13 | // You should have received a copy of the GNU Affero General Public License 14 | // along with this program. If not, see https://www.gnu.org/licenses/. 15 | 16 | #include "types/geometry/index/matcher.hpp" 17 | 18 | #include "types/extern_undefine.hpp" 19 | 20 | MM2_MATCHER_RTREE_TEMPLATE_CS(MM2_GEOGRAPHIC) 21 | MM2_MATCHER_RTREE_TEMPLATE_CS(MM2_SPHERICAL_EQUATORIAL) 22 | MM2_MATCHER_RTREE_TEMPLATE_CS(MM2_CARTESIAN) 23 | -------------------------------------------------------------------------------- /src/library/src/types/geometry/index/median_merge.cpp: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2020-2025 Adrian Wöltche 2 | // 3 | // This program is free software: you can redistribute it and/or modify 4 | // it under the terms of the GNU Affero General Public License as 5 | // published by the Free Software Foundation, either version 3 of the 6 | // License, or (at your option) any later version. 7 | // 8 | // This program is distributed in the hope that it will be useful, 9 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 10 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 | // GNU Affero General Public License for more details. 12 | // 13 | // You should have received a copy of the GNU Affero General Public License 14 | // along with this program. If not, see https://www.gnu.org/licenses/. 15 | 16 | #include "types/geometry/index/median_merge.hpp" 17 | 18 | #include "types/extern_undefine.hpp" 19 | 20 | MM2_MEDIAN_MERGE_RTREE_TEMPLATE(MM2_GEOGRAPHIC) 21 | MM2_MEDIAN_MERGE_RTREE_TEMPLATE(MM2_SPHERICAL_EQUATORIAL) 22 | MM2_MEDIAN_MERGE_RTREE_TEMPLATE(MM2_CARTESIAN) 23 | -------------------------------------------------------------------------------- /src/library/src/types/geometry/index/network_points.cpp: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2020-2025 Adrian Wöltche 2 | // 3 | // This program is free software: you can redistribute it and/or modify 4 | // it under the terms of the GNU Affero General Public License as 5 | // published by the Free Software Foundation, either version 3 of the 6 | // License, or (at your option) any later version. 7 | // 8 | // This program is distributed in the hope that it will be useful, 9 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 10 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 | // GNU Affero General Public License for more details. 12 | // 13 | // You should have received a copy of the GNU Affero General Public License 14 | // along with this program. If not, see https://www.gnu.org/licenses/. 15 | 16 | #include "types/geometry/index/network.hpp" 17 | 18 | #include "types/extern_undefine.hpp" 19 | 20 | MM2_RTREE_POINTS_TEMPLATE_CS(MM2_GEOGRAPHIC) 21 | MM2_RTREE_POINTS_TEMPLATE_CS(MM2_SPHERICAL_EQUATORIAL) 22 | MM2_RTREE_POINTS_TEMPLATE_CS(MM2_CARTESIAN) 23 | -------------------------------------------------------------------------------- /src/library/src/types/geometry/index/network_segments.cpp: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2020-2025 Adrian Wöltche 2 | // 3 | // This program is free software: you can redistribute it and/or modify 4 | // it under the terms of the GNU Affero General Public License as 5 | // published by the Free Software Foundation, either version 3 of the 6 | // License, or (at your option) any later version. 7 | // 8 | // This program is distributed in the hope that it will be useful, 9 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 10 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 | // GNU Affero General Public License for more details. 12 | // 13 | // You should have received a copy of the GNU Affero General Public License 14 | // along with this program. If not, see https://www.gnu.org/licenses/. 15 | 16 | #include "types/geometry/index/network.hpp" 17 | 18 | #include "types/extern_undefine.hpp" 19 | 20 | MM2_RTREE_SEGMENTS_TEMPLATE_CS(MM2_GEOGRAPHIC) 21 | MM2_RTREE_SEGMENTS_TEMPLATE_CS(MM2_SPHERICAL_EQUATORIAL) 22 | MM2_RTREE_SEGMENTS_TEMPLATE_CS(MM2_CARTESIAN) 23 | -------------------------------------------------------------------------------- /src/library/src/types/geometry/models.cpp: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2020-2025 Adrian Wöltche 2 | // 3 | // This program is free software: you can redistribute it and/or modify 4 | // it under the terms of the GNU Affero General Public License as 5 | // published by the Free Software Foundation, either version 3 of the 6 | // License, or (at your option) any later version. 7 | // 8 | // This program is distributed in the hope that it will be useful, 9 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 10 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 | // GNU Affero General Public License for more details. 12 | // 13 | // You should have received a copy of the GNU Affero General Public License 14 | // along with this program. If not, see https://www.gnu.org/licenses/. 15 | 16 | #include "types/geometry/models.hpp" 17 | 18 | #include "types/extern_undefine.hpp" 19 | 20 | MM2_LINESTRING_TEMPLATE_CS(MM2_GEOGRAPHIC) 21 | MM2_LINESTRING_TEMPLATE_CS(MM2_SPHERICAL_EQUATORIAL) 22 | MM2_LINESTRING_TEMPLATE_CS(MM2_CARTESIAN) 23 | 24 | MM2_MULTI_LINESTRING_TEMPLATE_CS(MM2_GEOGRAPHIC) 25 | MM2_MULTI_LINESTRING_TEMPLATE_CS(MM2_SPHERICAL_EQUATORIAL) 26 | MM2_MULTI_LINESTRING_TEMPLATE_CS(MM2_CARTESIAN) 27 | -------------------------------------------------------------------------------- /src/library/src/types/geometry/network/edge.cpp: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2024-2025 Adrian Wöltche 2 | // 3 | // This program is free software: you can redistribute it and/or modify 4 | // it under the terms of the GNU Affero General Public License as 5 | // published by the Free Software Foundation, either version 3 of the 6 | // License, or (at your option) any later version. 7 | // 8 | // This program is distributed in the hope that it will be useful, 9 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 10 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 | // GNU Affero General Public License for more details. 12 | // 13 | // You should have received a copy of the GNU Affero General Public License 14 | // along with this program. If not, see https://www.gnu.org/licenses/. 15 | 16 | #include "types/geometry/network/edge.hpp" 17 | 18 | #include "types/extern_undefine.hpp" 19 | 20 | MM2_EDGE_TEMPLATE_RICH_LINE_TYPE_CS(MM2_GEOGRAPHIC) 21 | MM2_EDGE_TEMPLATE_RICH_LINE_TYPE_CS(MM2_SPHERICAL_EQUATORIAL) 22 | MM2_EDGE_TEMPLATE_RICH_LINE_TYPE_CS(MM2_CARTESIAN) 23 | -------------------------------------------------------------------------------- /src/library/src/types/geometry/network/network.cpp: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2024-2025 Adrian Wöltche 2 | // 3 | // This program is free software: you can redistribute it and/or modify 4 | // it under the terms of the GNU Affero General Public License as 5 | // published by the Free Software Foundation, either version 3 of the 6 | // License, or (at your option) any later version. 7 | // 8 | // This program is distributed in the hope that it will be useful, 9 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 10 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 | // GNU Affero General Public License for more details. 12 | // 13 | // You should have received a copy of the GNU Affero General Public License 14 | // along with this program. If not, see https://www.gnu.org/licenses/. 15 | 16 | #include "types/geometry/network/network.hpp" 17 | 18 | #include "types/extern_undefine.hpp" 19 | 20 | MM2_NETWORK_TEMPLATE_CS(MM2_GEOGRAPHIC) 21 | MM2_NETWORK_TEMPLATE_CS(MM2_SPHERICAL_EQUATORIAL) 22 | MM2_NETWORK_TEMPLATE_CS(MM2_CARTESIAN) 23 | -------------------------------------------------------------------------------- /src/library/src/types/geometry/network/network_base.cpp: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2024-2025 Adrian Wöltche 2 | // 3 | // This program is free software: you can redistribute it and/or modify 4 | // it under the terms of the GNU Affero General Public License as 5 | // published by the Free Software Foundation, either version 3 of the 6 | // License, or (at your option) any later version. 7 | // 8 | // This program is distributed in the hope that it will be useful, 9 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 10 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 | // GNU Affero General Public License for more details. 12 | // 13 | // You should have received a copy of the GNU Affero General Public License 14 | // along with this program. If not, see https://www.gnu.org/licenses/. 15 | 16 | #include "types/geometry/network/network_base.hpp" 17 | 18 | #include "types/extern_undefine.hpp" 19 | 20 | MM2_NETWORK_BASE_TEMPLATE_CS(MM2_GEOGRAPHIC) 21 | MM2_NETWORK_BASE_TEMPLATE_CS(MM2_SPHERICAL_EQUATORIAL) 22 | MM2_NETWORK_BASE_TEMPLATE_CS(MM2_CARTESIAN) 23 | -------------------------------------------------------------------------------- /src/library/src/types/geometry/network/network_import.cpp: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2024-2025 Adrian Wöltche 2 | // 3 | // This program is free software: you can redistribute it and/or modify 4 | // it under the terms of the GNU Affero General Public License as 5 | // published by the Free Software Foundation, either version 3 of the 6 | // License, or (at your option) any later version. 7 | // 8 | // This program is distributed in the hope that it will be useful, 9 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 10 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 | // GNU Affero General Public License for more details. 12 | // 13 | // You should have received a copy of the GNU Affero General Public License 14 | // along with this program. If not, see https://www.gnu.org/licenses/. 15 | 16 | #include "types/geometry/network/network_import.hpp" 17 | 18 | #include "types/extern_undefine.hpp" 19 | 20 | MM2_NETWORK_IMPORT_TEMPLATE_CS(MM2_GEOGRAPHIC) 21 | MM2_NETWORK_IMPORT_TEMPLATE_CS(MM2_SPHERICAL_EQUATORIAL) 22 | MM2_NETWORK_IMPORT_TEMPLATE_CS(MM2_CARTESIAN) 23 | -------------------------------------------------------------------------------- /src/library/src/types/geometry/network/node.cpp: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2024-2025 Adrian Wöltche 2 | // 3 | // This program is free software: you can redistribute it and/or modify 4 | // it under the terms of the GNU Affero General Public License as 5 | // published by the Free Software Foundation, either version 3 of the 6 | // License, or (at your option) any later version. 7 | // 8 | // This program is distributed in the hope that it will be useful, 9 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 10 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 | // GNU Affero General Public License for more details. 12 | // 13 | // You should have received a copy of the GNU Affero General Public License 14 | // along with this program. If not, see https://www.gnu.org/licenses/. 15 | 16 | #include "types/geometry/network/node.hpp" 17 | 18 | #include "types/extern_undefine.hpp" 19 | 20 | MM2_NODE_TEMPLATE_CS(MM2_GEOGRAPHIC) 21 | MM2_NODE_TEMPLATE_CS(MM2_SPHERICAL_EQUATORIAL) 22 | MM2_NODE_TEMPLATE_CS(MM2_CARTESIAN) 23 | -------------------------------------------------------------------------------- /src/library/src/types/geometry/network/route/eager_route.cpp: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2024-2025 Adrian Wöltche 2 | // 3 | // This program is free software: you can redistribute it and/or modify 4 | // it under the terms of the GNU Affero General Public License as 5 | // published by the Free Software Foundation, either version 3 of the 6 | // License, or (at your option) any later version. 7 | // 8 | // This program is distributed in the hope that it will be useful, 9 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 10 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 | // GNU Affero General Public License for more details. 12 | // 13 | // You should have received a copy of the GNU Affero General Public License 14 | // along with this program. If not, see https://www.gnu.org/licenses/. 15 | 16 | #include "types/geometry/network/route/eager_route.hpp" 17 | 18 | #include "types/extern_undefine.hpp" 19 | 20 | MM2_EAGER_ROUTE_TEMPLATE(MM2_GEOGRAPHIC) 21 | MM2_EAGER_ROUTE_TEMPLATE(MM2_SPHERICAL_EQUATORIAL) 22 | MM2_EAGER_ROUTE_TEMPLATE(MM2_CARTESIAN) 23 | -------------------------------------------------------------------------------- /src/library/src/types/geometry/network/route/lazy_route.cpp: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2024-2025 Adrian Wöltche 2 | // 3 | // This program is free software: you can redistribute it and/or modify 4 | // it under the terms of the GNU Affero General Public License as 5 | // published by the Free Software Foundation, either version 3 of the 6 | // License, or (at your option) any later version. 7 | // 8 | // This program is distributed in the hope that it will be useful, 9 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 10 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 | // GNU Affero General Public License for more details. 12 | // 13 | // You should have received a copy of the GNU Affero General Public License 14 | // along with this program. If not, see https://www.gnu.org/licenses/. 15 | 16 | #include "types/geometry/network/route/lazy_route.hpp" 17 | 18 | #include "types/extern_undefine.hpp" 19 | 20 | MM2_LAZY_ROUTE_TEMPLATE(MM2_GEOGRAPHIC) 21 | MM2_LAZY_ROUTE_TEMPLATE(MM2_SPHERICAL_EQUATORIAL) 22 | MM2_LAZY_ROUTE_TEMPLATE(MM2_CARTESIAN) 23 | -------------------------------------------------------------------------------- /src/library/src/types/geometry/network/route/route.cpp: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2024-2025 Adrian Wöltche 2 | // 3 | // This program is free software: you can redistribute it and/or modify 4 | // it under the terms of the GNU Affero General Public License as 5 | // published by the Free Software Foundation, either version 3 of the 6 | // License, or (at your option) any later version. 7 | // 8 | // This program is distributed in the hope that it will be useful, 9 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 10 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 | // GNU Affero General Public License for more details. 12 | // 13 | // You should have received a copy of the GNU Affero General Public License 14 | // along with this program. If not, see https://www.gnu.org/licenses/. 15 | 16 | #include "types/geometry/network/route/route.hpp" 17 | 18 | #include "types/extern_undefine.hpp" 19 | 20 | MM2_ROUTE_TEMPLATE(MM2_GEOGRAPHIC) 21 | MM2_ROUTE_TEMPLATE(MM2_SPHERICAL_EQUATORIAL) 22 | MM2_ROUTE_TEMPLATE(MM2_CARTESIAN) 23 | -------------------------------------------------------------------------------- /src/library/src/types/geometry/network/route/route_data.cpp: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2024-2025 Adrian Wöltche 2 | // 3 | // This program is free software: you can redistribute it and/or modify 4 | // it under the terms of the GNU Affero General Public License as 5 | // published by the Free Software Foundation, either version 3 of the 6 | // License, or (at your option) any later version. 7 | // 8 | // This program is distributed in the hope that it will be useful, 9 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 10 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 | // GNU Affero General Public License for more details. 12 | // 13 | // You should have received a copy of the GNU Affero General Public License 14 | // along with this program. If not, see https://www.gnu.org/licenses/. 15 | 16 | #include "types/geometry/network/route/route_data.hpp" 17 | 18 | #include "types/extern_undefine.hpp" 19 | 20 | MM2_ROUTE_DATA_TEMPLATE_LENGTH(float) 21 | MM2_ROUTE_DATA_TEMPLATE_LENGTH(double) 22 | MM2_ROUTE_DATA_TEMPLATE_LENGTH(long double) 23 | -------------------------------------------------------------------------------- /src/library/src/types/geometry/point.cpp: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2020-2025 Adrian Wöltche 2 | // 3 | // This program is free software: you can redistribute it and/or modify 4 | // it under the terms of the GNU Affero General Public License as 5 | // published by the Free Software Foundation, either version 3 of the 6 | // License, or (at your option) any later version. 7 | // 8 | // This program is distributed in the hope that it will be useful, 9 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 10 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 | // GNU Affero General Public License for more details. 12 | // 13 | // You should have received a copy of the GNU Affero General Public License 14 | // along with this program. If not, see https://www.gnu.org/licenses/. 15 | 16 | #include "types/geometry/point.hpp" 17 | 18 | #include "types/extern_undefine.hpp" 19 | 20 | MM2_POINT_TEMPLATE(MM2_GEOGRAPHIC) 21 | MM2_POINT_TEMPLATE(MM2_SPHERICAL_EQUATORIAL) 22 | MM2_POINT_TEMPLATE(MM2_CARTESIAN) 23 | 24 | MM2_TIME_POINT_TEMPLATE(MM2_GEOGRAPHIC) 25 | MM2_TIME_POINT_TEMPLATE(MM2_SPHERICAL_EQUATORIAL) 26 | MM2_TIME_POINT_TEMPLATE(MM2_CARTESIAN) 27 | -------------------------------------------------------------------------------- /src/library/src/types/geometry/reprojector.cpp: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2022-2025 Adrian Wöltche 2 | // 3 | // This program is free software: you can redistribute it and/or modify 4 | // it under the terms of the GNU Affero General Public License as 5 | // published by the Free Software Foundation, either version 3 of the 6 | // License, or (at your option) any later version. 7 | // 8 | // This program is distributed in the hope that it will be useful, 9 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 10 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 | // GNU Affero General Public License for more details. 12 | // 13 | // You should have received a copy of the GNU Affero General Public License 14 | // along with this program. If not, see https://www.gnu.org/licenses/. 15 | 16 | #include "types/geometry/reprojector.hpp" 17 | 18 | #include "types/extern_undefine.hpp" 19 | 20 | MM2_POINT_REPROJECTOR_TEMPLATE_CS(MM2_GEOGRAPHIC) 21 | MM2_POINT_REPROJECTOR_TEMPLATE_CS(MM2_SPHERICAL_EQUATORIAL) 22 | MM2_POINT_REPROJECTOR_TEMPLATE_CS(MM2_CARTESIAN) 23 | 24 | MM2_POINT_REPROJECTOR_VARIANT_TEMPLATE 25 | -------------------------------------------------------------------------------- /src/library/src/types/geometry/rich_type/eager_multi_rich_line.cpp: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2024-2025 Adrian Wöltche 2 | // 3 | // This program is free software: you can redistribute it and/or modify 4 | // it under the terms of the GNU Affero General Public License as 5 | // published by the Free Software Foundation, either version 3 of the 6 | // License, or (at your option) any later version. 7 | // 8 | // This program is distributed in the hope that it will be useful, 9 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 10 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 | // GNU Affero General Public License for more details. 12 | // 13 | // You should have received a copy of the GNU Affero General Public License 14 | // along with this program. If not, see https://www.gnu.org/licenses/. 15 | 16 | #include "types/geometry/rich_type/eager_multi_rich_line.hpp" 17 | 18 | #include "types/extern_undefine.hpp" 19 | 20 | MM2_EAGER_MULTI_RICH_LINE_TEMPLATE_CS(MM2_GEOGRAPHIC) 21 | MM2_EAGER_MULTI_RICH_LINE_TEMPLATE_CS(MM2_SPHERICAL_EQUATORIAL) 22 | MM2_EAGER_MULTI_RICH_LINE_TEMPLATE_CS(MM2_CARTESIAN) 23 | -------------------------------------------------------------------------------- /src/library/src/types/geometry/rich_type/eager_rich_line.cpp: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2024-2025 Adrian Wöltche 2 | // 3 | // This program is free software: you can redistribute it and/or modify 4 | // it under the terms of the GNU Affero General Public License as 5 | // published by the Free Software Foundation, either version 3 of the 6 | // License, or (at your option) any later version. 7 | // 8 | // This program is distributed in the hope that it will be useful, 9 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 10 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 | // GNU Affero General Public License for more details. 12 | // 13 | // You should have received a copy of the GNU Affero General Public License 14 | // along with this program. If not, see https://www.gnu.org/licenses/. 15 | 16 | #include "types/geometry/rich_type/eager_rich_line.hpp" 17 | 18 | #include "types/extern_undefine.hpp" 19 | 20 | MM2_EAGER_RICH_LINE_TEMPLATE_CS(MM2_GEOGRAPHIC) 21 | MM2_EAGER_RICH_LINE_TEMPLATE_CS(MM2_SPHERICAL_EQUATORIAL) 22 | MM2_EAGER_RICH_LINE_TEMPLATE_CS(MM2_CARTESIAN) 23 | -------------------------------------------------------------------------------- /src/library/src/types/geometry/rich_type/eager_rich_segment.cpp: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2024-2025 Adrian Wöltche 2 | // 3 | // This program is free software: you can redistribute it and/or modify 4 | // it under the terms of the GNU Affero General Public License as 5 | // published by the Free Software Foundation, either version 3 of the 6 | // License, or (at your option) any later version. 7 | // 8 | // This program is distributed in the hope that it will be useful, 9 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 10 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 | // GNU Affero General Public License for more details. 12 | // 13 | // You should have received a copy of the GNU Affero General Public License 14 | // along with this program. If not, see https://www.gnu.org/licenses/. 15 | 16 | #include "types/geometry/rich_type/eager_rich_segment.hpp" 17 | 18 | #include "types/extern_undefine.hpp" 19 | 20 | MM2_EAGER_RICH_SEGMENT_TEMPLATE_CS(MM2_GEOGRAPHIC) 21 | MM2_EAGER_RICH_SEGMENT_TEMPLATE_CS(MM2_SPHERICAL_EQUATORIAL) 22 | MM2_EAGER_RICH_SEGMENT_TEMPLATE_CS(MM2_CARTESIAN) 23 | -------------------------------------------------------------------------------- /src/library/src/types/geometry/rich_type/lazy_multi_rich_line.cpp: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2024-2025 Adrian Wöltche 2 | // 3 | // This program is free software: you can redistribute it and/or modify 4 | // it under the terms of the GNU Affero General Public License as 5 | // published by the Free Software Foundation, either version 3 of the 6 | // License, or (at your option) any later version. 7 | // 8 | // This program is distributed in the hope that it will be useful, 9 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 10 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 | // GNU Affero General Public License for more details. 12 | // 13 | // You should have received a copy of the GNU Affero General Public License 14 | // along with this program. If not, see https://www.gnu.org/licenses/. 15 | 16 | #include "types/geometry/rich_type/lazy_multi_rich_line.hpp" 17 | 18 | #include "types/extern_undefine.hpp" 19 | 20 | MM2_LAZY_MULTI_RICH_LINE_TEMPLATE_CS(MM2_GEOGRAPHIC) 21 | MM2_LAZY_MULTI_RICH_LINE_TEMPLATE_CS(MM2_SPHERICAL_EQUATORIAL) 22 | MM2_LAZY_MULTI_RICH_LINE_TEMPLATE_CS(MM2_CARTESIAN) 23 | -------------------------------------------------------------------------------- /src/library/src/types/geometry/rich_type/lazy_rich_line.cpp: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2024-2025 Adrian Wöltche 2 | // 3 | // This program is free software: you can redistribute it and/or modify 4 | // it under the terms of the GNU Affero General Public License as 5 | // published by the Free Software Foundation, either version 3 of the 6 | // License, or (at your option) any later version. 7 | // 8 | // This program is distributed in the hope that it will be useful, 9 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 10 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 | // GNU Affero General Public License for more details. 12 | // 13 | // You should have received a copy of the GNU Affero General Public License 14 | // along with this program. If not, see https://www.gnu.org/licenses/. 15 | 16 | #include "types/geometry/rich_type/lazy_rich_line.hpp" 17 | 18 | #include "types/extern_undefine.hpp" 19 | 20 | MM2_LAZY_RICH_LINE_TEMPLATE_CS(MM2_GEOGRAPHIC) 21 | MM2_LAZY_RICH_LINE_TEMPLATE_CS(MM2_SPHERICAL_EQUATORIAL) 22 | MM2_LAZY_RICH_LINE_TEMPLATE_CS(MM2_CARTESIAN) 23 | -------------------------------------------------------------------------------- /src/library/src/types/geometry/rich_type/lazy_rich_segment.cpp: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2024-2025 Adrian Wöltche 2 | // 3 | // This program is free software: you can redistribute it and/or modify 4 | // it under the terms of the GNU Affero General Public License as 5 | // published by the Free Software Foundation, either version 3 of the 6 | // License, or (at your option) any later version. 7 | // 8 | // This program is distributed in the hope that it will be useful, 9 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 10 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 | // GNU Affero General Public License for more details. 12 | // 13 | // You should have received a copy of the GNU Affero General Public License 14 | // along with this program. If not, see https://www.gnu.org/licenses/. 15 | 16 | #include "types/geometry/rich_type/lazy_rich_segment.hpp" 17 | 18 | #include "types/extern_undefine.hpp" 19 | 20 | MM2_LAZY_RICH_SEGMENT_TEMPLATE_CS(MM2_GEOGRAPHIC) 21 | MM2_LAZY_RICH_SEGMENT_TEMPLATE_CS(MM2_SPHERICAL_EQUATORIAL) 22 | MM2_LAZY_RICH_SEGMENT_TEMPLATE_CS(MM2_CARTESIAN) 23 | -------------------------------------------------------------------------------- /src/library/src/types/geometry/rich_type/multi_rich_line.cpp: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2024-2025 Adrian Wöltche 2 | // 3 | // This program is free software: you can redistribute it and/or modify 4 | // it under the terms of the GNU Affero General Public License as 5 | // published by the Free Software Foundation, either version 3 of the 6 | // License, or (at your option) any later version. 7 | // 8 | // This program is distributed in the hope that it will be useful, 9 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 10 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 | // GNU Affero General Public License for more details. 12 | // 13 | // You should have received a copy of the GNU Affero General Public License 14 | // along with this program. If not, see https://www.gnu.org/licenses/. 15 | 16 | #include "types/geometry/rich_type/multi_rich_line.hpp" 17 | 18 | #include "types/extern_undefine.hpp" 19 | 20 | MM2_MULTI_RICH_LINE_TEMPLATE_CS(MM2_GEOGRAPHIC) 21 | MM2_MULTI_RICH_LINE_TEMPLATE_CS(MM2_SPHERICAL_EQUATORIAL) 22 | MM2_MULTI_RICH_LINE_TEMPLATE_CS(MM2_CARTESIAN) 23 | -------------------------------------------------------------------------------- /src/library/src/types/geometry/rich_type/multi_rich_line_data.cpp: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2024-2025 Adrian Wöltche 2 | // 3 | // This program is free software: you can redistribute it and/or modify 4 | // it under the terms of the GNU Affero General Public License as 5 | // published by the Free Software Foundation, either version 3 of the 6 | // License, or (at your option) any later version. 7 | // 8 | // This program is distributed in the hope that it will be useful, 9 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 10 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 | // GNU Affero General Public License for more details. 12 | // 13 | // You should have received a copy of the GNU Affero General Public License 14 | // along with this program. If not, see https://www.gnu.org/licenses/. 15 | 16 | #include "types/geometry/rich_type/multi_rich_line_data.hpp" 17 | 18 | #include "types/extern_undefine.hpp" 19 | 20 | MM2_MULTI_RICH_LINE_DATA_TEMPLATE_LENGTH(float) 21 | MM2_MULTI_RICH_LINE_DATA_TEMPLATE_LENGTH(double) 22 | MM2_MULTI_RICH_LINE_DATA_TEMPLATE_LENGTH(long double) 23 | -------------------------------------------------------------------------------- /src/library/src/types/geometry/rich_type/rich_line.cpp: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2024-2025 Adrian Wöltche 2 | // 3 | // This program is free software: you can redistribute it and/or modify 4 | // it under the terms of the GNU Affero General Public License as 5 | // published by the Free Software Foundation, either version 3 of the 6 | // License, or (at your option) any later version. 7 | // 8 | // This program is distributed in the hope that it will be useful, 9 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 10 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 | // GNU Affero General Public License for more details. 12 | // 13 | // You should have received a copy of the GNU Affero General Public License 14 | // along with this program. If not, see https://www.gnu.org/licenses/. 15 | 16 | #include "types/geometry/rich_type/rich_line.hpp" 17 | 18 | #include "types/extern_undefine.hpp" 19 | 20 | MM2_RICH_LINE_TEMPLATE_CS(MM2_GEOGRAPHIC) 21 | MM2_RICH_LINE_TEMPLATE_CS(MM2_SPHERICAL_EQUATORIAL) 22 | MM2_RICH_LINE_TEMPLATE_CS(MM2_CARTESIAN) 23 | -------------------------------------------------------------------------------- /src/library/src/types/geometry/rich_type/rich_line_data.cpp: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2024-2025 Adrian Wöltche 2 | // 3 | // This program is free software: you can redistribute it and/or modify 4 | // it under the terms of the GNU Affero General Public License as 5 | // published by the Free Software Foundation, either version 3 of the 6 | // License, or (at your option) any later version. 7 | // 8 | // This program is distributed in the hope that it will be useful, 9 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 10 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 | // GNU Affero General Public License for more details. 12 | // 13 | // You should have received a copy of the GNU Affero General Public License 14 | // along with this program. If not, see https://www.gnu.org/licenses/. 15 | 16 | #include "types/geometry/rich_type/rich_line_data.hpp" 17 | 18 | #include "types/extern_undefine.hpp" 19 | 20 | MM2_RICH_LINE_DATA_TEMPLATE_LENGTH(float) 21 | MM2_RICH_LINE_DATA_TEMPLATE_LENGTH(double) 22 | MM2_RICH_LINE_DATA_TEMPLATE_LENGTH(long double) 23 | -------------------------------------------------------------------------------- /src/library/src/types/geometry/rich_type/rich_line_variant.cpp: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2024-2025 Adrian Wöltche 2 | // 3 | // This program is free software: you can redistribute it and/or modify 4 | // it under the terms of the GNU Affero General Public License as 5 | // published by the Free Software Foundation, either version 3 of the 6 | // License, or (at your option) any later version. 7 | // 8 | // This program is distributed in the hope that it will be useful, 9 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 10 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 | // GNU Affero General Public License for more details. 12 | // 13 | // You should have received a copy of the GNU Affero General Public License 14 | // along with this program. If not, see https://www.gnu.org/licenses/. 15 | 16 | #include "types/geometry/rich_type/rich_line_variant.hpp" 17 | 18 | #include "types/extern_undefine.hpp" 19 | 20 | MM2_RICH_LINE_VARIANT_TEMPLATE(MM2_GEOGRAPHIC) 21 | MM2_RICH_LINE_VARIANT_TEMPLATE(MM2_SPHERICAL_EQUATORIAL) 22 | MM2_RICH_LINE_VARIANT_TEMPLATE(MM2_CARTESIAN) 23 | -------------------------------------------------------------------------------- /src/library/src/types/geometry/rich_type/rich_segment.cpp: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2024-2025 Adrian Wöltche 2 | // 3 | // This program is free software: you can redistribute it and/or modify 4 | // it under the terms of the GNU Affero General Public License as 5 | // published by the Free Software Foundation, either version 3 of the 6 | // License, or (at your option) any later version. 7 | // 8 | // This program is distributed in the hope that it will be useful, 9 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 10 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 | // GNU Affero General Public License for more details. 12 | // 13 | // You should have received a copy of the GNU Affero General Public License 14 | // along with this program. If not, see https://www.gnu.org/licenses/. 15 | 16 | #include "types/geometry/rich_type/rich_segment.hpp" 17 | 18 | #include "types/extern_undefine.hpp" 19 | 20 | MM2_RICH_SEGMENT_TEMPLATE_CS(MM2_GEOGRAPHIC) 21 | MM2_RICH_SEGMENT_TEMPLATE_CS(MM2_SPHERICAL_EQUATORIAL) 22 | MM2_RICH_SEGMENT_TEMPLATE_CS(MM2_CARTESIAN) 23 | -------------------------------------------------------------------------------- /src/library/src/types/geometry/rich_type/rich_segment_data.cpp: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2024-2025 Adrian Wöltche 2 | // 3 | // This program is free software: you can redistribute it and/or modify 4 | // it under the terms of the GNU Affero General Public License as 5 | // published by the Free Software Foundation, either version 3 of the 6 | // License, or (at your option) any later version. 7 | // 8 | // This program is distributed in the hope that it will be useful, 9 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 10 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 | // GNU Affero General Public License for more details. 12 | // 13 | // You should have received a copy of the GNU Affero General Public License 14 | // along with this program. If not, see https://www.gnu.org/licenses/. 15 | 16 | #include "types/geometry/rich_type/rich_segment_data.hpp" 17 | 18 | #include "types/extern_undefine.hpp" 19 | 20 | MM2_RICH_SEGMENT_DATA_TEMPLATE_LENGTH(float) 21 | MM2_RICH_SEGMENT_DATA_TEMPLATE_LENGTH(double) 22 | MM2_RICH_SEGMENT_DATA_TEMPLATE_LENGTH(long double) 23 | -------------------------------------------------------------------------------- /src/library/src/types/geometry/track/multi_track.cpp: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2024-2025 Adrian Wöltche 2 | // 3 | // This program is free software: you can redistribute it and/or modify 4 | // it under the terms of the GNU Affero General Public License as 5 | // published by the Free Software Foundation, either version 3 of the 6 | // License, or (at your option) any later version. 7 | // 8 | // This program is distributed in the hope that it will be useful, 9 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 10 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 | // GNU Affero General Public License for more details. 12 | // 13 | // You should have received a copy of the GNU Affero General Public License 14 | // along with this program. If not, see https://www.gnu.org/licenses/. 15 | 16 | #include "types/geometry/track/multi_track.hpp" 17 | 18 | #include "types/extern_undefine.hpp" 19 | 20 | MM2_MULTI_TRACK_TEMPLATE(MM2_GEOGRAPHIC) 21 | MM2_MULTI_TRACK_TEMPLATE(MM2_SPHERICAL_EQUATORIAL) 22 | MM2_MULTI_TRACK_TEMPLATE(MM2_CARTESIAN) 23 | -------------------------------------------------------------------------------- /src/library/src/types/geometry/track/track.cpp: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2024-2025 Adrian Wöltche 2 | // 3 | // This program is free software: you can redistribute it and/or modify 4 | // it under the terms of the GNU Affero General Public License as 5 | // published by the Free Software Foundation, either version 3 of the 6 | // License, or (at your option) any later version. 7 | // 8 | // This program is distributed in the hope that it will be useful, 9 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 10 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 | // GNU Affero General Public License for more details. 12 | // 13 | // You should have received a copy of the GNU Affero General Public License 14 | // along with this program. If not, see https://www.gnu.org/licenses/. 15 | 16 | #include "types/geometry/track/track.hpp" 17 | 18 | #include "types/extern_undefine.hpp" 19 | 20 | MM2_TRACK_TEMPLATE(MM2_GEOGRAPHIC) 21 | MM2_TRACK_TEMPLATE(MM2_SPHERICAL_EQUATORIAL) 22 | MM2_TRACK_TEMPLATE(MM2_CARTESIAN) 23 | -------------------------------------------------------------------------------- /src/library/src/types/graph/adjacency_list.cpp: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2024-2025 Adrian Wöltche 2 | // 3 | // This program is free software: you can redistribute it and/or modify 4 | // it under the terms of the GNU Affero General Public License as 5 | // published by the Free Software Foundation, either version 3 of the 6 | // License, or (at your option) any later version. 7 | // 8 | // This program is distributed in the hope that it will be useful, 9 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 10 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 | // GNU Affero General Public License for more details. 12 | // 13 | // You should have received a copy of the GNU Affero General Public License 14 | // along with this program. If not, see https://www.gnu.org/licenses/. 15 | 16 | #include "types/graph/adjacency_list.hpp" 17 | 18 | #include "types/extern_undefine.hpp" 19 | 20 | MM2_ADJACENCY_LIST_TEMPLATE_CS(MM2_GEOGRAPHIC) 21 | MM2_ADJACENCY_LIST_TEMPLATE_CS(MM2_SPHERICAL_EQUATORIAL) 22 | MM2_ADJACENCY_LIST_TEMPLATE_CS(MM2_CARTESIAN) 23 | -------------------------------------------------------------------------------- /src/library/src/types/graph/compressed_sparse_row.cpp: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2024-2025 Adrian Wöltche 2 | // 3 | // This program is free software: you can redistribute it and/or modify 4 | // it under the terms of the GNU Affero General Public License as 5 | // published by the Free Software Foundation, either version 3 of the 6 | // License, or (at your option) any later version. 7 | // 8 | // This program is distributed in the hope that it will be useful, 9 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 10 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 | // GNU Affero General Public License for more details. 12 | // 13 | // You should have received a copy of the GNU Affero General Public License 14 | // along with this program. If not, see https://www.gnu.org/licenses/. 15 | 16 | #include "types/graph/compressed_sparse_row.hpp" 17 | 18 | #include "types/extern_undefine.hpp" 19 | 20 | MM2_EAGER_COMPRESSED_SPARSE_ROW_TEMPLATE_CS(MM2_GEOGRAPHIC) 21 | MM2_EAGER_COMPRESSED_SPARSE_ROW_TEMPLATE_CS(MM2_SPHERICAL_EQUATORIAL) 22 | MM2_EAGER_COMPRESSED_SPARSE_ROW_TEMPLATE_CS(MM2_CARTESIAN) 23 | -------------------------------------------------------------------------------- /src/library/src/types/io/helper/graph_helper.cpp: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2024-2025 Adrian Wöltche 2 | // 3 | // This program is free software: you can redistribute it and/or modify 4 | // it under the terms of the GNU Affero General Public License as 5 | // published by the Free Software Foundation, either version 3 of the 6 | // License, or (at your option) any later version. 7 | // 8 | // This program is distributed in the hope that it will be useful, 9 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 10 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 | // GNU Affero General Public License for more details. 12 | // 13 | // You should have received a copy of the GNU Affero General Public License 14 | // along with this program. If not, see https://www.gnu.org/licenses/. 15 | 16 | #include "types/io/helper/graph_helper.hpp" 17 | 18 | #include "types/extern_undefine.hpp" 19 | 20 | MM2_GRAPH_HELPER_IMPORT_TEMPLATE_CS(MM2_GEOGRAPHIC) 21 | MM2_GRAPH_HELPER_IMPORT_TEMPLATE_CS(MM2_SPHERICAL_EQUATORIAL) 22 | MM2_GRAPH_HELPER_IMPORT_TEMPLATE_CS(MM2_CARTESIAN) 23 | 24 | MM2_GRAPH_HELPER_TEMPLATE_CS(MM2_GEOGRAPHIC) 25 | MM2_GRAPH_HELPER_TEMPLATE_CS(MM2_SPHERICAL_EQUATORIAL) 26 | MM2_GRAPH_HELPER_TEMPLATE_CS(MM2_CARTESIAN) 27 | -------------------------------------------------------------------------------- /src/library/src/types/io/helper/index_build_helper.cpp: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2024-2025 Adrian Wöltche 2 | // 3 | // This program is free software: you can redistribute it and/or modify 4 | // it under the terms of the GNU Affero General Public License as 5 | // published by the Free Software Foundation, either version 3 of the 6 | // License, or (at your option) any later version. 7 | // 8 | // This program is distributed in the hope that it will be useful, 9 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 10 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 | // GNU Affero General Public License for more details. 12 | // 13 | // You should have received a copy of the GNU Affero General Public License 14 | // along with this program. If not, see https://www.gnu.org/licenses/. 15 | 16 | #include "types/io/helper/index_build_helper.hpp" 17 | 18 | #include "types/extern_undefine.hpp" 19 | 20 | MM2_INDEX_BUILD_HELPER_TEMPLATE_CS(MM2_GEOGRAPHIC) 21 | MM2_INDEX_BUILD_HELPER_TEMPLATE_CS(MM2_SPHERICAL_EQUATORIAL) 22 | MM2_INDEX_BUILD_HELPER_TEMPLATE_CS(MM2_CARTESIAN) 23 | -------------------------------------------------------------------------------- /src/library/src/types/io/helper/index_helper.cpp: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2024-2025 Adrian Wöltche 2 | // 3 | // This program is free software: you can redistribute it and/or modify 4 | // it under the terms of the GNU Affero General Public License as 5 | // published by the Free Software Foundation, either version 3 of the 6 | // License, or (at your option) any later version. 7 | // 8 | // This program is distributed in the hope that it will be useful, 9 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 10 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 | // GNU Affero General Public License for more details. 12 | // 13 | // You should have received a copy of the GNU Affero General Public License 14 | // along with this program. If not, see https://www.gnu.org/licenses/. 15 | 16 | #include "types/io/helper/index_helper.hpp" 17 | 18 | #include "types/extern_undefine.hpp" 19 | 20 | MM2_INDEX_HELPER_TEMPLATE_CS(MM2_GEOGRAPHIC) 21 | MM2_INDEX_HELPER_TEMPLATE_CS(MM2_SPHERICAL_EQUATORIAL) 22 | MM2_INDEX_HELPER_TEMPLATE_CS(MM2_CARTESIAN) 23 | 24 | MM2_INDEX_HELPER_READ_ONLY_TEMPLATE_CS(MM2_GEOGRAPHIC) 25 | MM2_INDEX_HELPER_READ_ONLY_TEMPLATE_CS(MM2_SPHERICAL_EQUATORIAL) 26 | MM2_INDEX_HELPER_READ_ONLY_TEMPLATE_CS(MM2_CARTESIAN) 27 | -------------------------------------------------------------------------------- /src/library/src/types/io/helper/osm_handler_helper.cpp: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2024-2025 Adrian Wöltche 2 | // 3 | // This program is free software: you can redistribute it and/or modify 4 | // it under the terms of the GNU Affero General Public License as 5 | // published by the Free Software Foundation, either version 3 of the 6 | // License, or (at your option) any later version. 7 | // 8 | // This program is distributed in the hope that it will be useful, 9 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 10 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 | // GNU Affero General Public License for more details. 12 | // 13 | // You should have received a copy of the GNU Affero General Public License 14 | // along with this program. If not, see https://www.gnu.org/licenses/. 15 | 16 | #include "types/io/helper/osm_handler_helper.hpp" 17 | 18 | #include "types/extern_undefine.hpp" 19 | 20 | MM2_OSM_HANDLER_HELPER_TEMPLATE_CS(MM2_GEOGRAPHIC) 21 | MM2_OSM_HANDLER_HELPER_TEMPLATE_CS(MM2_SPHERICAL_EQUATORIAL) 22 | MM2_OSM_HANDLER_HELPER_TEMPLATE_CS(MM2_CARTESIAN) 23 | -------------------------------------------------------------------------------- /src/library/src/types/io/helper/tag_helper.cpp: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2023-2025 Adrian Wöltche 2 | // 3 | // This program is free software: you can redistribute it and/or modify 4 | // it under the terms of the GNU Affero General Public License as 5 | // published by the Free Software Foundation, either version 3 of the 6 | // License, or (at your option) any later version. 7 | // 8 | // This program is distributed in the hope that it will be useful, 9 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 10 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 | // GNU Affero General Public License for more details. 12 | // 13 | // You should have received a copy of the GNU Affero General Public License 14 | // along with this program. If not, see https://www.gnu.org/licenses/. 15 | 16 | #include "types/io/helper/tag_helper.hpp" 17 | 18 | #include "types/extern_undefine.hpp" 19 | 20 | MM2_EXTERNAL_TAG_HELPER_TEMPLATE(MM2_MMAP_TYPES) 21 | -------------------------------------------------------------------------------- /src/library/src/types/io/memory_mapped/storage/base_storage.cpp: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2023-2025 Adrian Wöltche 2 | // 3 | // This program is free software: you can redistribute it and/or modify 4 | // it under the terms of the GNU Affero General Public License as 5 | // published by the Free Software Foundation, either version 3 of the 6 | // License, or (at your option) any later version. 7 | // 8 | // This program is distributed in the hope that it will be useful, 9 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 10 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 | // GNU Affero General Public License for more details. 12 | // 13 | // You should have received a copy of the GNU Affero General Public License 14 | // along with this program. If not, see https://www.gnu.org/licenses/. 15 | 16 | #include "types/io/memory_mapped/storage/base_storage.hpp" 17 | 18 | #include "types/extern_undefine.hpp" 19 | 20 | MM2_MMAP_BASE_CONTAINER_TEMPLATE(MM2_MMAP_TYPES) 21 | MM2_MMAP_CONTAINER_TEMPLATE(MM2_MMAP_TYPES) 22 | MM2_MMAP_BASE_DATA_TEMPLATE(MM2_MMAP_TYPES) 23 | MM2_MMAP_BASE_TEMPLATE(MM2_MMAP_TYPES) 24 | -------------------------------------------------------------------------------- /src/library/src/types/io/memory_mapped/storage/graph_storage.cpp: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2024-2025 Adrian Wöltche 2 | // 3 | // This program is free software: you can redistribute it and/or modify 4 | // it under the terms of the GNU Affero General Public License as 5 | // published by the Free Software Foundation, either version 3 of the 6 | // License, or (at your option) any later version. 7 | // 8 | // This program is distributed in the hope that it will be useful, 9 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 10 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 | // GNU Affero General Public License for more details. 12 | // 13 | // You should have received a copy of the GNU Affero General Public License 14 | // along with this program. If not, see https://www.gnu.org/licenses/. 15 | 16 | #include "types/io/memory_mapped/storage/graph_storage.hpp" 17 | 18 | #include "types/extern_undefine.hpp" 19 | 20 | MM2_GRAPH_STORAGE_IMPORT_TEMPLATE_CS(MM2_GEOGRAPHIC) 21 | MM2_GRAPH_STORAGE_IMPORT_TEMPLATE_CS(MM2_SPHERICAL_EQUATORIAL) 22 | MM2_GRAPH_STORAGE_IMPORT_TEMPLATE_CS(MM2_CARTESIAN) 23 | 24 | MM2_GRAPH_STORAGE_TEMPLATE_CS(MM2_GEOGRAPHIC) 25 | MM2_GRAPH_STORAGE_TEMPLATE_CS(MM2_SPHERICAL_EQUATORIAL) 26 | MM2_GRAPH_STORAGE_TEMPLATE_CS(MM2_CARTESIAN) 27 | -------------------------------------------------------------------------------- /src/library/src/types/io/memory_mapped/storage/index_build_storage.cpp: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2024-2025 Adrian Wöltche 2 | // 3 | // This program is free software: you can redistribute it and/or modify 4 | // it under the terms of the GNU Affero General Public License as 5 | // published by the Free Software Foundation, either version 3 of the 6 | // License, or (at your option) any later version. 7 | // 8 | // This program is distributed in the hope that it will be useful, 9 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 10 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 | // GNU Affero General Public License for more details. 12 | // 13 | // You should have received a copy of the GNU Affero General Public License 14 | // along with this program. If not, see https://www.gnu.org/licenses/. 15 | 16 | #include "types/io/memory_mapped/storage/index_build_storage.hpp" 17 | 18 | #include "types/extern_undefine.hpp" 19 | 20 | MM2_INDEX_BUILD_STORAGE_TEMPLATE_CS(MM2_GEOGRAPHIC) 21 | MM2_INDEX_BUILD_STORAGE_TEMPLATE_CS(MM2_SPHERICAL_EQUATORIAL) 22 | MM2_INDEX_BUILD_STORAGE_TEMPLATE_CS(MM2_CARTESIAN) 23 | -------------------------------------------------------------------------------- /src/library/src/types/io/memory_mapped/storage/index_storage.cpp: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2024-2025 Adrian Wöltche 2 | // 3 | // This program is free software: you can redistribute it and/or modify 4 | // it under the terms of the GNU Affero General Public License as 5 | // published by the Free Software Foundation, either version 3 of the 6 | // License, or (at your option) any later version. 7 | // 8 | // This program is distributed in the hope that it will be useful, 9 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 10 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 | // GNU Affero General Public License for more details. 12 | // 13 | // You should have received a copy of the GNU Affero General Public License 14 | // along with this program. If not, see https://www.gnu.org/licenses/. 15 | 16 | #include "types/io/memory_mapped/storage/index_storage.hpp" 17 | 18 | #include "types/extern_undefine.hpp" 19 | 20 | MM2_INDEX_STORAGE_TEMPLATE_CS(MM2_GEOGRAPHIC) 21 | MM2_INDEX_STORAGE_TEMPLATE_CS(MM2_SPHERICAL_EQUATORIAL) 22 | MM2_INDEX_STORAGE_TEMPLATE_CS(MM2_CARTESIAN) 23 | -------------------------------------------------------------------------------- /src/library/src/types/io/memory_mapped/storage/osm_handler_storage.cpp: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2024-2025 Adrian Wöltche 2 | // 3 | // This program is free software: you can redistribute it and/or modify 4 | // it under the terms of the GNU Affero General Public License as 5 | // published by the Free Software Foundation, either version 3 of the 6 | // License, or (at your option) any later version. 7 | // 8 | // This program is distributed in the hope that it will be useful, 9 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 10 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 | // GNU Affero General Public License for more details. 12 | // 13 | // You should have received a copy of the GNU Affero General Public License 14 | // along with this program. If not, see https://www.gnu.org/licenses/. 15 | 16 | #include "types/io/memory_mapped/storage/osm_handler_storage.hpp" 17 | 18 | #include "types/extern_undefine.hpp" 19 | 20 | MM2_OSM_HANDLER_STORAGE_TEMPLATE_CS(MM2_GEOGRAPHIC) 21 | MM2_OSM_HANDLER_STORAGE_TEMPLATE_CS(MM2_SPHERICAL_EQUATORIAL) 22 | MM2_OSM_HANDLER_STORAGE_TEMPLATE_CS(MM2_CARTESIAN) 23 | -------------------------------------------------------------------------------- /src/library/src/types/io/memory_mapped/storage/tag_storage.cpp: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2023-2025 Adrian Wöltche 2 | // 3 | // This program is free software: you can redistribute it and/or modify 4 | // it under the terms of the GNU Affero General Public License as 5 | // published by the Free Software Foundation, either version 3 of the 6 | // License, or (at your option) any later version. 7 | // 8 | // This program is distributed in the hope that it will be useful, 9 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 10 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 | // GNU Affero General Public License for more details. 12 | // 13 | // You should have received a copy of the GNU Affero General Public License 14 | // along with this program. If not, see https://www.gnu.org/licenses/. 15 | 16 | #include "types/io/memory_mapped/storage/tag_storage.hpp" 17 | 18 | #include "types/extern_undefine.hpp" 19 | 20 | MM2_TAG_STORAGE_TEMPLATE(MM2_MEMORY_TYPES) 21 | MM2_TAG_STORAGE_TEMPLATE(MM2_MMAP_TYPES) 22 | -------------------------------------------------------------------------------- /src/library/src/types/io/memory_mapped/types.cpp: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2024-2025 Adrian Wöltche 2 | // 3 | // This program is free software: you can redistribute it and/or modify 4 | // it under the terms of the GNU Affero General Public License as 5 | // published by the Free Software Foundation, either version 3 of the 6 | // License, or (at your option) any later version. 7 | // 8 | // This program is distributed in the hope that it will be useful, 9 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 10 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 | // GNU Affero General Public License for more details. 12 | // 13 | // You should have received a copy of the GNU Affero General Public License 14 | // along with this program. If not, see https://www.gnu.org/licenses/. 15 | 16 | #include "types/io/memory_mapped/types.hpp" 17 | 18 | #include "types/extern_undefine.hpp" 19 | 20 | namespace boost::interprocess { 21 | 22 | MM2_INTERPROCESS_TEMPLATES 23 | 24 | } 25 | -------------------------------------------------------------------------------- /src/library/src/types/io/network/arc_node_importer.cpp: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2021-2025 Adrian Wöltche 2 | // 3 | // This program is free software: you can redistribute it and/or modify 4 | // it under the terms of the GNU Affero General Public License as 5 | // published by the Free Software Foundation, either version 3 of the 6 | // License, or (at your option) any later version. 7 | // 8 | // This program is distributed in the hope that it will be useful, 9 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 10 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 | // GNU Affero General Public License for more details. 12 | // 13 | // You should have received a copy of the GNU Affero General Public License 14 | // along with this program. If not, see https://www.gnu.org/licenses/. 15 | 16 | #include "types/io/network/arc_node_importer.hpp" 17 | 18 | #include "types/extern_undefine.hpp" 19 | 20 | MM2_ARC_NODE_IMPORTER_TEMPLATE_CS(MM2_GEOGRAPHIC) 21 | MM2_ARC_NODE_IMPORTER_TEMPLATE_CS(MM2_SPHERICAL_EQUATORIAL) 22 | MM2_ARC_NODE_IMPORTER_TEMPLATE_CS(MM2_CARTESIAN) 23 | -------------------------------------------------------------------------------- /src/library/src/types/io/network/giscup_importer.cpp: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2021-2025 Adrian Wöltche 2 | // 3 | // This program is free software: you can redistribute it and/or modify 4 | // it under the terms of the GNU Affero General Public License as 5 | // published by the Free Software Foundation, either version 3 of the 6 | // License, or (at your option) any later version. 7 | // 8 | // This program is distributed in the hope that it will be useful, 9 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 10 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 | // GNU Affero General Public License for more details. 12 | // 13 | // You should have received a copy of the GNU Affero General Public License 14 | // along with this program. If not, see https://www.gnu.org/licenses/. 15 | 16 | #include "types/io/network/giscup_importer.hpp" 17 | 18 | #include "types/extern_undefine.hpp" 19 | 20 | MM2_GISCUP_IMPORTER_TEMPLATE_CS(MM2_GEOGRAPHIC) 21 | MM2_GISCUP_IMPORTER_TEMPLATE_CS(MM2_SPHERICAL_EQUATORIAL) 22 | MM2_GISCUP_IMPORTER_TEMPLATE_CS(MM2_CARTESIAN) 23 | -------------------------------------------------------------------------------- /src/library/src/types/io/network/melbourne_importer.cpp: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2021-2025 Adrian Wöltche 2 | // 3 | // This program is free software: you can redistribute it and/or modify 4 | // it under the terms of the GNU Affero General Public License as 5 | // published by the Free Software Foundation, either version 3 of the 6 | // License, or (at your option) any later version. 7 | // 8 | // This program is distributed in the hope that it will be useful, 9 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 10 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 | // GNU Affero General Public License for more details. 12 | // 13 | // You should have received a copy of the GNU Affero General Public License 14 | // along with this program. If not, see https://www.gnu.org/licenses/. 15 | 16 | #include "types/io/network/melbourne_importer.hpp" 17 | 18 | #include "types/extern_undefine.hpp" 19 | 20 | MM2_MELBOURNE_IMPORTER_TEMPLATE_CS(MM2_GEOGRAPHIC) 21 | MM2_MELBOURNE_IMPORTER_TEMPLATE_CS(MM2_SPHERICAL_EQUATORIAL) 22 | MM2_MELBOURNE_IMPORTER_TEMPLATE_CS(MM2_CARTESIAN) 23 | -------------------------------------------------------------------------------- /src/library/src/types/io/network/osm_exporter.cpp: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2021-2025 Adrian Wöltche 2 | // 3 | // This program is free software: you can redistribute it and/or modify 4 | // it under the terms of the GNU Affero General Public License as 5 | // published by the Free Software Foundation, either version 3 of the 6 | // License, or (at your option) any later version. 7 | // 8 | // This program is distributed in the hope that it will be useful, 9 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 10 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 | // GNU Affero General Public License for more details. 12 | // 13 | // You should have received a copy of the GNU Affero General Public License 14 | // along with this program. If not, see https://www.gnu.org/licenses/. 15 | 16 | #include "types/io/network/osm_exporter.hpp" 17 | 18 | #include "types/extern_undefine.hpp" 19 | 20 | OSM_EXPORTER_TEMPLATE_CS(MM2_GEOGRAPHIC) 21 | OSM_EXPORTER_TEMPLATE_CS(MM2_SPHERICAL_EQUATORIAL) 22 | OSM_EXPORTER_TEMPLATE_CS(MM2_CARTESIAN) 23 | -------------------------------------------------------------------------------- /src/library/src/types/io/network/osm_handler.cpp: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2020-2025 Adrian Wöltche 2 | // 3 | // This program is free software: you can redistribute it and/or modify 4 | // it under the terms of the GNU Affero General Public License as 5 | // published by the Free Software Foundation, either version 3 of the 6 | // License, or (at your option) any later version. 7 | // 8 | // This program is distributed in the hope that it will be useful, 9 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 10 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 | // GNU Affero General Public License for more details. 12 | // 13 | // You should have received a copy of the GNU Affero General Public License 14 | // along with this program. If not, see https://www.gnu.org/licenses/. 15 | 16 | #include "types/io/network/osm_handler.hpp" 17 | 18 | #include "types/extern_undefine.hpp" 19 | 20 | MM2_OSM_HANDLER_TEMPLATE_CS(MM2_GEOGRAPHIC) 21 | MM2_OSM_HANDLER_TEMPLATE_CS(MM2_SPHERICAL_EQUATORIAL) 22 | MM2_OSM_HANDLER_TEMPLATE_CS(MM2_CARTESIAN) 23 | -------------------------------------------------------------------------------- /src/library/src/types/io/network/osm_importer.cpp: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2020-2025 Adrian Wöltche 2 | // 3 | // This program is free software: you can redistribute it and/or modify 4 | // it under the terms of the GNU Affero General Public License as 5 | // published by the Free Software Foundation, either version 3 of the 6 | // License, or (at your option) any later version. 7 | // 8 | // This program is distributed in the hope that it will be useful, 9 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 10 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 | // GNU Affero General Public License for more details. 12 | // 13 | // You should have received a copy of the GNU Affero General Public License 14 | // along with this program. If not, see https://www.gnu.org/licenses/. 15 | 16 | #include "types/io/network/osm_importer.hpp" 17 | 18 | #include "types/extern_undefine.hpp" 19 | 20 | MM2_OSM_IMPORTER_TEMPLATE_CS(MM2_GEOGRAPHIC) 21 | MM2_OSM_IMPORTER_TEMPLATE_CS(MM2_SPHERICAL_EQUATORIAL) 22 | MM2_OSM_IMPORTER_TEMPLATE_CS(MM2_CARTESIAN) 23 | -------------------------------------------------------------------------------- /src/library/src/types/io/network/seattle_importer.cpp: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2021-2025 Adrian Wöltche 2 | // 3 | // This program is free software: you can redistribute it and/or modify 4 | // it under the terms of the GNU Affero General Public License as 5 | // published by the Free Software Foundation, either version 3 of the 6 | // License, or (at your option) any later version. 7 | // 8 | // This program is distributed in the hope that it will be useful, 9 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 10 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 | // GNU Affero General Public License for more details. 12 | // 13 | // You should have received a copy of the GNU Affero General Public License 14 | // along with this program. If not, see https://www.gnu.org/licenses/. 15 | 16 | #include "types/io/network/seattle_importer.hpp" 17 | 18 | #include "types/extern_undefine.hpp" 19 | 20 | MM2_SEATTLE_IMPORTER_TEMPLATE_CS(MM2_GEOGRAPHIC) 21 | MM2_SEATTLE_IMPORTER_TEMPLATE_CS(MM2_SPHERICAL_EQUATORIAL) 22 | MM2_SEATTLE_IMPORTER_TEMPLATE_CS(MM2_CARTESIAN) 23 | -------------------------------------------------------------------------------- /src/library/src/types/io/track/csv_track_importer.cpp: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2020-2025 Adrian Wöltche 2 | // 3 | // This program is free software: you can redistribute it and/or modify 4 | // it under the terms of the GNU Affero General Public License as 5 | // published by the Free Software Foundation, either version 3 of the 6 | // License, or (at your option) any later version. 7 | // 8 | // This program is distributed in the hope that it will be useful, 9 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 10 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 | // GNU Affero General Public License for more details. 12 | // 13 | // You should have received a copy of the GNU Affero General Public License 14 | // along with this program. If not, see https://www.gnu.org/licenses/. 15 | 16 | #include "types/io/track/csv_track_importer.hpp" 17 | 18 | #include "types/extern_undefine.hpp" 19 | 20 | MM2_CSV_TRACK_IMPORTER_TEMPLATE_CS(MM2_GEOGRAPHIC) 21 | MM2_CSV_TRACK_IMPORTER_TEMPLATE_CS(MM2_SPHERICAL_EQUATORIAL) 22 | MM2_CSV_TRACK_IMPORTER_TEMPLATE_CS(MM2_CARTESIAN) 23 | -------------------------------------------------------------------------------- /src/library/src/types/io/track/edges_list_importer.cpp: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2021-2025 Adrian Wöltche 2 | // 3 | // This program is free software: you can redistribute it and/or modify 4 | // it under the terms of the GNU Affero General Public License as 5 | // published by the Free Software Foundation, either version 3 of the 6 | // License, or (at your option) any later version. 7 | // 8 | // This program is distributed in the hope that it will be useful, 9 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 10 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 | // GNU Affero General Public License for more details. 12 | // 13 | // You should have received a copy of the GNU Affero General Public License 14 | // along with this program. If not, see https://www.gnu.org/licenses/. 15 | 16 | #include "types/io/track/edges_list_importer.hpp" 17 | 18 | #include "types/extern_undefine.hpp" 19 | 20 | MM2_EDGES_LIST_IMPORTER_TEMPLATE_CS(MM2_GEOGRAPHIC) 21 | MM2_EDGES_LIST_IMPORTER_TEMPLATE_CS(MM2_SPHERICAL_EQUATORIAL) 22 | MM2_EDGES_LIST_IMPORTER_TEMPLATE_CS(MM2_CARTESIAN) 23 | -------------------------------------------------------------------------------- /src/library/src/types/io/track/filter/track_regional_filter.cpp: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2024-2025 Adrian Wöltche 2 | // 3 | // This program is free software: you can redistribute it and/or modify 4 | // it under the terms of the GNU Affero General Public License as 5 | // published by the Free Software Foundation, either version 3 of the 6 | // License, or (at your option) any later version. 7 | // 8 | // This program is distributed in the hope that it will be useful, 9 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 10 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 | // GNU Affero General Public License for more details. 12 | // 13 | // You should have received a copy of the GNU Affero General Public License 14 | // along with this program. If not, see https://www.gnu.org/licenses/. 15 | 16 | #include "types/io/track/filter/track_regional_filter.hpp" 17 | 18 | #include "types/extern_undefine.hpp" 19 | 20 | MM2_TRACK_REGIONAL_FILTER_TEMPLATE_CS(MM2_GEOGRAPHIC) 21 | MM2_TRACK_REGIONAL_FILTER_TEMPLATE_CS(MM2_SPHERICAL_EQUATORIAL) 22 | MM2_TRACK_REGIONAL_FILTER_TEMPLATE_CS(MM2_CARTESIAN) 23 | -------------------------------------------------------------------------------- /src/library/src/types/io/track/filter/track_time_splitter.cpp: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2024-2025 Adrian Wöltche 2 | // 3 | // This program is free software: you can redistribute it and/or modify 4 | // it under the terms of the GNU Affero General Public License as 5 | // published by the Free Software Foundation, either version 3 of the 6 | // License, or (at your option) any later version. 7 | // 8 | // This program is distributed in the hope that it will be useful, 9 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 10 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 | // GNU Affero General Public License for more details. 12 | // 13 | // You should have received a copy of the GNU Affero General Public License 14 | // along with this program. If not, see https://www.gnu.org/licenses/. 15 | 16 | #include "types/io/track/filter/track_time_splitter.hpp" 17 | 18 | #include "types/extern_undefine.hpp" 19 | 20 | MM2_TRACK_TIME_SPLITTER_TEMPLATE_CS(MM2_GEOGRAPHIC) 21 | MM2_TRACK_TIME_SPLITTER_TEMPLATE_CS(MM2_SPHERICAL_EQUATORIAL) 22 | MM2_TRACK_TIME_SPLITTER_TEMPLATE_CS(MM2_CARTESIAN) 23 | -------------------------------------------------------------------------------- /src/library/src/types/io/track/gpx_track_importer.cpp: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2021-2025 Adrian Wöltche 2 | // 3 | // This program is free software: you can redistribute it and/or modify 4 | // it under the terms of the GNU Affero General Public License as 5 | // published by the Free Software Foundation, either version 3 of the 6 | // License, or (at your option) any later version. 7 | // 8 | // This program is distributed in the hope that it will be useful, 9 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 10 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 | // GNU Affero General Public License for more details. 12 | // 13 | // You should have received a copy of the GNU Affero General Public License 14 | // along with this program. If not, see https://www.gnu.org/licenses/. 15 | 16 | #include "types/io/track/gpx_track_importer.hpp" 17 | 18 | #include "types/extern_undefine.hpp" 19 | 20 | MM2_GPX_TRACK_IMPORTER_TEMPLATE_CS(MM2_GEOGRAPHIC) 21 | MM2_GPX_TRACK_IMPORTER_TEMPLATE_CS(MM2_SPHERICAL_EQUATORIAL) 22 | MM2_GPX_TRACK_IMPORTER_TEMPLATE_CS(MM2_CARTESIAN) 23 | -------------------------------------------------------------------------------- /src/library/src/types/io/track/input_importer.cpp: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2021-2025 Adrian Wöltche 2 | // 3 | // This program is free software: you can redistribute it and/or modify 4 | // it under the terms of the GNU Affero General Public License as 5 | // published by the Free Software Foundation, either version 3 of the 6 | // License, or (at your option) any later version. 7 | // 8 | // This program is distributed in the hope that it will be useful, 9 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 10 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 | // GNU Affero General Public License for more details. 12 | // 13 | // You should have received a copy of the GNU Affero General Public License 14 | // along with this program. If not, see https://www.gnu.org/licenses/. 15 | 16 | #include "types/io/track/input_importer.hpp" 17 | 18 | #include "types/extern_undefine.hpp" 19 | 20 | MM2_INPUT_IMPORTER_TEMPLATE_CS(MM2_GEOGRAPHIC) 21 | MM2_INPUT_IMPORTER_TEMPLATE_CS(MM2_SPHERICAL_EQUATORIAL) 22 | MM2_INPUT_IMPORTER_TEMPLATE_CS(MM2_CARTESIAN) 23 | -------------------------------------------------------------------------------- /src/library/src/types/learning/algorithms/policy_iteration.cpp: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2020-2025 Adrian Wöltche 2 | // 3 | // This program is free software: you can redistribute it and/or modify 4 | // it under the terms of the GNU Affero General Public License as 5 | // published by the Free Software Foundation, either version 3 of the 6 | // License, or (at your option) any later version. 7 | // 8 | // This program is distributed in the hope that it will be useful, 9 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 10 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 | // GNU Affero General Public License for more details. 12 | // 13 | // You should have received a copy of the GNU Affero General Public License 14 | // along with this program. If not, see https://www.gnu.org/licenses/. 15 | 16 | #include "types/learning/algorithms/policy_iteration.hpp" 17 | 18 | #include "types/extern_undefine.hpp" 19 | 20 | MM2_POLICY_ITERATION_TEMPLATE_CS(MM2_GEOGRAPHIC) 21 | MM2_POLICY_ITERATION_TEMPLATE_CS(MM2_SPHERICAL_EQUATORIAL) 22 | MM2_POLICY_ITERATION_TEMPLATE_CS(MM2_CARTESIAN) 23 | -------------------------------------------------------------------------------- /src/library/src/types/learning/algorithms/q_learning.cpp: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2021-2025 Adrian Wöltche 2 | // 3 | // This program is free software: you can redistribute it and/or modify 4 | // it under the terms of the GNU Affero General Public License as 5 | // published by the Free Software Foundation, either version 3 of the 6 | // License, or (at your option) any later version. 7 | // 8 | // This program is distributed in the hope that it will be useful, 9 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 10 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 | // GNU Affero General Public License for more details. 12 | // 13 | // You should have received a copy of the GNU Affero General Public License 14 | // along with this program. If not, see https://www.gnu.org/licenses/. 15 | 16 | #include "types/learning/algorithms/q_learning.hpp" 17 | 18 | #include "types/extern_undefine.hpp" 19 | 20 | MM2_Q_LEARNING_TEMPLATE_CS(MM2_GEOGRAPHIC) 21 | MM2_Q_LEARNING_TEMPLATE_CS(MM2_SPHERICAL_EQUATORIAL) 22 | MM2_Q_LEARNING_TEMPLATE_CS(MM2_CARTESIAN) 23 | -------------------------------------------------------------------------------- /src/library/src/types/learning/algorithms/value_iteration.cpp: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2020-2025 Adrian Wöltche 2 | // 3 | // This program is free software: you can redistribute it and/or modify 4 | // it under the terms of the GNU Affero General Public License as 5 | // published by the Free Software Foundation, either version 3 of the 6 | // License, or (at your option) any later version. 7 | // 8 | // This program is distributed in the hope that it will be useful, 9 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 10 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 | // GNU Affero General Public License for more details. 12 | // 13 | // You should have received a copy of the GNU Affero General Public License 14 | // along with this program. If not, see https://www.gnu.org/licenses/. 15 | 16 | #include "types/learning/algorithms/value_iteration.hpp" 17 | 18 | #include "types/extern_undefine.hpp" 19 | 20 | MM2_VALUE_ITERATION_TEMPLATE_CS(MM2_GEOGRAPHIC) 21 | MM2_VALUE_ITERATION_TEMPLATE_CS(MM2_SPHERICAL_EQUATORIAL) 22 | MM2_VALUE_ITERATION_TEMPLATE_CS(MM2_CARTESIAN) 23 | -------------------------------------------------------------------------------- /src/library/src/types/learning/algorithms/viterbi.cpp: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2021-2025 Adrian Wöltche 2 | // 3 | // This program is free software: you can redistribute it and/or modify 4 | // it under the terms of the GNU Affero General Public License as 5 | // published by the Free Software Foundation, either version 3 of the 6 | // License, or (at your option) any later version. 7 | // 8 | // This program is distributed in the hope that it will be useful, 9 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 10 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 | // GNU Affero General Public License for more details. 12 | // 13 | // You should have received a copy of the GNU Affero General Public License 14 | // along with this program. If not, see https://www.gnu.org/licenses/. 15 | 16 | #include "types/learning/algorithms/viterbi.hpp" 17 | 18 | #include "types/extern_undefine.hpp" 19 | 20 | MM2_VITERBI_TEMPLATE_CS(MM2_GEOGRAPHIC) 21 | MM2_VITERBI_TEMPLATE_CS(MM2_SPHERICAL_EQUATORIAL) 22 | MM2_VITERBI_TEMPLATE_CS(MM2_CARTESIAN) 23 | -------------------------------------------------------------------------------- /src/library/src/types/matching/algorithm/algorithms.cpp: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2024-2025 Adrian Wöltche 2 | // 3 | // This program is free software: you can redistribute it and/or modify 4 | // it under the terms of the GNU Affero General Public License as 5 | // published by the Free Software Foundation, either version 3 of the 6 | // License, or (at your option) any later version. 7 | // 8 | // This program is distributed in the hope that it will be useful, 9 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 10 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 | // GNU Affero General Public License for more details. 12 | // 13 | // You should have received a copy of the GNU Affero General Public License 14 | // along with this program. If not, see https://www.gnu.org/licenses/. 15 | 16 | #include "types/matching/algorithm/algorithms.hpp" 17 | 18 | #include "types/extern_undefine.hpp" 19 | 20 | MM2_ALGORITHMS_TEMPLATE_CS(MM2_GEOGRAPHIC) 21 | MM2_ALGORITHMS_TEMPLATE_CS(MM2_SPHERICAL_EQUATORIAL) 22 | MM2_ALGORITHMS_TEMPLATE_CS(MM2_CARTESIAN) 23 | -------------------------------------------------------------------------------- /src/library/src/types/matching/algorithm/candidate_search.cpp: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2024-2025 Adrian Wöltche 2 | // 3 | // This program is free software: you can redistribute it and/or modify 4 | // it under the terms of the GNU Affero General Public License as 5 | // published by the Free Software Foundation, either version 3 of the 6 | // License, or (at your option) any later version. 7 | // 8 | // This program is distributed in the hope that it will be useful, 9 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 10 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 | // GNU Affero General Public License for more details. 12 | // 13 | // You should have received a copy of the GNU Affero General Public License 14 | // along with this program. If not, see https://www.gnu.org/licenses/. 15 | 16 | #include "types/matching/algorithm/candidate_search.hpp" 17 | 18 | #include "types/extern_undefine.hpp" 19 | 20 | MM2_CANDIDATE_SEARCHER_TEMPLATE_CS(MM2_GEOGRAPHIC) 21 | MM2_CANDIDATE_SEARCHER_TEMPLATE_CS(MM2_SPHERICAL_EQUATORIAL) 22 | MM2_CANDIDATE_SEARCHER_TEMPLATE_CS(MM2_CARTESIAN) 23 | -------------------------------------------------------------------------------- /src/library/src/types/matching/algorithm/detect.cpp: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2024-2025 Adrian Wöltche 2 | // 3 | // This program is free software: you can redistribute it and/or modify 4 | // it under the terms of the GNU Affero General Public License as 5 | // published by the Free Software Foundation, either version 3 of the 6 | // License, or (at your option) any later version. 7 | // 8 | // This program is distributed in the hope that it will be useful, 9 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 10 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 | // GNU Affero General Public License for more details. 12 | // 13 | // You should have received a copy of the GNU Affero General Public License 14 | // along with this program. If not, see https://www.gnu.org/licenses/. 15 | 16 | #include "types/matching/algorithm/detect.hpp" 17 | 18 | #include "types/extern_undefine.hpp" 19 | 20 | MM2_DETECTOR_TEMPLATE_CS(MM2_GEOGRAPHIC) 21 | MM2_DETECTOR_TEMPLATE_CS(MM2_SPHERICAL_EQUATORIAL) 22 | MM2_DETECTOR_TEMPLATE_CS(MM2_CARTESIAN) 23 | -------------------------------------------------------------------------------- /src/library/src/types/matching/algorithm/route.cpp: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2024-2025 Adrian Wöltche 2 | // 3 | // This program is free software: you can redistribute it and/or modify 4 | // it under the terms of the GNU Affero General Public License as 5 | // published by the Free Software Foundation, either version 3 of the 6 | // License, or (at your option) any later version. 7 | // 8 | // This program is distributed in the hope that it will be useful, 9 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 10 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 | // GNU Affero General Public License for more details. 12 | // 13 | // You should have received a copy of the GNU Affero General Public License 14 | // along with this program. If not, see https://www.gnu.org/licenses/. 15 | 16 | #include "types/matching/algorithm/route.hpp" 17 | 18 | #include "types/extern_undefine.hpp" 19 | 20 | MM2_ROUTER_TEMPLATE_CS(MM2_GEOGRAPHIC) 21 | MM2_ROUTER_TEMPLATE_CS(MM2_SPHERICAL_EQUATORIAL) 22 | MM2_ROUTER_TEMPLATE_CS(MM2_CARTESIAN) 23 | -------------------------------------------------------------------------------- /src/library/src/types/matching/candidate/candidate.cpp: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2024-2025 Adrian Wöltche 2 | // 3 | // This program is free software: you can redistribute it and/or modify 4 | // it under the terms of the GNU Affero General Public License as 5 | // published by the Free Software Foundation, either version 3 of the 6 | // License, or (at your option) any later version. 7 | // 8 | // This program is distributed in the hope that it will be useful, 9 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 10 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 | // GNU Affero General Public License for more details. 12 | // 13 | // You should have received a copy of the GNU Affero General Public License 14 | // along with this program. If not, see https://www.gnu.org/licenses/. 15 | 16 | #include "types/matching/candidate/candidate.hpp" 17 | 18 | #include "types/extern_undefine.hpp" 19 | 20 | MM2_CANDIDATE_TEMPLATE_CS(MM2_GEOGRAPHIC) 21 | MM2_CANDIDATE_TEMPLATE_CS(MM2_SPHERICAL_EQUATORIAL) 22 | MM2_CANDIDATE_TEMPLATE_CS(MM2_CARTESIAN) 23 | -------------------------------------------------------------------------------- /src/library/src/types/matching/candidate/candidate_edge.cpp: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2024-2025 Adrian Wöltche 2 | // 3 | // This program is free software: you can redistribute it and/or modify 4 | // it under the terms of the GNU Affero General Public License as 5 | // published by the Free Software Foundation, either version 3 of the 6 | // License, or (at your option) any later version. 7 | // 8 | // This program is distributed in the hope that it will be useful, 9 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 10 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 | // GNU Affero General Public License for more details. 12 | // 13 | // You should have received a copy of the GNU Affero General Public License 14 | // along with this program. If not, see https://www.gnu.org/licenses/. 15 | 16 | #include "types/matching/candidate/candidate_edge.hpp" 17 | 18 | #include "types/extern_undefine.hpp" 19 | 20 | MM2_CANDIDATE_EDGE_TEMPLATE_CS(MM2_GEOGRAPHIC) 21 | MM2_CANDIDATE_EDGE_TEMPLATE_CS(MM2_SPHERICAL_EQUATORIAL) 22 | MM2_CANDIDATE_EDGE_TEMPLATE_CS(MM2_CARTESIAN) 23 | -------------------------------------------------------------------------------- /src/library/src/types/matching/candidate/candidate_node.cpp: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2024-2025 Adrian Wöltche 2 | // 3 | // This program is free software: you can redistribute it and/or modify 4 | // it under the terms of the GNU Affero General Public License as 5 | // published by the Free Software Foundation, either version 3 of the 6 | // License, or (at your option) any later version. 7 | // 8 | // This program is distributed in the hope that it will be useful, 9 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 10 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 | // GNU Affero General Public License for more details. 12 | // 13 | // You should have received a copy of the GNU Affero General Public License 14 | // along with this program. If not, see https://www.gnu.org/licenses/. 15 | 16 | #include "types/matching/candidate/candidate_node.hpp" 17 | 18 | #include "types/extern_undefine.hpp" 19 | 20 | MM2_CANDIDATE_NODE_TEMPLATE_DISTANCE_TYPE(float) 21 | MM2_CANDIDATE_NODE_TEMPLATE_DISTANCE_TYPE(double) 22 | MM2_CANDIDATE_NODE_TEMPLATE_DISTANCE_TYPE(long double) 23 | -------------------------------------------------------------------------------- /src/library/src/types/matching/matcher.cpp: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2024-2025 Adrian Wöltche 2 | // 3 | // This program is free software: you can redistribute it and/or modify 4 | // it under the terms of the GNU Affero General Public License as 5 | // published by the Free Software Foundation, either version 3 of the 6 | // License, or (at your option) any later version. 7 | // 8 | // This program is distributed in the hope that it will be useful, 9 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 10 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 | // GNU Affero General Public License for more details. 12 | // 13 | // You should have received a copy of the GNU Affero General Public License 14 | // along with this program. If not, see https://www.gnu.org/licenses/. 15 | 16 | #include "types/matching/matcher.hpp" 17 | 18 | #include "types/extern_undefine.hpp" 19 | 20 | MM2_MATCHER_TEMPLATE_CS(MM2_GEOGRAPHIC) 21 | MM2_MATCHER_TEMPLATE_CS(MM2_SPHERICAL_EQUATORIAL) 22 | MM2_MATCHER_TEMPLATE_CS(MM2_CARTESIAN) 23 | -------------------------------------------------------------------------------- /src/library/src/types/matching/matcher/matcher_forwarder.cpp: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2024-2025 Adrian Wöltche 2 | // 3 | // This program is free software: you can redistribute it and/or modify 4 | // it under the terms of the GNU Affero General Public License as 5 | // published by the Free Software Foundation, either version 3 of the 6 | // License, or (at your option) any later version. 7 | // 8 | // This program is distributed in the hope that it will be useful, 9 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 10 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 | // GNU Affero General Public License for more details. 12 | // 13 | // You should have received a copy of the GNU Affero General Public License 14 | // along with this program. If not, see https://www.gnu.org/licenses/. 15 | 16 | #include "types/matching/matcher/matcher_forwarder.hpp" 17 | 18 | #include "types/extern_undefine.hpp" 19 | 20 | MM2_MATCHER_FORWARDER_TEMPLATE_CS(MM2_GEOGRAPHIC) 21 | MM2_MATCHER_FORWARDER_TEMPLATE_CS(MM2_SPHERICAL_EQUATORIAL) 22 | MM2_MATCHER_FORWARDER_TEMPLATE_CS(MM2_CARTESIAN) 23 | -------------------------------------------------------------------------------- /src/library/src/util/checks.cpp: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2025 Adrian Wöltche 2 | // 3 | // This program is free software: you can redistribute it and/or modify 4 | // it under the terms of the GNU Affero General Public License as 5 | // published by the Free Software Foundation, either version 3 of the 6 | // License, or (at your option) any later version. 7 | // 8 | // This program is distributed in the hope that it will be useful, 9 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 10 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 | // GNU Affero General Public License for more details. 12 | // 13 | // You should have received a copy of the GNU Affero General Public License 14 | // along with this program. If not, see https://www.gnu.org/licenses/. 15 | 16 | #include "util/checks.hpp" 17 | 18 | #include 19 | 20 | namespace map_matching_2::util { 21 | 22 | bool is_number(const std::string &str) { 23 | if (not str.empty()) { 24 | for (auto it = std::cbegin(str); it != std::cend(str); ++it) { 25 | const char c = *it; 26 | 27 | if (not std::isdigit(c)) { 28 | return false; 29 | } 30 | } 31 | return true; 32 | } 33 | return false; 34 | } 35 | 36 | } 37 | -------------------------------------------------------------------------------- /src/library/src/util/compiler.cpp: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2024-2025 Adrian Wöltche 2 | // 3 | // This program is free software: you can redistribute it and/or modify 4 | // it under the terms of the GNU Affero General Public License as 5 | // published by the Free Software Foundation, either version 3 of the 6 | // License, or (at your option) any later version. 7 | // 8 | // This program is distributed in the hope that it will be useful, 9 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 10 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 | // GNU Affero General Public License for more details. 12 | // 13 | // You should have received a copy of the GNU Affero General Public License 14 | // along with this program. If not, see https://www.gnu.org/licenses/. 15 | 16 | #include "util/compiler.hpp" 17 | 18 | namespace map_matching_2::util { 19 | 20 | std::string get_compiler_info() { 21 | std::string result; 22 | #ifdef __clang__ 23 | result.append("Clang version ") 24 | .append(std::to_string(__clang_major__)).append(".") 25 | .append(std::to_string(__clang_minor__)).append(".") 26 | .append(std::to_string(__clang_patchlevel__)); 27 | #elif __GNUC__ 28 | result.append("GCC version ") 29 | .append(std::to_string(__GNUC__)).append(".") 30 | .append(std::to_string(__GNUC_MINOR__)).append(".") 31 | .append(std::to_string(__GNUC_PATCHLEVEL__)); 32 | #elif _MSC_VER 33 | result.append("MSVC version ").append(std::to_string(_MSC_VER)); 34 | #else 35 | result.append("Unknown compiler"); 36 | #endif 37 | return result; 38 | } 39 | 40 | } 41 | -------------------------------------------------------------------------------- /src/library/src/util/time_helper.cpp: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2024-2025 Adrian Wöltche 2 | // 3 | // This program is free software: you can redistribute it and/or modify 4 | // it under the terms of the GNU Affero General Public License as 5 | // published by the Free Software Foundation, either version 3 of the 6 | // License, or (at your option) any later version. 7 | // 8 | // This program is distributed in the hope that it will be useful, 9 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 10 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 | // GNU Affero General Public License for more details. 12 | // 13 | // You should have received a copy of the GNU Affero General Public License 14 | // along with this program. If not, see https://www.gnu.org/licenses/. 15 | 16 | #include "util/time_helper.hpp" 17 | 18 | namespace map_matching_2::util { 19 | 20 | 21 | time_helper::time_helper() 22 | : time_helper{duration_type::zero()} {} 23 | 24 | time_helper::time_helper(const double max_time) 25 | : time_helper{duration_type{max_time}} {} 26 | 27 | time_helper::time_helper(const duration_type max_duration) 28 | : _start{clock_type::now()}, _max_duration{max_duration} { 29 | _current = _start; 30 | } 31 | 32 | const time_helper::time_point_type &time_helper::update() { 33 | if (not _has_reached) { 34 | _current = clock_type::now(); 35 | } 36 | return _current; 37 | } 38 | 39 | bool time_helper::update_and_has_reached() { 40 | if (not _has_reached) { 41 | update(); 42 | } 43 | return reached_max_duration(); 44 | } 45 | 46 | } 47 | -------------------------------------------------------------------------------- /src/library/src/util/version.cpp.in: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2024 Adrian Wöltche 2 | // 3 | // This program is free software: you can redistribute it and/or modify 4 | // it under the terms of the GNU Affero General Public License as 5 | // published by the Free Software Foundation, either version 3 of the 6 | // License, or (at your option) any later version. 7 | // 8 | // This program is distributed in the hope that it will be useful, 9 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 10 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 | // GNU Affero General Public License for more details. 12 | // 13 | // You should have received a copy of the GNU Affero General Public License 14 | // along with this program. If not, see https://www.gnu.org/licenses/. 15 | 16 | #include "util/version.hpp" 17 | 18 | namespace map_matching_2::util { 19 | 20 | const std::string version() { 21 | return "@PROJECT_VERSION@"; 22 | } 23 | 24 | } 25 | -------------------------------------------------------------------------------- /src/main.cpp: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2022-2025 Adrian Wöltche 2 | // 3 | // This program is free software: you can redistribute it and/or modify 4 | // it under the terms of the GNU Affero General Public License as 5 | // published by the Free Software Foundation, either version 3 of the 6 | // License, or (at your option) any later version. 7 | // 8 | // This program is distributed in the hope that it will be useful, 9 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 10 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 | // GNU Affero General Public License for more details. 12 | // 13 | // You should have received a copy of the GNU Affero General Public License 14 | // along with this program. If not, see https://www.gnu.org/licenses/. 15 | 16 | #ifdef MM2_ENABLE_RPMALLOC 17 | #include 18 | #endif 19 | 20 | #include "app/mode.hpp" 21 | 22 | int main(int argc, char *argv[]) { 23 | #ifdef MM2_ENABLE_RPMALLOC 24 | rpmalloc_linker_reference(); 25 | #endif 26 | return map_matching_2::app::mode(argc, argv); 27 | } 28 | -------------------------------------------------------------------------------- /tests/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | set(Boost_USE_STATIC_LIBS ON) 2 | set(Boost_USE_MULTITHREADED ON) 3 | if (MSVC) 4 | if (USE_STATIC_MSVC_RUNTIME_LIBRARY) 5 | set(Boost_USE_STATIC_RUNTIME ON) 6 | endif () 7 | endif () 8 | 9 | find_package(Boost REQUIRED COMPONENTS unit_test_framework) 10 | 11 | add_executable(map_matching_2_tests) 12 | 13 | include(CheckCXXCompilerFlag) 14 | check_cxx_compiler_flag("-Wno-deprecated-declarations" _deprecated_declarations) 15 | if (_deprecated_declarations) 16 | target_compile_options(map_matching_2_tests 17 | PRIVATE 18 | -Wno-deprecated-declarations) 19 | message(STATUS "Disabled deprecation warning for tests") 20 | endif () 21 | 22 | target_sources(map_matching_2_tests 23 | PRIVATE 24 | compare_tests.cpp 25 | concept_inheritance.cpp 26 | graph_algorithm_tests.cpp 27 | graph_tests.cpp 28 | matcher_tests.cpp 29 | memory_mapped_index_tests.cpp 30 | memory_mapped_tests.cpp 31 | memory_mapped_wrapper_tests.cpp 32 | model_algorithm_tests.cpp 33 | model_tests.cpp 34 | network_tests.cpp 35 | route_tests.cpp 36 | serialization_tests.cpp 37 | util_tests.cpp 38 | ) 39 | 40 | target_compile_definitions(map_matching_2_tests 41 | PRIVATE 42 | BOOST_GEOMETRY_INDEX_DETAIL_EXPERIMENTAL) 43 | 44 | target_link_libraries(map_matching_2_tests 45 | PRIVATE 46 | library 47 | Boost::unit_test_framework) 48 | 49 | if (MSVC) 50 | add_custom_command(TARGET map_matching_2_tests POST_BUILD 51 | COMMAND ${CMAKE_COMMAND} -E copy -t $ $ 52 | COMMAND_EXPAND_LISTS) 53 | endif () 54 | -------------------------------------------------------------------------------- /tests/helper/cache_fixture.hpp: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2024-2025 Adrian Wöltche 2 | // 3 | // This program is free software: you can redistribute it and/or modify 4 | // it under the terms of the GNU Affero General Public License as 5 | // published by the Free Software Foundation, either version 3 of the 6 | // License, or (at your option) any later version. 7 | // 8 | // This program is distributed in the hope that it will be useful, 9 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 10 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 | // GNU Affero General Public License for more details. 12 | // 13 | // You should have received a copy of the GNU Affero General Public License 14 | // along with this program. If not, see https://www.gnu.org/licenses/. 15 | 16 | #ifndef MAP_MATCHING_2_TESTS_HELPER_CACHE_FIXTURE_HPP 17 | #define MAP_MATCHING_2_TESTS_HELPER_CACHE_FIXTURE_HPP 18 | 19 | #include "geometry/cache.hpp" 20 | 21 | struct cache_fixture { 22 | 23 | cache_fixture() { 24 | map_matching_2::geometry::enable_cache(); 25 | } 26 | 27 | ~cache_fixture() = default; 28 | 29 | }; 30 | 31 | #endif //MAP_MATCHING_2_TESTS_HELPER_CACHE_FIXTURE_HPP 32 | --------------------------------------------------------------------------------