fix: update batch/export to use current Area API#113
Open
Baho73 wants to merge 1 commit intorendrom:masterfrom
Open
fix: update batch/export to use current Area API#113Baho73 wants to merge 1 commit intorendrom:masterfrom
Baho73 wants to merge 1 commit intorendrom:masterfrom
Conversation
- 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>
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
Fixes batch processing and export functions that broke after the Area API was refactored in v5.0.0.
Changes:
batch.py: replace removedarea.get_coord()witharea.featurecheckexport.py: replaceto_geojson_poly(with_attrs, dumps=False)withto_geojson(dumps=False)— the old call causedTypeError: got multiple values for argument 'dumps'export.py: update_write_csv_rowto extract coordinates and attributes fromarea.featureinstead of removedget_coord()andattrsconsole.py: replace deprecatedto_geojson_poly()withto_geojson()Fixes #100
Root cause
In v5.0.0 the
Areaclass was refactored:get_coord()was removed (geometry is now inarea.feature)to_geojson_poly()signature changed to(self, dumps=True)onlyarea.attrswas removed (properties are now inarea.feature["properties"])But
batch.py,export.py, andconsole.pywere not updated to match.Test plan
rosreestr2coord -l list.txtprocesses batch files without errorsrosreestr2coord -c "77:01:0001:123"