Add OSM road benchmark (pyogrio / Geofabrik extracts) - #76
Closed
tomalrussell wants to merge 1 commit into
Closed
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Motivation
pyrosmusage by reading the GDAL OSMlineslayer viapyogrioto be robust in different environments..benchmark-dataand exclude them from measured intervals to ensure repeatable timings.Description
benchmarks/benchmark_osm_roads.py, which downloads Geofabrik extracts, reads highway ways viageopandas+pyogrio, and times four steps: reading highway ways, creating endpoint nodes, assigning IDs, and assigning topology IDs, and supportsalland--outputfor JSON reports..benchmark-dataand add.benchmark-data/to.gitignore.pyrosm-based approach withread_highway_waysthat filters GDALlinesforhighway IS NOT NULLand sanitises geometries.benchmarks/README.mddocumenting how to run the benchmark and add thebenchmarkoptional dependency (pyogrio>=0.7) topyproject.toml.Testing
benchmarks/benchmark_osm_roads.pycompiles withpython -m py_compileand passesruffformatting and lint checks.pyogrio.list_drivers()on the environment used for testing.read_highway_waysreplacement and validated expectededges/nodescounts and that timing fieldsread_highway_ways,create_endpoint_nodes,add_ids, andadd_topology_idsare present.23 passed, 1 skipped, 1 failed; the single failure is unrelated to the benchmark and is caused by the optionalnetworkxpackage not being installed in the test environment.Codex Task