Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Add support for BytesIO input in boundary processing #233

Closed
wants to merge 2 commits into from
Closed

feat: Add support for BytesIO input in boundary processing #233

wants to merge 2 commits into from

Conversation

donaldte
Copy link

@donaldte donaldte commented Mar 7, 2024

PR Description

This PR enhances the boundary processing functionality within the BaseMapper class by introducing the extract_bbox() method. This method facilitates the extraction of bounding boxes from both file inputs (JSON or GeoJSON) and BytesIO objects.. Additionally, the makeBbox() method has been refactored to compute bounding boxes, enhancing the functionality of boundary extraction. A new unit test, test_create_with_byteio(), has been implemented to verify the correctness of boundary processing when provided with BytesIO input.

Changes Made

  • Added extract_bbox() method to BaseMapper class to handle boundary processing logic and for code reusability.
  • Refactored makeBbox() method to compute bounding boxes for boundary extraction.
  • Implemented test_create_with_byteio() unit test to verify boundary processing with BytesIO input.
  • Updated documentation and comments for clarity and accuracy.

Purpose

The primary purpose of this PR is to enable BytesIO input for boundary processing within the BaseMapper class and enhance testing capabilities accordingly. By allowing BytesIO input, users can provide boundary data in-memory, increasing flexibility in data handling. Additionally, the inclusion of a dedicated unit test ensures that boundary processing with BytesIO input is validated, contributing to the overall reliability and robustness of the codebase.

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.

1 participant