Showing posts with label Travel. Show all posts
Showing posts with label Travel. Show all posts

Saturday, 9 February 2019

TravelTimeCalculator: Updating Markers When Moving Map

A couple of blog posts ago, I said that my final step was to add a custom image to the marker. I found some more things to do before I can consider the project to be finalized:
  • Estimating a cost that is related to the travels. That cost will consider ticket costs for public transit, fuel costs and time needed for finding parking slots for driving, environmental impact and time consumed. I'll elaborate more on that in a future blog post.
  • Refreshing the markers when the user is moving the map.
The first step is to clear the current markers from the map in the onCameraMove method.

After the old markers are cleared and removed from the map, I need to search the database for existing directions that origins or ends at the center of the map. I implemented getCoordinatePairsForPosition in dbHelper to get an arrayList of the found coordinates.

For all directions that are found, I query the database for the best direction. Using that information, I add a new marker.

Some screenshots from the app are shown below.
Step 1: User has added some markers with the shortest mode of
transport from the cross-hair center marker.
Step 2: When the user is moving the map,
the existing markers are removed.

Step 3: When the user moves to a position that has existing directions
in the database , markers are added to the map.
Next, I'll add a second activity where the user can select how the best mode will be selected: Shortest distance, shortest duration or the lowest total cost.

Side note: Issue seen for rounding: Sometimes, 13.0999 is rounded to 13.1 and sometimes 13.0. 
Root cause: Inconsistent rounding and truncation. Fix: Be consistent with how to round coordinates.


Thursday, 27 July 2017

Trains: Estación Internacional de Canfranc

Estación Internacional de Canfranc is a partially closed station in the French/Spanish border, between Pau, France and Zaragosa, Spain.





The line opened 1915, and the station opened in July, 1928 as the biggest station of Europe at that time. With a length of 241 meters and 75 doors on each side, the station is impressive. It also has an interesting history from WWII.





The village of Canfranc is quite small, but a huge station was needed to transfer passengers and cargo between the French standard gauge (1485 mm) to the Spanish gauge (1672 mm).


The line wasn't profitable and it was shut down after a derailment accident on the French side 1970, since SNCF decided not to repair the line.


Currently, there is still some traffic to the station from the Spanish side.










The last pictures are from another closed station along the line.






For more pictures of the interior of Canfranc station, I can recommend http://www.canfranc.de/

Sunday, 24 August 2014

Maputo, MZ: The Maputo Railway Station

This station is considered to be one of the world's most beautiful stations, and with its beautiful architecture, I can agree to that.




It was built 1916 but the architect wasn't Gustave Eiffel (Eiffel Tower and Statue of Liberty) as I heard when coming to Maputo. That station has been featured in films such as Blood Diamond




Mocambique has a fragmented railroad system with three lines that are separated from each other: the Nacala railroad (north), the Beira railroad (mid) and the Maputo railroad (south).




CFM stands for Caminhos de Ferro de Mocambique, the iron roads of Mocambique. The URL of CFM is: http://www.cfm.co.mz/ The web page is only in portugese.





Tuesday, 3 June 2014

Victoria Falls, ZW: More monkey business

We met some more monkeys that were much cuter than baboons, Vervet Monkeys, in St Lucia and later in Pilansberg, Victoria Falls and Great Zimbabwe.



The background music is from Youtube Audio Library.

As I have lots of things to do at work currently, I'll keep the blog in Idle Mode until the middle of June.


Thursday, 22 May 2014

Boulders Beach, ZA: African Penguins (day 6)

Boulder's Beach is a part of Table Mountain National Park, south of Cape Town. That beach is a protected area for thousands of African Penguins. The population of penguins has risen dramatically since the 1980's, when there were only two spotted penguins in the area. It is listed in the IUCN Red List over endangered species.




The diet of African Penguins is normally sardines, anchovies. As you can see in the movie below, that species is monogamous.





If they are not eaten by sharks, seals, mongooses or cats(!), they can live for ten up to twenty-five years.




I think that the language spoken in the background is Afrikaans. If I'm wrong, you're welcome to comment.

Thursday, 13 March 2014

Cape Town, ZA: Township Projects - My Impressions

During the first day in Cape Town, we visited two different society projects in Khayleisha, one of the biggest townships in Cape Town, housing more than 1M residents.

Before the visit, I had some thoughts regarding my visit to that township:
Did I exploit the citizens of the township as a priviligied westener with one day of charity? How would the residents think about us, who are able to enter and escape poverty any time?

After the visit, I may not be wiser, but I have some more realistic perspectives. Yes - there is poverty and some serious social problems.

But my strongest impressions from that visit is hope, empowerment and ambition.

The first visit was to Iliso Care Centre in a township house. Lunga presented the child group, the computer training room and the soup kitchen. Gagela and Lunga were very proud of the centre - and they should be. They asked me to spread information about the centre. Their URL is www.iliso.org

The second centre, Philanti, has a clinic that visits and assists pregnant women and women with small children. We visited a class with small children and we bought some bags that women in the centre produced, singing a beautiful song for us. Stembile and Cynthia were operating the sewing machines.

In that huge township, I met strong, comitted and positive people with strong networks - neighbors helping each others.

When discussing societies and poverty, it is important trying not to be too biased by ones previous understandings.

I will post more pictures and thoughts later.