Posts: 6
Threads: 1
Joined: Nov 2012
Hi, i'm looking at your software, it's great, but i need to add something.
How can i use yor jar into my project?
I need to create a track starting from 2 point (lat-long) ,passing on a street ad i also need to add a timestamp for each point. (i don't need a graphic interface)
So the problem is that, giving 2 point, how can i get an arraylist of position that identify my route, using the commandline?
Is it possible?
Thanks a lot
Roberto
Posts: 7,539
Threads: 232
Joined: Aug 2007
(19.11.2012, 11:51)campioncino Wrote: How can i use yor jar into my project?
Hi Roberto,
checkout the project and compile it. And keep the implications of the GPL in mind.
(19.11.2012, 11:51)campioncino Wrote: I need to create a track starting from 2 point (lat-long) ,passing on a street ad i also need to add a timestamp for each point. (i don't need a graphic interface)
So the problem is that, giving 2 point, how can i get an arraylist of position that identify my route, using the commandline?
Is it possible?
Yes
--
Christian
Posts: 6
Threads: 1
Joined: Nov 2012
Quote:checkout the project and compile it. And keep the implications of the GPL in mind.
How??
i've download the RouteConverterCmdLine.jar and imported in into my nebean's project as a library.... then?
how i can calculate distance or path between 2 point?
Thanks
Posts: 7,539
Threads: 232
Joined: Aug 2007
(19.11.2012, 20:07)campioncino Wrote: Quote:checkout the project and compile it. And keep the implications of the GPL in mind.
How??
i've download the RouteConverterCmdLine.jar and imported in into my nebean's project as a library.... then?
Checkout the source and read the README.txt
(19.11.2012, 20:07)campioncino Wrote: how i can calculate distance or path between 2 point?
The class is called Bearing
--
Christian
Posts: 6
Threads: 1
Joined: Nov 2012
21.11.2012, 01:05
(This post was last modified: 21.11.2012, 01:18 by campioncino.)
ok. I've created my own java project, and using Bearing i'm able to calculate geodedic distance between 2 point
Code: double longitude1 = 13.00000,latitude1 =43.0000,longitude2 = 13.12320,latitude2 = 43.02310;
double dist=Bearing.calculateBearing(longitude1, latitude1, longitude2, latitude2).getDistance();
That's Fine...
More complex, i wanna create a startPoint "A", endPoint "B" and get the route between A-B, as a positions
Code: GoogleMapsService service = new GoogleMapsService();
double elevation1=service.getElevationFor(longitude1, latitude1);
double elevation2=service.getElevationFor(longitude2, latitude2);
GoogleMapsPosition p1= new GoogleMapsPosition(longitude1, latitude1, elevation1, "Start");
GoogleMapsPosition p2= new GoogleMapsPosition(longitude2, latitude2, elevation2, "end");
Now i get the point on Google Maps ...
1)how can i calculate the route?
2)how can i convert the route in points?
That's all...
Thanks for helping me
Posts: 7,539
Threads: 232
Joined: Aug 2007
21.11.2012, 13:29
(This post was last modified: 21.11.2012, 13:30 by routeconverter.)
(21.11.2012, 01:05)campioncino Wrote: Now i get the point on Google Maps ...
1)how can i calculate the route?
2)how can i convert the route in points?
Google's servers calculate the route from the points handed over to the Google Maps API.
--
Christian
Posts: 6
Threads: 1
Joined: Nov 2012
Could you give me an example?
Posts: 7,539
Threads: 232
Joined: Aug 2007
Start with BaseMapView#addDirectionsToMap()
Btw, what are you planning to achieve?
--
Christian
Posts: 6
Threads: 1
Joined: Nov 2012
(21.11.2012, 16:29)routeconverter Wrote: Start with BaseMapView#addDirectionsToMap()
Btw, what are you planning to achieve?
I must create a csv file of a track in which i have to store a complete track as a collection of single point
latitude,longitude,UTC,Date,ID
to do that, i need the route as a collection of point..... maybe i need only the KLM file of the route.
2 month ago, i can get it just adding &output=kml in the url...
now i don't know how can get that information
Posts: 6
Threads: 1
Joined: Nov 2012
Ok, i've solved my problem.
I get the xml file from google and parse it.
decoding the polyline
|