-
Notifications
You must be signed in to change notification settings - Fork 8
Add arclength functionality with linear and geodesic backends #328
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
base: main
Are you sure you want to change the base?
Conversation
@asinghvi17 👋 This repository doesn't have Copilot instructions. With Copilot instructions, I can understand the repository better, work faster and produce higher quality PRs. I can generate a .github/copilot-instructions.md file for you automatically. Click here to open a pre-filled issue and assign it to me. I'll write the instructions, and then tag you for review. |
Co-authored-by: asinghvi17 <[email protected]>
Co-authored-by: asinghvi17 <[email protected]>
src/methods/arclength.jl
Outdated
end | ||
|
||
# Implementation for LineString and LinearRing | ||
function _arclength_to_point(method::Union{Planar, Spherical}, linestring, target_point, T::Union{GI.LineStringTrait, GI.LinearRingTrait}) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@copilot The usual pattern is:
function _arclength_to_point(method::Union{Planar, Spherical}, trait1::Union{GI.LineStringTrait, GI.LinearRingTrait}, linestring, trait2::GI.PointTrait, target_point)
and make sure that all traits make it down the hierarchy
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated function signatures to follow the GeometryOps pattern with traits included in the signature. Changed from:
function _arclength_to_point(method::Union{Planar, Spherical}, linestring, target_point, T::Union{GI.LineStringTrait, GI.LinearRingTrait})
to:
function _arclength_to_point(method::Union{Planar, Spherical}, trait1::Union{GI.LineStringTrait, GI.LinearRingTrait}, linestring, trait2::GI.PointTrait, target_point)
All traits now make it down the hierarchy properly. Applied the same pattern to both _arclength_to_point
and _point_at_arclength
functions in both the main implementation and the Proj extension. (f8d2d69)
Co-authored-by: asinghvi17 <[email protected]>
Just as a heads up, I was blocked by some firewall rules while working on your feedback. Expand below for details. Warning Firewall rules blocked me from connecting to one or more addresses (expand for details)I tried to connect to the following addresses, but was blocked by firewall rules:
If you need me to access, download, or install something from one of these locations, you can either:
|
This PR implements arclength functionality for GeometryOps.jl, providing two key operations for working with linear geometries:
Key Features
Manifold Support: Both functions support multiple manifolds following existing GeometryOps patterns:
Planar()
- uses Euclidean distance calculations for 2D planar geometriesGeodesic()
- uses PROJ's geodesic calculations for accurate Earth-surface measurementsUsage Examples:
Implementation Details
LineString
andLinearRing
geometriesThis functionality enables parameterizing curves by arc length, finding positions along routes or paths, and interpolating along geometric curves - useful for many geometric analysis workflows.
Fixes #111.
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.