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

🐛 [BUG] Fix gpx and kml parsing: geom is an empty GeometryCollection #4467

Merged
merged 1 commit into from
Feb 3, 2025

Conversation

justinefricou
Copy link
Contributor

@justinefricou justinefricou commented Jan 29, 2025

Description

Merging a MultiLineString that contains only two duplicate points returns an empty GeometryCollection.
This PR adds handling of this error case when parsing .kml and .gpx files.

Related Issue

Checklist

  • I have followed the guidelines in our Contributing document
  • My code respects the Definition of done available in the Development section of the documentation
  • I have performed a self-review of my code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • I have added tests that prove my fix is effective or that my feature works.
  • New and existing unit tests pass locally with my changes
  • I added an entry in the changelog file
  • My commits are all using prefix convention (emoji + tag name) and references associated issues
  • I added a label to the PR corresponding to the perimeter of my contribution
  • The title of my PR mentionned the issue associated

@justinefricou justinefricou requested a review from a team January 29, 2025 10:13
Copy link

codecov bot commented Jan 29, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 98.46%. Comparing base (d7ba9c8) to head (48c04ff).
Report is 1 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #4467   +/-   ##
=======================================
  Coverage   98.46%   98.46%           
=======================================
  Files         269      269           
  Lines       21471    21473    +2     
=======================================
+ Hits        21142    21144    +2     
  Misses        329      329           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link

cypress bot commented Jan 29, 2025

Geotrek-admin    Run #10921

Run Properties:  status check passed Passed #10921  •  git commit 26379c86f6 ℹ️: Merge 48c04ff50543817b795bfef10ec1abfeb4e3b092 into d7ba9c8cd446877efb28a42aadc2...
Project Geotrek-admin
Branch Review refs/pull/4467/merge
Run status status check passed Passed #10921
Run duration 02m 12s
Commit git commit 26379c86f6 ℹ️: Merge 48c04ff50543817b795bfef10ec1abfeb4e3b092 into d7ba9c8cd446877efb28a42aadc2...
Committer Justine Fricou
View all properties for this run ↗︎

Test results
Tests that failed  Failures 0
Tests that were flaky  Flaky 0
Tests that did not run due to a developer annotating a test with .skip  Pending 0
Tests that did not run due to a failure in a mocha hook  Skipped 0
Tests that passed  Passing 22
View all changes introduced in this branch ↗︎

@justinefricou justinefricou marked this pull request as ready for review January 29, 2025 10:29
Copy link
Contributor

@marcantoinedupre marcantoinedupre left a comment

Choose a reason for hiding this comment

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

Good job! 👍

@justinefricou justinefricou force-pushed the fix_parsing_gpx_geom_type branch from 14bf486 to b40a095 Compare January 30, 2025 16:17
@justinefricou justinefricou force-pushed the fix_parsing_gpx_geom_type branch from b40a095 to 48c04ff Compare February 3, 2025 14:21
@justinefricou justinefricou merged commit c6da840 into master Feb 3, 2025
21 checks passed
@justinefricou justinefricou deleted the fix_parsing_gpx_geom_type branch February 3, 2025 14:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants