Nice to have features....?

167 views
Skip to first unread message

womisa

unread,
Sep 10, 2014, 1:16:58 PM9/10/14
to atla...@googlegroups.com
Hi EMUX,

thanks for the Atlas program! This works very well for me.

As a suggestion (extension?) for an easy to use Route Editor ==> http://www.radroutenplaner-bw.de/ar-rrp-nvbw/de/alpregio.jsp#tab=TourplannerTab&tpdt=cycling

A nice to have  feature would be the ability to load a old/saved  GPX Route and edit (reroute/ modify) and save again.

Integragration from BRouter with its alternavie routes....

Greetings
Achim

Emux

unread,
Sep 10, 2014, 2:02:00 PM9/10/14
to wms...@googlemail.com
Hi, thanks for using Atlas and your feedback.

Future versions will have:
- Use of online web services (like now in Cruiser)
- Load / Save routes or tracks (currently you can export a route in GPX)

Does BRouter provide a (jar) library to include in applications for offline routing (like GraphHopper) ?
I have searched its Android implementation and it seems to require its own external app / server installed from the user in order to function properly inside the running application.

--
Emux
Cruiser - Atlas

womisa

unread,
Sep 10, 2014, 3:13:51 PM9/10/14
to atla...@googlegroups.com
Hi Emux,

thanks for your answer!

I have integragted first BRoutrer and then Graphhopper in my own aplication.BRouter tis very easy to integrate!

Dowload the pcakage from ==> http://brouter.de/brouter/offline.html (and profiles / segments),

Link the brouter .jar to your applicaten thats it...


..... 3 Alternatve Routes ....


                gpxRoute=br.findROUTE(from.longitude, from.latitude, to.longitude, to.latitude);
                gpx.getTracks().get(1).addTrackseg().getWaypoints().addAll(gpxRoute.getTracks().get(0).getTracksegs().get(0).getWaypoints());
                gpx.getTracks().get(1).setColor(java.awt.Color.GREEN);
                WmsMapViewer.setStatus("Route 1 BRouter fertig.......");

                gpxRoute=br.findROUTE(from.longitude, from.latitude, to.longitude, to.latitude);
                gpx.getTracks().get(2).addTrackseg().getWaypoints().addAll(gpxRoute.getTracks().get(0).getTracksegs().get(0).getWaypoints());
                gpx.getTracks().get(2).setColor(java.awt.Color.BLUE);
                WmsMapViewer.setStatus("Route 2 BRouter fertig........");


                gpxRoute=br.findROUTE(from.longitude, from.latitude, to.longitude, to.latitude);
                gpx.getTracks().get(3).addTrackseg().getWaypoints().addAll(gpxRoute.getTracks().get(0).getTracksegs().get(0).getWaypoints());
                gpx.getTracks().get(3).setColor(java.awt.Color.RED);

.........

package womisa.router.brouter;

import btools.router.OsmNodeNamed;
import btools.router.OsmTrack;
import btools.router.RoutingContext;
import btools.router.RoutingEngine;
import womisa.gpx.GPXFile;

import java.util.ArrayList;
import java.util.List;

public class MyBrouter {

    public GPXFile findROUTE(Double fromLon, Double fromLat, Double toLon, Double toLat) {
        List<OsmNodeNamed> wplist2 = createWaypointList(fromLon, fromLat, toLon, toLat);
        System.out.println("From:" + fromLon + "  " + fromLat);
        System.out.println("  To:" + toLon + "  " + toLat);
//        File fileXX = new File((new File(".").getCanonicalPath()) + "/output/);
        String baseDir=System.getProperty("user.dir") + "/../WMSData/brouter/";

        RoutingContext c = new RoutingContext();
        c.localFunction = baseDir+"profiles2//trekking.brf";
//         c.setAlternativeIdx(2);  //Todo testen Funktion unklar
//        c.localFunction = baseDir+"profiles2/shortest.brf";
//        new CycleRoute("output/mytrack", "output/mylog", "segments2", wplist2, c);
        System.out.println("Profile:="+c.localFunction);

//        RoutingEngine routingEngine=new RoutingEngine(baseDir+"out/mytrack", baseDir+"out/mylog", baseDir+"segments2", wplist2, c);
        RoutingEngine routingEngine=new RoutingEngine(baseDir+"out/mytrack", null, baseDir+"segments3", wplist2, c);   //....mytrack muß da sein sonst werden keine Alternativen generiert
//        RoutingEngine routingEngine=new RoutingEngine(null, null, baseDir+"segments3", wplist2, c);   //....mytrack muß da sein sonst werden keine Alternativen generiert
        routingEngine.quite=true;

        routingEngine.doRun( 60000 );

        if ( routingEngine.getErrorMessage() != null )
        {
            System.out.println("=======>!!!!!!!!!!Timeout Keine Route gefunden:" +routingEngine.getErrorMessage() +  "!!!!!!!!!)<============");
        }
        OsmTrack track = routingEngine.getFoundTrack();
        GPXFile gpxFile=new GPXFile("BRouter",(String) track.formatAsGpx());
//test
        int distance = routingEngine.getDistance();
        int ixx= routingEngine.getAlternativeIndex();

        System.out.println("Alternative: "+ixx + "  Distanz: " + distance);

        return gpxFile;

    }

