Archive for October, 2007

EarthTools.org Contour Mapplet

Monday, October 29th, 2007

Google Maps has had the ability to add and share extra content in the form of mapplets. I’ve recently added a mapplet that allows you to add a layer showing the elevation contours that have been on EarthTools.org for the last year.

Add the EarthTools.org Elevation Contours mapplet.

I have been adding new coverage for the contour layer for the last few months and most popular areas already have good coverage. I’ve also recently updated my data for Canada meaning much better coverage with fewer void areas and coverage above 60 degrees north. There are now something like 700,000 tiles covering seven different zoom levels and I am adding about 20,000-30,000 more tiles every week.

Highway improvements!

Friday, October 19th, 2007

Bournemouth Borough Council wrote to everyone in this small area today to get our opinions on some highway improvements that they are planning for the road outside the flats where I live.

Manor Road in Bournemouth is a nice road lined with pine trees, but there are a deceptively large number of people living in the area because of the prevalence of large blocks of flats. The junction at the western end of Manor Road where it meets Gervis Road seems to be quite dangerous - I have seen at least two accidents here caused by shunts in the last few months.

The council are planning on taking action though. The proposal out for consultation at the moment involves making the westernmost part of Manor Road one-way and realigning both junctions with Gervis Road. The proposal also includes two new zebra crossings, one on Manor Road opposite Marchwood (number 8) and another by the Gervis Road surgery. Right turns into Manor Road from Gervis Road by the St. Swithun’s Roundabout will be blocked by a new central island, including a refuge for pedestrians to cross. Finally, the proposals add a segregated cycleway/footway along Manor Road where it becomes one-way.

The proposals look very good from a road safety point of view. My only concern is that the realignment of the junction at the entrance to our block of flats is likely to cause disruption. It’s certainly good that the council are keen to hear our opinions.

Getting the date and time format Strings for any locale with Java

Thursday, October 18th, 2007

I needed to be able to get the format Strings to use for the current locale so that I could pass them to a third-party API that I was using in Java. While the third-party API used the correct format for the current locale, it used the short form of the date rather than the medium form (difference in the UK is that the short form is 18/10/07 and the medium form is 18-Oct-2007). This was a bit of a challenge and required looking at the Java source code for the SimpleDateFormat class. In the end I worked out a solution, but it’s less than simple and probably isn’t future proofed. It works for Java 6 though:


ResourceBundle rb = LocaleData.getDateFormatData(Locale.getDefault());
String[] dateTimePatterns = rb.getStringArray(”DateTimePatterns”);
String datePattern = dateTimePatterns[DateFormat.MEDIUM + 4];
String timePattern = dateTimePatterns[DateFormat.MEDIUM];
System.out.println(datePattern + ” - ” + timePattern);

There must be a simpler solution, so let me know if there is!