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

fix: Polygon simplification on E&A page #1268

Merged
merged 8 commits into from
Dec 1, 2024
Merged

Conversation

hanbyul-here
Copy link
Collaborator

@hanbyul-here hanbyul-here commented Nov 21, 2024

Close #1267, Close US-GHG-Center/veda-config-ghg#648

Description of Changes

Increased the limit of the number of each polygon.
Separated out a function that handles the aoi validation for an easy test and better readability.
Fix error handling.

Notes & Questions About Changes

The number that I ended up with is an outcome of my experiment with our GHG endpoint, details are in : US-GHG-Center/veda-config-ghg#648 (comment)

I think our current setup was more for multiple simple polygons - and this setup is more for 1 complicated polygon (which also hopefully covers the multiple simple polygons case.)

Validation / Testing

We should test with GHG endpoint because of AWS setup there, I made a preview link : https://deploy-preview-664--ghg-demo.netlify.app/exploration

@hanbyul-here hanbyul-here changed the title Fix: Polygon simplifications on E&A page Fix: Polygon simplification on E&A page Nov 21, 2024
Copy link

netlify bot commented Nov 21, 2024

Deploy Preview for veda-ui ready!

Name Link
🔨 Latest commit 196a99c
🔍 Latest deploy log https://app.netlify.com/sites/veda-ui/deploys/674cf5fa64b0620008c05d50
😎 Deploy Preview https://deploy-preview-1268--veda-ui.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@hanbyul-here hanbyul-here changed the title Fix: Polygon simplification on E&A page fix: Polygon simplification on E&A page Nov 21, 2024
@hanbyul-here hanbyul-here requested a review from slesaad November 21, 2024 12:50
@aboydnw
Copy link
Contributor

aboydnw commented Nov 21, 2024

hm, I'm not able to get anything to load. Here are the files I tried:

Alabama_State_Boundary-shp.zip
bs.shp.zip
alabama state geojson
Indianapolis geojson

Each time I get this error:
image

@hanbyul-here
Copy link
Collaborator Author

hanbyul-here commented Nov 26, 2024

@aboydnw Thanks for testing and catching the bug that I pushed at the last minute 😓 Please test it again when you have a chance.

@aboydnw
Copy link
Contributor

aboydnw commented Nov 27, 2024

This seems to be working much better now! The shape for Indianapolis still doesn't show exactly accurate, but now it seems to be because rings are not supported, which I think is an acceptable limitation.

image

image

I was able to upload a fairly complex shapefile and it worked well. I think this should give folks at AGU more ability to find a shapefile that works @Jeanne-le-Roux @slesaad
image

Copy link
Contributor

@aboydnw aboydnw left a comment

Choose a reason for hiding this comment

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

From a manual testing perspective, looks good to me.

@hanbyul-here hanbyul-here marked this pull request as ready for review November 28, 2024 00:00
@hanbyul-here hanbyul-here force-pushed the test-with-aoi-polygons branch from 2b7a016 to ce5afa7 Compare November 28, 2024 01:10
@hanbyul-here hanbyul-here force-pushed the test-with-aoi-polygons branch from ce5afa7 to c3138aa Compare November 28, 2024 01:44
Copy link
Collaborator

@dzole0311 dzole0311 left a comment

Choose a reason for hiding this comment

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

Looks great @hanbyul-here, thanks for adding the tests as well! Tested using a few .shp and geojson files and can't spot any issues with the fixes.

@hanbyul-here hanbyul-here merged commit 515e129 into main Dec 1, 2024
9 checks passed
@hanbyul-here hanbyul-here deleted the test-with-aoi-polygons branch December 1, 2024 23:57
hanbyul-here added a commit that referenced this pull request Dec 3, 2024
### Description of Changes

Increase the limit of the number of each aoi polygon.
Separate out functions that handles the aoi validation for easy test and better readability.
Fix error handling.
Add unit test for aoi validation.
slesaad added a commit to US-GHG-Center/veda-config-ghg that referenced this pull request Dec 3, 2024
## What am I changing and why

Updating UI to v5.11.1

## How to test

v5.11.1 adds the fix for AOI simplification on E&A page to v5.11.0 -
details for AOI simplification fix is
NASA-IMPACT/veda-ui#1268

## ⚠️ Checks

- [x] I have confirmed that [updating the `veda-ui`
submodule](https://github.com/NASA-IMPACT/veda-config-ghg/blob/main/docs/DEVELOPMENT.md#development)
is needed and **only done so** if that's the case.
@snmln snmln mentioned this pull request Dec 6, 2024
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.

[Bug] Issues with EnA geojson/shapefiles upload Investigate reported E&A shapefile upload issue
3 participants