Comments (2)
I'm sorry but I don't understand your question. Can you try to rephrase it or give a more specific example?
The docs for Indeterminate if you haven't seen them: https://docs.rs/geo/latest/geo/enum.Closest.html#variant.Indeterminate
from geo.
Sorry, some words got missing in my issue. When there is an "infinite number of closest points", is there a way a method that retrieves one of those?
My real use case was:
- I want to compute the haversine distance between a point and a polygon, but since it is not defined, I approximate it by
- Computing the closest point between the polygon and the point
- computing the haversine distance between one polygon and the closest point of the polygon
extract from my code
// licence: AGPLv3
let arp_pt = airport.to_point();
let Closest::SinglePoint(closest_point) = polygon.closest_point(&arp_pt) else {
panic!("no closest point")
};
let distance_m = arp_pt.haversine_distance(&closest_point) as usize;
In case of of Indeterminate
, I would be fine with any one of closest points. For now I bailed out, fortunately it didn't happen in practice
from geo.
Related Issues (20)
- Latest ahash dep and Rust 1.70.0 are incompatible HOT 4
- 3D (3-dimensional) data types HOT 2
- Rhumb destinations do not wrap angles after the first pole intersection HOT 8
- GeodesicDestination produces cyclcically incosistent results HOT 5
- Expose fields in AffineTransform struct (or have a way to access the internal values)? HOT 4
- st_makeline function HOT 2
- Helper for converting between Mercator and Euclidean coordinates HOT 1
- Consider applying for support from OSGEO or OGC?
- Algorithm to partition a polygon (convex decomposition) using the Hertel-Mehlhorn algorithm HOT 1
- Documentation for monotone-decomposition
- Panic on clip operation HOT 2
- Iām confused about the clip API. Could the operations be more clearly documented? HOT 6
- Add a buffer feature like turfjs HOT 1
- panic on polygon union HOT 1
- Replace HaversineIntermediate with HaversineLineInterpolatePoint and HaversineDensify HOT 2
- Segementize LineString into arbitrary lengths. HOT 4
- performance for multipolygon contains much worse than for geos HOT 14
- Note availability of rstar spatial index early in docs HOT 1
- Merge geo-types and geo crate HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
š Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. ššš
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ā¤ļø Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from geo.