Skip to content

Fix parameterization of Segement with ellipsoid manifold #1089

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

Merged
merged 1 commit into from
Sep 26, 2024

Conversation

eliascarv
Copy link
Member

@eliascarv eliascarv commented Sep 26, 2024

Code:

julia> using Meshes, CoordRefSystems

julia> latlon(args...) = Point(LatLon(args...))
latlon (generic function with 1 method)

julia> s = Segment(latlon(45, 0), latlon(45, 90))
Segment
├─ Point(lat: 45.0°, lon: 0.0°)
└─ Point(lat: 45.0°, lon: 90.0°)

master:

julia> s(0)
Point with GeodeticLatLon{WGS84Latest} coordinates
├─ lat: 44.99999999999999°
└─ lon: 0.0°

julia> s(0.25)
Point with GeodeticLatLon{WGS84Latest} coordinates
├─ lat: 51.69172630922252°
└─ lon: 18.434948822922014°

julia> s(0.5)
Point with GeodeticLatLon{WGS84Latest} coordinates
├─ lat: 54.76375232553122°
└─ lon: 45.0°

julia> s(0.75)
Point with GeodeticLatLon{WGS84Latest} coordinates
├─ lat: 51.69172630922252°
└─ lon: 71.56505117707799°

julia> s(1)
Point with GeodeticLatLon{WGS84Latest} coordinates
├─ lat: 44.99999999999999°
└─ lon: 90.0°

PR:

julia> s(0)
Point with GeodeticLatLon{WGS84Latest} coordinates
├─ lat: 45.0°
└─ lon: 0.0°

julia> s(0.25)
Point with GeodeticLatLon{WGS84Latest} coordinates
├─ lat: 45.0°
└─ lon: 22.5°

julia> s(0.5)
Point with GeodeticLatLon{WGS84Latest} coordinates
├─ lat: 45.0°
└─ lon: 45.0°

julia> s(0.75)
Point with GeodeticLatLon{WGS84Latest} coordinates
├─ lat: 45.0°
└─ lon: 67.5°

julia> s(1)
Point with GeodeticLatLon{WGS84Latest} coordinates
├─ lat: 45.0°
└─ lon: 90.0°

Plotting segments:

julia> b = Box(latlon(0, 90), latlon(45, 180))
Box
├─ min: Point(lat: 0.0°, lon: 90.0°)
└─ max: Point(lat: 45.0°, lon: 180.0°)

julia> viz(b, showsegments=true)

master:
image

PR:
image

@eliascarv eliascarv requested a review from juliohm September 26, 2024 17:17
Copy link

codecov bot commented Sep 26, 2024

Codecov Report

Attention: Patch coverage is 87.50000% with 1 line in your changes missing coverage. Please review.

Project coverage is 87.37%. Comparing base (610c670) to head (9a786be).
Report is 1 commits behind head on master.

Files with missing lines Patch % Lines
src/geometries/polytopes/segment.jl 87.50% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1089      +/-   ##
==========================================
- Coverage   87.37%   87.37%   -0.01%     
==========================================
  Files         188      188              
  Lines        5956     5963       +7     
==========================================
+ Hits         5204     5210       +6     
- Misses        752      753       +1     

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

@eliascarv eliascarv merged commit e07030e into master Sep 26, 2024
16 checks passed
@eliascarv eliascarv deleted the segement-param branch September 26, 2024 17:38
souma4 pushed a commit to souma4/Meshes.jl that referenced this pull request Feb 11, 2025
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