Skip to content

Support Polygon Boundary Selection for Land Registration via Map Interface #359

@onlydustapp

Description

@onlydustapp

📚 Overview

This feature enhances the Land Registry system by allowing users to register land using polygon boundaries rather than a single coordinate. The update will improve realism and verification against real-world land boundaries.

🔍 Background

Currently, the Land Registry smart contract uses the Location struct that supports only a single latitude/longitude pair, which is insufficient for representing actual land boundaries. With this update, users will be able to select multiple points on a map to form polygon boundaries. This effort will involve modifications to the smart contract, frontend UI, validation logic, and tests.

🛠️ Requirements & Tasks

  1. Smart Contract Updates:

    • Refactor the Location data structure to support a list of coordinates (Polygon) with a minimum of 3 points.
    • Introduce new structs as proposed:
      • Coordinate with latitude and longitude.
      • Polygon containing an array of Coordinate.
    • Update contract events, functions, and data indexing logic to work with the new structure.
    • Implement validations ensuring the submitted coordinates form a closed polygon.
  2. Frontend Updates:

    • Update the map interface to allow users to select multiple points for defining land boundaries.
    • Ensure the UI guides users to select at least 3 coordinates for a valid polygon.
  3. Testing:

    • Update or create new tests to validate the new registration flow with polygon boundaries.
  4. Migration/Backward Compatibility (if needed):

    • Provide logic to handle or migrate existing land records stored with the old structure.

⚙️ Definition of Done

  • Land can be registered with a polygon boundary comprising 3 or more coordinates.
  • Coordinates selection is implemented and functional on the frontend map interface.
  • All contract and frontend changes are thoroughly tested and deployed.
  • The indexer (if applicable) supports the new location format.

📄 References

For additional context, refer to the README on project setup and architecture.

Let's get this feature rolled out to improve the accuracy and validity of our land registration process! 🚀

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions