Skip to content

Update split_by_square dependency from fmtm-splitter to area-splitter - #820

Open
kygia wants to merge 5 commits into
hotosm:devfrom
kygia:dev
Open

Update split_by_square dependency from fmtm-splitter to area-splitter#820
kygia wants to merge 5 commits into
hotosm:devfrom
kygia:dev

Conversation

@kygia

@kygia kygia commented May 23, 2026

Copy link
Copy Markdown

What type of PR is this? (check all applicable)

  • 🍕 Feature
  • 🐛 Bug Fix
  • 📝 Documentation
  • 🧑‍💻 Refactor
  • ✅ Test
  • 🤖 Build or CI
  • ❓ Other (please specify)

Related Issue

Fixes #759

Describe this PR

Replaces fmtm-splitter with area-splitter, uses PostGIS SQL and requires a DB connection instead of pure python. Updated call site and mocked _area_split_by_square in tests accordingly.

AI Tool Usage

  • No AI tools were used
  • AI tools were used (complete below)

If AI-assisted:

  • Tool(s) used: Opus 4.6
  • What was generated: dependency update suggestions, initial scaffolding for test mocks
  • What you reviewed and changed:verified call signatures, confirmed db requirements, confirmed test coverage

Screenshots

If applicable.

Alternative Approaches Considered

Did you consider other approaches? Why this one?

Review Guide

Core change is in the split_by_square call site, verify the psycopg connection is passed correctly. Test mock _area_split_by_square to avoid a live DB dependency

Checklist

  • I have read the Contributing Guide
  • I have read the Code of Conduct
  • PR is focused and small
  • Tests are included or updated
  • I understand all code in this PR and can answer questions about it
  • No secrets, credentials, or sensitive data are included
  • Commit messages are descriptive
  • Related docs and screenshots are updated

[optional] What gif best describes this PR or how it makes you feel?

@github-actions

github-actions Bot commented May 23, 2026

Copy link
Copy Markdown
Contributor

All contributors have signed the CLA ✍️ ✅
Posted by the CLA Assistant Lite bot.

@github-actions github-actions Bot added the backend Related to backend code label May 23, 2026
@kygia

kygia commented May 23, 2026

Copy link
Copy Markdown
Author

I have read the CONTRIBUTING.md document and I hereby sign and agree with the guidelines

github-actions Bot added a commit that referenced this pull request May 23, 2026
  Signed-off-by: kygia <hi@kygiaha.com>

@spwoodcock spwoodcock left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi! Thanks so much for taking the time 😃

The objective of replacing the current splitter was to remove the shapely dependency and rely on the PostGIS implementation.

Without shapely being replaced there is very little value to this change.

Do you have any thoughts on how the no-fly zone logic could be replaced at the same time? (we need to handle splitting by square, but with the no fly zones omitted).

Thanks again 🙏

@spwoodcock

Copy link
Copy Markdown
Member

Also, sorry, I realised I commented a month ago that adding no fly zone handling may be out of scope.

But looking into the changes in the PR and actually seeing the code, it's become clearer to me that without handling this, then the change is probably actually a regression rather than an improvement (increased complexity with little gain) 😄

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backend Related to backend code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Integrate the Field-TM area-splitter module for the split-by-square functionality

2 participants