Skip to content

feat(territories): import territory areas from KML or GeoJSON #573

Open

Description

@mindsers

Why

Congregations that keep their territories as areas in another tool can export them, usually as KML or GeoJSON. Without an import, switching to Unitae means redrawing every territory by hand, which takes hours for a congregation with 100 territories.

What we want

A manager brings in a KML or GeoJSON file and gets one territory per area, with its number and name when the file carries them. He sees what will be created and confirms first.

Done when

  • A manager with the right to manage territories can import a KML or GeoJSON file of areas.
  • Each area becomes a territory with its area (feat(territories): territories drawn as an area on the map #110), and with its number, name and type when the file provides them or the manager picks them.
  • A preview shows what will be created, what was skipped and why (not a polygon, outside the congregation's perimeter, overlapping an existing area), before anything is saved.
  • Importing the same file twice doesn't create duplicates.
  • The file is processed by the app and not kept after the import.
  • It's covered by tests with sample files, as described in the testing guide.

Out of scope

  • Exporting areas.
  • Assignment history from the other tool.

To settle in this issue before coding

Where to look

New to the project? Start with CONTRIBUTING.md and the development setup.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions