Difference in distance is not constant for point moving along a horizontal line parallel to the x-axis at a constant speed
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 35/100
Research direction
Start with SpatialContext.calcDistance, SpatialContext.GEO, and the Haversine distance calculator. Reproduce the reported samples and compare the calculated deltas with the expected geodesic behavior. Done means determining whether the varying distance changes are correct and documenting or correcting the behavior with a verified result.
Written by the indexing model from the issue text.
Description
Hi,
I am trying to find the distance between a moving point p1 and a fixed point p2. Both of them are on the same y-coordinate. Point p1 just travels along the y = b line (n is constant). However, I noticed that while p1 moved at a constant speed, the distance value returned by the SpatialContext.calcDistance(p, p2) didn't change at a constant rate. Below is a sample of my data:
p1 p2 distance
-141.854 , 52.94 | -106.75 , 52.94 | 1257.386
-140.194 , 52.94 | -106.75 , 52.94 | 1199.061
-138.534 , 52.94 | -106.75 , 52.94 | 1140.57
-136.874 , 52.94 | -106.75 , 52.94 | 1081.92
-135.214 , 52.94 | -106.75 , 52.94 | 1023.121
-133.554 , 52.94 | -106.75 , 52.94 | 964.1811
-131.894 , 52.94 | -106.75 , 52.94 | 905.109
-130.234 , 52.94 | -106.75 , 52.94 | 845.913
-128.574 , 52.94 | -106.75 , 52.94 | 786.6017
-126.914 , 52.94 | -106.75 , 52.94 | 727.1834
As you can see, the change in the x-coordinates between each consecutive snapshot is a constant value of 1.66 degrees. However, the change in distance (1257.386 to 727.1834) between the moving point p1 and the fixed point p2 (-106.75, 52.94) is not a constant value. In fact, the difference is increasing slightly from 58.3245 to 59.4183 between each snapshot. By the way, I used SpatialContext.GEO and Harversine distance calculator for this since my model is geodesic. However, since my point is moving in parallel to the x-axis, I expect the distance delta to be the same. Am I missing something here or am I wrong to assume that? Thanks.
By the way, I forgot to mention that the distance posted is the distance in nautical miles (which I converted from the distance in degree by multiplying the result with DistanceUtils.DEG_TO_KM * KM_TO_NAUTICAL_MILE).
- Dominant language
- Java
- Stars
- 961
- Forks
- 172
- PR merge metrics
- No merged PRs in 30d
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from locationtech/spatial4j
-
question
Difficulty 5/5 Over a week Newbie friendliness 20/100
locationtech/spatial4j#233 · 1 comment ·
-
bug
Difficulty 3/5 1-2 days Newbie friendliness 35/100
locationtech/spatial4j#232 · 1 comment ·
-
Difficulty 4/5 3-5 days Newbie friendliness 25/100
locationtech/spatial4j#231 · 1 comment ·
-
Difficulty 5/5 Over a week Newbie friendliness 25/100
locationtech/spatial4j#230 · 2 comments ·
-
bug
Difficulty 3/5 1-2 days Newbie friendliness 45/100
locationtech/spatial4j#227 · 2 comments ·
All issues in locationtech/spatial4j
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
-
bug needs triage
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
-
Difficulty 1/5 Under an hour Newbie friendliness 94/100
objectionary/hone-maven-plugin#1061 ·
-
type:bug
Difficulty 2/5 1-3 hours Newbie friendliness 72/100