fix geom_component._region_data()
#1091
Merged
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.
Issue addressed
Fixes #1079
Explanation
My steps:
geom_component._region_data()
, since calling that property shows the current bug (fails withIndexError: index 1 is out of bounds for axis 0 with size 1
)total_bounds
(was calling over the wrong dimension)box() missing 3 required positional arguments: 'miny', 'maxx', and 'maxy'
one line below*
to expand thetotal_bounds
argument form a tuple into four separate argumentsshapely.errors.GeometryTypeError: Unknown geometry type: 'featurecollection'
>> solved by generating the geodataframe like intest_model_set_geoms
, but I have no clue if this results in the expected type/format. At least it works, but please check thisGeneral Checklist
main
geom_component._region_data()
(fixgeom_component._region_data()
#1091)"Data/Catalog checklist
data/catalogs/predefined_catalogs.yml
has not been modified.data_catalog.yml
files have been chagneddata/chagnelog.rst
has been updatedLF
line endings (done automatically if you usedupdate_versions.py
)