Skip to content

v0.4.0

Latest

Choose a tag to compare

@stiles stiles released this 06 Sep 18:05
· 1 commit to main since this release
cc559db

Fixed

  • --where sent as None: omitting --where passed None through to the query, which requests drops, so the request went out with no where clause at all and some servers rejected it. The CLI and library now default to 1=1.
  • --geometry did not work: the CLI parsed GeoJSON into a dict and passed it straight into the query parameters. Esri expects Esri JSON (rings, paths) as a string, and geometryType was hardcoded to polygon. GeoJSON is now converted to Esri JSON, with the geometry type inferred and ring winding corrected. Points, multipoints, linestrings, multilinestrings, polygons, multipolygons, Features and FeatureCollections are all accepted.
  • spatial_rel ignored for bounding boxes: the bbox branch hardcoded esriSpatialRelIntersects.
  • Bulk export could not be filtered: bulk_export called extract_layer with no filter pass-through, so bulk-fetch was all-or-nothing.
  • NDJSON export produced invalid JSON: NaN was written literally, which strict parsers reject, and timestamps could not be serialized at all. Both are now written as null and ISO-8601 respectively.

Added

  • Coded-value domain decoding, on by default. Esri layers routinely store a status as 3 with a domain that maps 3 to "Under construction", so every export previously needed a manual join back to the layer metadata before it was usable. Labels now replace codes, including per-subtype domain overrides where the same code means different things depending on the subtype. Codes with no matching label are left as-is and reported rather than blanked out. Use --raw-codes to opt out.
  • Date field parsing, on by default. Esri returns dates as epoch milliseconds, so a filing date arrived as 1735689600000. Date fields now become tz-aware UTC timestamps, and ISO string responses are handled too. Use --raw-dates to opt out.
  • get_codebook(), an ezesri codebook command, a --codebook option on fetch and --codebooks on bulk-fetch, which record every coded value and date field so the original codes stay recoverable alongside a decoded export.
  • decode_dataframe() and build_codebook() are exported for callers who fetch data themselves.
  • get_count() and a matching ezesri count command, which report how many features match a query without downloading them. Both take the same filters as fetch.
  • out_sr on extract_layer and bulk_export, plus --out-sr on fetch and bulk-fetch, for requesting output in a spatial reference other than WGS84. This was documented in the README and API docs but had never been implemented.
  • --where, --bbox, --geometry and --spatial-rel on bulk-fetch.
  • A pyproject.toml replacing setup.py.

Changed

  • Breaking: domain decoding and date parsing are on by default, so existing scripts will see labels where they previously saw codes, and timestamps where they previously saw epoch milliseconds. Anything downstream that parses those columns itself needs either updating or --raw-codes / --raw-dates (decode_domains=False / parse_dates=False in the library). This is the most disruptive change in the release.
  • Breaking: removed the --srs alias for --spatial-rel. It read as "spatial reference system" to anyone familiar with GIS, which is what --out-sr now actually does. Use --spatial-rel for the spatial relationship.
  • Corrected the package author metadata, which named the wrong person.
  • Raised requires-python from >=3.6 to >=3.9, matching what the dependencies actually support.
  • Added ezesri.__version__ and ezesri --version, both read from the installed package metadata so they cannot drift from pyproject.toml.
  • outSR is threaded through the adaptive batch fetcher added in 0.3.5, so --out-sr applies to every request rather than being overridden back to 4326.