Skip to content

issue-1382: Added geojson and polygon simplification support for CAP warnings#1383

Merged
geosaaga merged 2 commits into
mainfrom
feature/1382-geojson-for-cap-warning-areas
Jun 24, 2026
Merged

issue-1382: Added geojson and polygon simplification support for CAP warnings#1383
geosaaga merged 2 commits into
mainfrom
feature/1382-geojson-for-cap-warning-areas

Conversation

@geosaaga

Copy link
Copy Markdown
Collaborator

Polygon simplification can be configured in capViewSettings, for example

polygonAccuracy: 250,

Uses 250 meter accuracy, if value is not set then original polygon is used.

Closes #1382

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Adds GeoJSON rendering for CAP warning areas and optional polygon simplification (meter-based tolerance) to improve map performance and memory usage in the CAP warnings map view.

Changes:

  • Introduces simplifyPolygon utility for simplifying/closing GeoJSON polygon rings using meter tolerance.
  • Updates CAP warnings MapView to render warning areas via react-native-maps Geojson instead of individual Polygon components.
  • Adds capViewSettings.polygonAccuracy config option (meters) and updates tests for the new rendering path.

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 6 comments.

Show a summary per file
File Description
src/utils/simplifyPolygon.ts New utility to simplify GeoJSON polygon rings with meter tolerance.
src/config/types.ts Adds polygonAccuracy?: number to CAP view settings.
src/components/warnings/cap/MapView.tsx Switches CAP area rendering to GeoJSON + optional simplification.
__tests__/utils/simplifyPolygon.test.ts Adds unit coverage for polygon simplification/closure behavior.
__tests__/components/MapViewCap.test.tsx Updates map rendering mock/assertions for GeoJSON rendering.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/components/warnings/cap/MapView.tsx Outdated
Comment thread src/components/warnings/cap/MapView.tsx Outdated
Comment thread src/components/warnings/cap/MapView.tsx
Comment thread __tests__/components/MapViewCap.test.tsx
Comment thread src/components/warnings/cap/MapView.tsx
Comment thread src/components/warnings/cap/MapView.tsx Outdated

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 7 out of 7 changed files in this pull request and generated 1 comment.

Comment thread src/components/warnings/cap/MapView.tsx
@geosaaga geosaaga merged commit 10ce147 into main Jun 24, 2026
3 checks passed
@geosaaga geosaaga deleted the feature/1382-geojson-for-cap-warning-areas branch June 24, 2026 11:02
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.

Use geojson to draw CAP warning areas

2 participants