Fix ESRIGeoJSON: handle Empty reply from server and paginate past maxRecordCount#52
Open
Fix ESRIGeoJSON: handle Empty reply from server and paginate past maxRecordCount#52
Conversation
GDAL's curl-based fetcher fails with "Empty reply from server" against some ArcGIS endpoints (e.g. Cloudflare-fronted servers that only offer HTTPS 1.1). Fetch remote URLs with Ruby's open-uri and hand ogr2ogr a local tempfile instead. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
ArcGIS query endpoints truncate each response at the service's maxRecordCount (commonly 1000 or 2000 features) and set exceededTransferLimit when more results exist. Walk the pages with resultOffset and merge them into a single FeatureCollection before handing to ogr2ogr. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
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
ESRIGeoJSONpassed remote URLs straight toogr2ogr, which uses GDAL's curl client. Some ArcGIS-on-IIS endpoints return an empty reply to that client (likely an HTTPS 1.1 negotiation issue — GDAL's driver list hints at this withMapInfo File' needs https 1.1), producingERROR 1: Empty reply from server. Fix: fetch the URL with Ruby's `open-uri` into a tempfile, then run `ogr2ogr` on the local path.Test plan
🤖 Generated with Claude Code