8000 Validate topology of AOI for the Partial Download Tool · Issue #2671 · NCEAS/metacatui · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Validate topology of AOI for the Partial Download Tool #2671

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

Open
shirlysteph opened this issue Apr 21, 2025 · 0 comments
Open

Validate topology of AOI for the Partial Download Tool #2671

shirlysteph opened this issue Apr 21, 2025 · 0 comments
Assignees
Labels
ADC CI-08 Data extraction and citation services for big data (ADC deliverable) arctic data center bug cesium map download Allowing users to download geospatial data directly the map. Inclues changes to theDownloadPanelView pdg Permafrost Discovery Gateway portals Anything related to portals

Comments

@shirlysteph
Copy link
Contributor

Validate topology of AOI for the Partial Download Tool. Prevent users from drawing invalid geometries (like self-intersecting polygons)

Implementation Plan

Implement topology checks on the client-side (in the browser) using Turf.js for geometry validation.

  1. Install or load Turf.js
    <script src="https://cdn.jsdelivr.net/npm/@turf/turf@6/turf.min.js"></script>
  2. Check for self-intersections
     function isValidPolygon(polygon) {
      const kinks = turf.kinks(polygon);
      return kinks.features.length === 0;
    } 
  3. If the AOI is invalid prompt the user about the error, and do not add the polygon to the map.
@shirlysteph shirlysteph added bug portals Anything related to portals arctic data center ADC CI-08 Data extraction and citation services for big data (ADC deliverable) labels Apr 21, 2025
@shirlysteph shirlysteph self-assigned this Apr 21, 2025
@robyngit robyngit added pdg Permafrost Discovery Gateway cesium labels Apr 23, 2025
@robyngit robyngit added the map download Allowing users to download geospatial data directly the map. Inclues changes to theDownloadPanelView label Apr 23, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ADC CI-08 Data extraction and citation services for big data (ADC deliverable) arctic data center bug cesium map download Allowing users to download geospatial data directly the map. Inclues changes to theDownloadPanelView pdg Permafrost Discovery Gateway portals Anything related to portals
Projects
Status: No status
Status: No status
Development

No branches or pull requests

2 participants
0