Skip to content

Filter Results by Custom Polygon #51

Description

@citizen-dror

🚀 Feature Request: Filter Results by Custom Polygon

Summary

Add functionality to draw and use custom polygons on the map to filter and analyze data, such as accidents or user-submitted issues, within specific geographic areas.

Use Case

This feature will allow users to focus on a specific region of interest, enabling better insight into localized problems. It can support:

  1. Filtering accidents or remarks by region
  2. Comparing two parts of the city side by side

Proposed Functionality

  • 🖊️ Draw Polygon: Allow users to draw a polygon directly on the map.
  • 📤 Send to Server: The polygon geometry should be sent to the backend to filter results within that shape.
  • 💾 Save Polygon: Users should be able to save polygons with a custom name, enabling:
    • Reuse of saved regions
    • Sharing with others
    • Organizing filters by area

Example User Flow

  1. Click “Draw Region” and create a polygon on the map.
  2. Name the region (e.g., "Downtown East").
  3. Use the region as a filter when viewing accidents or reports.
  4. Optionally, draw a second region for comparison.

Potential Impact

  • Improve spatial analysis for urban safety projects
  • Empower users to investigate trends in specific neighborhoods
  • Enable side-by-side comparisons between different areas of a city

Additional Notes

  • Consider storing polygons as GeoJSON on the backend
  • Enable multi-polygon comparison UI (e.g., split view or overlaid stats)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions