Skip to content

fix: update batch/export to use current Area API#113

Open
Baho73 wants to merge 1 commit intorendrom:masterfrom
Baho73:fix/batch-processing-broken-api
Open

fix: update batch/export to use current Area API#113
Baho73 wants to merge 1 commit intorendrom:masterfrom
Baho73:fix/batch-processing-broken-api

Conversation

@Baho73
Copy link
Copy Markdown

@Baho73 Baho73 commented Feb 18, 2026

Summary

Fixes batch processing and export functions that broke after the Area API was refactored in v5.0.0.

Changes:

  • batch.py: replace removed area.get_coord() with area.feature check
  • export.py: replace to_geojson_poly(with_attrs, dumps=False) with to_geojson(dumps=False) — the old call caused TypeError: got multiple values for argument 'dumps'
  • export.py: update _write_csv_row to extract coordinates and attributes from area.feature instead of removed get_coord() and attrs
  • console.py: replace deprecated to_geojson_poly() with to_geojson()

Fixes #100

Root cause

In v5.0.0 the Area class was refactored:

  • get_coord() was removed (geometry is now in area.feature)
  • to_geojson_poly() signature changed to (self, dumps=True) only
  • area.attrs was removed (properties are now in area.feature["properties"])

But batch.py, export.py, and console.py were not updated to match.

Test plan

  • rosreestr2coord -l list.txt processes batch files without errors
  • GeoJSON output is generated correctly
  • CSV output includes coordinates and properties
  • Single code processing still works: rosreestr2coord -c "77:01:0001:123"

- batch.py: replace removed `area.get_coord()` with `area.feature` check
- export.py: replace `to_geojson_poly(with_attrs, dumps=False)` with
  `to_geojson(dumps=False)` (old signature caused TypeError)
- export.py: update `_write_csv_row` to extract coords/attrs from
  `area.feature` instead of removed `get_coord()`/`attrs`
- console.py: replace `to_geojson_poly()` with `to_geojson()`

These methods were removed in v5.0.0 but callers were not updated.

Fixes rendrom#100

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
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.

Ошибка при пакетной обработке из файла (v5.1.0)

1 participant