Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Trial render bulk polygons #276

Open
wants to merge 14 commits into
base: main
Choose a base branch
from
Open

Trial render bulk polygons #276

wants to merge 14 commits into from

Conversation

IanMayo
Copy link
Member

@IanMayo IanMayo commented Feb 28, 2025

Trial displaying large body of polygons

@Copilot Copilot bot review requested due to automatic review settings February 28, 2025 11:04
Copy link

netlify bot commented Feb 28, 2025

Deploy Preview for reactol failed.

Name Link
🔨 Latest commit d268df3
🔍 Latest deploy log https://app.netlify.com/sites/reactol/deploys/67c1bbd94f13970008a1be5a

Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

PR Overview

This PR introduces a trial implementation for rendering a large body of polygons by adding support for multi-zone features. Key changes include:

  • Creation of a new MultiZone component to render multi-polygon features.
  • Addition of a loader (loadRepPolygon) to parse and convert polygon data from .rep files into GeoJSON features.
  • Updates to document loading, constants, layers, types, and the map component to support multi-zone functionality.

Reviewed Changes

File Description
src/components/spatial/MultiZone/index.tsx New component for rendering multi-polygon zones.
src/helpers/loaders/loadRepPolygon.ts New loader for parsing polygon data from .rep files and creating a feature.
src/components/Document/index.tsx Added new file handler support for rep polygon files.
src/constants.ts Introduced MULTI_ZONE_TYPE constant.
src/components/Layers/index.tsx Integrated Multi Zones into the layers panel with a new icon.
src/types.ts Added MultiZoneProps type for multi-zone features.
src/components/spatial/Map/index.tsx Updated map to render MultiZone features based on GeoJSON MultiPolygon.

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

const points: Array<{lat: number, lng: number}> = []

// Process 5 coordinate pairs
for (let i = 0; i < 6; i++) {
Copy link
Preview

Copilot AI Feb 28, 2025

Choose a reason for hiding this comment

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

The loop is set to iterate 6 times to process coordinate pairs, but earlier comments and a parts length check suggest processing 5 coordinate pairs. Adjust the loop condition to 'i < 5' or update the parts length validation to ensure consistency.

Suggested change
for (let i = 0; i < 6; i++) {
for (let i = 0; i < 5; i++) {

Copilot is powered by AI, so mistakes are possible. Review output carefully before use.

Positive Feedback
Negative Feedback

Provide additional feedback

Please help us improve GitHub Copilot by sharing more details about this comment.

Please select one or more of the options
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.

1 participant