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 #1

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

donaldte
Copy link
Owner

@donaldte donaldte commented Mar 7, 2024

PR Description

hotosm#204
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 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 purpose of this PR is to enhance the functionality and maintainability of boundary processing within the BaseMapper class. By introducing reusable methods and comprehensive unit tests, the codebase becomes more modular, readable, and reliable.

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