Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(1359)

Issue 334210043: Added test function to find an intersection between circle and curve (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
6 years, 4 months ago by manu_chaud
Modified:
6 years, 3 months ago
CC:
brahim Al-Qaysi, farzad2050, yulianlluo
Visibility:
Public.

Description

Added test function to find an intersection between circle and curve The main file to change is IntersectionPoint.java

Patch Set 1 #

Patch Set 2 : the main file to change is here! #

Total comments: 5

Patch Set 3 : Fixed bugs and finished test function to find intersection point #

Total comments: 2
Unified diffs Side-by-side diffs Delta from patch set Stats (+65 lines, -52 lines) Patch
M wan_server/src/main/java/net/wancom/wan_server/IntersectionPoint.java View 1 2 1 chunk +65 lines, -52 lines 2 comments Download

Messages

Total messages: 2
manu_chaud
@Biwen, Wei: if you have time I put some comments to help you figure out ...
6 years, 4 months ago (2017-12-08 11:43:09 UTC) #1
manu_chaud
6 years, 4 months ago (2017-12-11 02:21:15 UTC) #2
Finally finished to translate that R code into Java, so as to have a function to
determine the intersection between a circle and a line on a sphere.
- Hopefully considering the Earth as a sphere is reasonable enough for the
purpose of our project (it should be, yet we need to see the result on the world
map)
- for the moment there is just a test function that prints the coordinates to
the standard output; the result should be ultimately integrated in the modified
graph on which Dijkstra will be run before being returned to the client

https://codereview.appspot.com/334210043/diff/20001/wan_server/src/main/java/...
File wan_server/src/main/java/net/wancom/wan_server/IntersectionPoint.java
(right):

https://codereview.appspot.com/334210043/diff/20001/wan_server/src/main/java/...
wan_server/src/main/java/net/wancom/wan_server/IntersectionPoint.java:56: alpha
= Math.sqrt(u.get("lat")) + Math.sqrt(u.get("lng"));
I was using sqrt for computing the square, one of the reasons some inexpected
behaviors happened

https://codereview.appspot.com/334210043/diff/40001/wan_server/src/main/java/...
File wan_server/src/main/java/net/wancom/wan_server/IntersectionPoint.java
(right):

https://codereview.appspot.com/334210043/diff/40001/wan_server/src/main/java/...
wan_server/src/main/java/net/wancom/wan_server/IntersectionPoint.java:9: /*
The main information about this java class/code is written below

https://codereview.appspot.com/334210043/diff/40001/wan_server/src/main/java/...
wan_server/src/main/java/net/wancom/wan_server/IntersectionPoint.java:24: *
https://gis.stackexchange.com/questions/36841/line-intersection-with-circle-o...
The links here explains the rationale behind this code, better than I could do
Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b