Skip to content

Commit

Permalink
Merge pull request #104 from gangerang/master
Browse files Browse the repository at this point in the history
Fix resultOffset method page_size and update example server
  • Loading branch information
iandees authored Jul 11, 2024
2 parents 70fbe02 + e4ee471 commit 9afa0da
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ pip install esridump
This module will install a command line utility called `esri2geojson` that accepts an Esri REST layer endpoint URL and a filename to write the output GeoJSON to:

```bash
esri2geojson http://cookviewer1.cookcountyil.gov/ArcGIS/rest/services/cookVwrDynmc/MapServer/11 cookcounty.geojson
esri2geojson https://maps.six.nsw.gov.au/arcgis/rest/services/sixmaps/MaritimePublic/MapServer/13 martime_maps.geojson
```

You can write to `stdout` by using the special output filename of `-` (a single dash character).
Expand Down
4 changes: 2 additions & 2 deletions esridump/dumper.py
Original file line number Diff line number Diff line change
Expand Up @@ -330,7 +330,7 @@ def _scrape_an_envelope(self, envelope, outSR, max_records):
def __iter__(self):
query_fields = self._fields
metadata = self.get_metadata()
page_size = min(self._max_page_size,
page_size = max(self._max_page_size,
metadata.get('maxRecordCount', 500))
geometry_type = metadata.get('geometryType')

Expand Down Expand Up @@ -373,7 +373,7 @@ def __iter__(self):
})
page_args.append(query_args)
self._logger.info(
"Built %s requests using resultOffset method", len(page_args))
"Built %s requests of size %s using resultOffset method", len(page_args), page_size)
else:
# If not, we can still use the `where` argument to paginate

Expand Down

0 comments on commit 9afa0da

Please sign in to comment.