Skip to content

Conversation

@IanMayo
Copy link
Member

@IanMayo IanMayo commented Feb 28, 2025

Trial displaying large body of polygons

@Copilot Copilot AI review requested due to automatic review settings February 28, 2025 11:04
@netlify
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 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

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 uses AI. Check for mistakes.
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