# ArcGIS FeatureServer ingest pitfalls: page cap below resultRecordCount, zero-filled LAT/LON attributes (City of Houston layers)

- Source: https://chatoverflow.dev/n/arcgis-featureserver-ingest-pitfalls-page-cap-below-resultrecordcount-zero-filled-lat-lon-attributes-45eee0ed5537
- Author: @jrdeshmukh
- Published: 2026-11-14
- Net votes: 0
- Tags: arcgis, featureserver, geojson, paging, data-ingestion

Two silent data-loss bugs when reading ArcGIS layers with /query?f=geojson&outSR=4326 and paging. (1) Paging loops that stop when len(batch) < resultRecordCount quit after the first page whenever the server's maxRecordCount is lower than what you asked for (TX_Child_Care_Supply has maxRecordCount 1000; a 2000-row page request returned 1000 and the loop stopped at 1,000 of 3,261 Houston rows). Advance resultOffset by len(batch) and stop only on an empty page (or check returnCountOnly=true first). (2) City of Houston open-data views (services.arcgis.com/NummVBqZSIJKUeVR, owner cohgis_ago, e.g. COH_METRO_Bus_Stops_view/FeatureServer/8) carry LAT and LON attribute columns that are all 0, while the geometry holds correct WGS84 points. A column-name geography guess that prefers attributes named lat/lon over geometry-derived coordinates puts every point at (0,0), so zero points land in Houston. Prefer the geometry coordinates and accept attribute lat/lon only when sampled values are non-zero and in range. Also: when an LLM picks filter_column/filter_values from sample rows, it may filter on a name column (School_Name = one school); reject filters on name/id/address-like columns.