    private List<OsmNodeNamed> createWaypointList(Double fromLon, Double fromLat, Double toLon, Double toLat) {
        List<OsmNodeNamed> wplist = new ArrayList<OsmNodeNamed>();
        OsmNodeNamed n = new OsmNodeNamed();
        n.name = "from";
        n.ilon = (int) ((fromLon + 180.) * 1000000. + 0.5);
        n.ilat = (int) ((fromLat + 90.) * 1000000. + 0.5);
        wplist.add(n);

        n = new OsmNodeNamed();
        n.name = "to";
        n.ilon = (int) ((toLon + 180.) * 1000000. + 0.5);
        n.ilat = (int) ((toLat + 90.) * 1000000. + 0.5);
        wplist.add(n);
        return wplist;

womisa

unread,
Sep 10, 2014, 3:51:57 PM9/10/14
to atla...@googlegroups.com
Hi
I am an old man and have my own application this works for satisfying me. But it is terribly programmed! I'm retired!
You are a professional and should integrate these functions
.

Greetings
Achim

Emux

unread,
Sep 10, 2014, 3:57:34 PM9/10/14
to womisa, atla...@googlegroups.com
Thanks for the BRouter info, I'll definitely check it out.

womisa

unread,
Mar 4, 2015, 9:19:49 AM3/4/15
to atla...@googlegroups.com
Hi Emux,

 what do you think about the integration of this really missing function: load GPX Files?

Best regards
Achim

Emux

unread,
Mar 4, 2015, 9:30:51 AM3/4/15
to womisa, atla...@googlegroups.com
Yes I know I have said that I'll add GPX loading.

I have not forgotten it, I just have not found time for it yet..

womisa

unread,
Mar 18, 2015, 4:28:24 AM3/18/15
to atla...@googlegroups.com
Hi

thanks for the new version, this works very well for me!

What is the Bubble Layer. How can i us it?

Wishes:

- The possibility to insert a new "ViaPoint" between two Via Points or insert before/after a Via Point
- Can you please integrate the elevation (from Graphhopper Feature) in the GPX File and show a elevation chart with distances?


Kind regards
Achim

Emux

unread,
Mar 18, 2015, 4:41:12 AM3/18/15
to atla...@googlegroups.com, wms...@googlemail.com
On 18/03/2015 10:28 πμ, womisa wrote:
What is the Bubble Layer. How can i us it?

Nothing special, it's based on the feature of Mapsforge Marker to have a Bitmap as an icon (and switch between a normal icon and a bubbled one).
There are already the BubbleOverlay and ChangingBitmaps examples in Samples to see the basics.


- The possibility to insert a new "ViaPoint" between two Via Points or insert before/after a Via Point

I intend to revisit the route points handling.
For now you can drag the route points (e.g. a via-point) on the map and change their order.


- Can you please integrate the elevation (from Graphhopper Feature) in the GPX File and show a elevation chart with distances?

You mean like at GraphHopper web map with the elevation chart for Bike / Foot travel modes?
Yes that's an interesting idea.

womisa

unread,
Mar 18, 2015, 5:19:36 AM3/18/15
to atla...@googlegroups.com, wms...@googlemail.com
Hi

- The possibility to insert a new "ViaPoint" between two Via Points or insert before/after a Via Point

I intend to revisit the route points handling.
For now you can drag the route points (e.g. a via-point) on the map and change their order.

..sure i use this very powerfull feature! But an insert is missing.....

- Can you please integrate the elevation (from Graphhopper Feature) in the GPX File and show a elevation chart with distances?

You mean like at GraphHopper web map with the elevation chart for Bike / Foot travel modes?
Yes that's an interesting idea.

yes and  ==> http://brouter.de/brouter-web/#zoom=12&lat=48.9328&lon=8.7516&layer=OpenCycleMap%20%28Thunderf.%29

I use in my own application  the elavation feature from Graphhopper. I show the Lat/Lon and Elavation with cursor moving in sync. I can select/optimize my route with this live display

Best regards
Achim

womisa

unread,
Mar 20, 2015, 8:51:27 AM3/20/15
to atla...@googlegroups.com
Hi Emux,

thanks for the new version with the long missing GPX import function!

However, I think you should separate the graph Hopper Route and Track. Or you should be able to load them separately. The Route for chance and edit the routing.

I have separated this into two separate files (routegpx and track.gpx with a editor)

see issue: https://github.com/graphhopper/graphhopper/issues/310

I am in contact because of the problem with peter.

This works for me very well.

Question: I can not load a GeoJson file generated by BrouterWeb. Whats wrong?

Many,many thanks for your exellent work
Achim

brouter.geojson

Emux

unread,
Mar 20, 2015, 9:20:14 AM3/20/15
to atla...@googlegroups.com, wms...@googlemail.com
Thanks for the feedback.


On 20/03/2015 02:51 μμ, womisa wrote:
However, I think you should separate the graph Hopper Route and Track. Or you should be able to load them separately. The Route for chance and edit the routing.

I have separated this into two separate files (routegpx and track.gpx with a editor)

see issue: https://github.com/graphhopper/graphhopper/issues/310

I am in contact because of the problem with peter.

I'm aware of that issue at GraphHopper and answered some suggestions there.

Right now I use the included routing gpx export, so it puts a route and track in the gpx file.


Question: I can not load a GeoJson file generated by BrouterWeb. Whats wrong?

I just made a test and it loaded fine. Have you seen an error dialog or exception?

Note that GeoJSON lines have a different semi transparent color.

womisa

unread,
Mar 20, 2015, 9:48:36 AM3/20/15
to atla...@googlegroups.com, wms...@googlemail.com

OH.....Sorry!

I can imagine a weak line at very precise look!

It works very well! But is a magic line

Kind regards
Achim


Am Freitag, 20. März 2015 14:20:14 UTC+1 schrieb Emux:
Thanks for the feedback.

I just made a test and it loaded fine. Have you seen an error dialog or exception?

Note that GeoJSON lines have a different semitransparent color.

Emux

unread,
Mar 20, 2015, 9:54:27 AM3/20/15
to womisa, atla...@googlegroups.com
I should probably change the GeoJSON colors in next version :)

Reply all
Reply to author
Forward
0 new messages