feat: paginate AMS API + default to grid sampling (#157) - #158
Merged
Merged
Conversation
The Amsterdam panorama API paginates (~25/page); _get_raw_pids read only the first page, so dense areas were massively under-collected (a test point reports 650 panos but returned 25). Follow _links.next to collect all pages — verified 25 -> 650 at one point. Also default download_svi to grid sampling (grid=True, grid_size=50) instead of the OSM street network: benchmarking showed street sampling is 3-25x slower and erratic (Overpass) with poor recall (street(drive) ~30% at 250m). grid=False remains available. Adds no-network unit tests. Minor version bump to 1.7.0. Closes #157 Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
koito19960406
force-pushed
the
feat/ams-grid-pagination
branch
from
July 1, 2026 07:54
b3bf639 to
3f16f73
Compare
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.
Summary
Two changes to
AMSDownloader, both backed by the grid-vs-OSM benchmark:_get_raw_pids— the Amsterdam panorama API returns ~25 results/page with a_links.nextlink; the old code took only the first page. Now followsnextto collect all pages. Live-verified: a dense query goes from 25 → 650 panos. This is the dominant AMS coverage lever.grid=True,grid_size=50) instead of OSM street-network — grid sampling is constant ~3 s vs Overpass's variable 7–83 s, andstreet(drive)only reached 30% recall for AMS at 250 m.grid=Falsestays available.Verification (local)
tests/test_ams_pagination.py(no-network): pagination followsnext, stops on empty page, and the grid defaults are asserted — 3 passed._get_raw_pidsreturns 650 panos (was 25) at a dense Amsterdam point.Minor version bump to 1.7.0.
Closes #157
🤖 Generated with Claude Code