Timeline for What algorithm and tools should I use to search a data set for the point nearest to a given point?
Current License: CC BY-SA 3.0
24 events
| when toggle format | what | by | license | comment | |
|---|---|---|---|---|---|
| May 23, 2017 at 12:35 | history | edited | CommunityBot | replaced http://stackoverflow.com/ with https://stackoverflow.com/ | |
| Apr 13, 2017 at 12:56 | history | edited | CommunityBot | replaced http://mathematica.stackexchange.com/ with https://mathematica.stackexchange.com/ | |
| Oct 27, 2013 at 20:32 | history | edited | user484 | CC BY-SA 3.0 | edited body |
| Oct 27, 2013 at 20:03 | comment | added | DavidC | @RahulNarain. Thanks. That was due to sloppiness as well as misunderstanding the full meaning of the conversion formula. I did test the current formula using your criterion and it did produce a sphere, so I'm fairly certain that it now works. | |
| Oct 27, 2013 at 19:59 | history | edited | DavidC | CC BY-SA 3.0 | added 63 characters in body |
| Oct 27, 2013 at 19:52 | history | edited | DavidC | CC BY-SA 3.0 | added 297 characters in body |
| Oct 27, 2013 at 17:47 | comment | added | user484 | This is a nice approach, but your conversion formulas are incorrect, as you can see by the fact that ParametricPlot3D[{r Cos[#2 Degree], r Cos[# Degree], r Sin[#]} & @@ {lon, lat}, {lon, -180, 180}, {lat, -90, 90}] is not a sphere. The formulas should be {r Cos[#1 Degree] Cos[#2 Degree], r Cos[#1 Degree] Sin[#2 Degree], r Sin[#1 Degree]} & instead. Also you might want to use BoxRatios -> Automatic in the plot so that distances are shown without distortion. | |
| Oct 27, 2013 at 13:51 | comment | added | DavidC | @Rahul. Yes, good advice. (Although I used different conversion formulas from decimal degrees to XYZ). Fortunately, Nearest can also handle distances in 3-space. | |
| Oct 27, 2013 at 0:06 | history | edited | DavidC | CC BY-SA 3.0 | added 137 characters in body |
| Oct 27, 2013 at 0:02 | history | undeleted | DavidC | ||
| Oct 26, 2013 at 23:58 | history | edited | DavidC | CC BY-SA 3.0 | complete rewrite |
| Oct 25, 2013 at 21:31 | history | deleted | DavidC | via Vote | |
| Oct 25, 2013 at 20:04 | comment | added | DavidC | Thanks rm-rf. I'll look into this more closely | |
| Oct 25, 2013 at 17:14 | comment | added | user484 | Since the points represent "some places in a city" and so are likely to be quite close together relative to the size of the Earth, it might be enough to scale the longitudes by $\cos\phi_m$, where $\phi_m$ is the mean latitude, and then continue to use Euclidean distances, no? en.wikipedia.org/wiki/… | |
| Oct 25, 2013 at 15:39 | history | edited | DavidC | CC BY-SA 3.0 | deleted 9 characters in body |
| Oct 25, 2013 at 15:37 | comment | added | rm -rf♦ | @DavidCarraher Because 1 minute E from (0,0) is not the same distance as 1 minute N from (0,0). This difference only gets worse the closer you get to the poles. GeoDistance will tell you that, whereas EuclideanDistance will consider them both equally distant. | |
| Oct 25, 2013 at 15:31 | history | edited | DavidC | CC BY-SA 3.0 | voronoi diagram |
| Oct 25, 2013 at 12:30 | comment | added | Dr. belisarius | We are talking about 10^9 points here. I don't think the most obvious approaches will be useful here ... | |
| Oct 25, 2013 at 11:34 | comment | added | DavidC | Presuming the long/lat, minutes, and seconds are converted to a single decimal, why won't euclidean work? Besides, isn't this a one-off computation? | |
| Oct 25, 2013 at 10:44 | comment | added | rm -rf♦ | You'll have to use Nearest with GeoDistance as the distance metric, not Euclidean. This will slow things down tremendously! | |
| Oct 25, 2013 at 10:04 | history | edited | DavidC | CC BY-SA 3.0 | added 689 characters in body |
| Oct 25, 2013 at 9:57 | history | edited | DavidC | CC BY-SA 3.0 | added 689 characters in body |
| Oct 25, 2013 at 9:49 | comment | added | Kuba | It will definitelly be faster if you precalculate NearestFunction: near = Nearest[landmarks]; ({#, near[#]} & /@ citypoints). Belisarius showed this lately | |
| Oct 25, 2013 at 9:45 | history | answered | DavidC | CC BY-SA 3.0 |