Skip to content

feat(esri): page by OBJECTID range when the layer asks for it - #8

Merged
MiniCodeMonkey merged 1 commit into
masterfrom
feat/esri-oid-paging
Oct 23, 2026
Merged

MiniCodeMonkey merged 1 commit into
masterfrom
feat/esri-oid-paging

Conversation

@MiniCodeMonkey

Copy link
Copy Markdown
Member

A layer can now ask for OBJECTID-range paging with "request": {"paginate": "oid"}. batch-machine passes that to EsriDumper as paginate_oid, and pyesridump then pages with OBJECTID > a AND OBJECTID <= b where clauses instead of resultOffset. No ticket; this unblocks the Ohio and New Jersey statewide parcels in ChopChop.


Changes

  • openaddr/cache.py: EsriRestDownloadTask.download() reads request.paginate from the layer and passes paginate_oid to EsriDumper.
  • openaddr/tests/cache.py: tests that "paginate": "oid" reaches the dumper, and that layers without it keep offset paging.

Decisions

  • Opt-in per layer, not automatic above a row count. Offset paging works for most sources, and OBJECTID ranges can mean many empty pages when ids are sparse, so only layers that need it change.
  • The setting sits under request, next to headers, which is the existing place for per-layer download options.

Review notes

Why it is needed: Ohio's hosted statewide parcels view (6.3M features) fails with "Cannot perform query. Invalid query parameters" at offsets past about 1.4M, and offset pages ran at about 27 features/s. OBJECTID > 2734000 AND OBJECTID <= 2735000 on the same service returns 1,000 features in about a second. pyesridump already falls back from statistics to returnIdsOnly to geometry queries when a server cannot do min/max.

https://claude.ai/code/session_01Qfy2CDLqR5FowD3b6rWkk8

A layer with request.paginate set to "oid" passes paginate_oid to
EsriDumper, so it pages with OBJECTID where clauses instead of
resultOffset. Hosted services fail or crawl at deep offsets (Ohio's
statewide parcels fail past about 1.4M), while an OBJECTID range
answers in about a second at the same depth. Layers without the
setting keep offset paging.

Claude-Session: https://claude.ai/code/session_01Qfy2CDLqR5FowD3b6rWkk8
@MiniCodeMonkey
MiniCodeMonkey merged commit 1bc0a5b into master Oct 23, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant