Norwegian traffic messages in Google Maps

Blog,English — Tags: , , , , , — Alexander Nossum (alexanno) | 21 January, 2009 @ 1:49 pm

The popularity of traffic messages visualized in a map is increasing – especially with the advent of GPS enabled devices supporting RDS/TMC. In Norway there are only one or two businesses that provides such messages – although the information has been available for several year (natural language over FM-radio, newer; natural language over XML).

In a response to this NRK now released their traffic messages in RDS/TMC for every device supporting this. When looking at their page I found out that they additionally, actually delivers the same messages georefered with lat/lon and timestamps. So, while having a slightly slow day at the office I decided to prototype a system that retrieves the feed (serverside), parse it, and serves it (or part of it) in JSON and then visualize it in a map.

The solution can be found here. As always the system is not intended to be bulletproof, so be nice! It updates the data every 60 seconds using AJAX/JS, whether that is necessary is another discussion:)

And, yeah, I know P4 has a similar solution, and I ain’t gonna compete nor compare;)

Screenshot of the prototype

Screenshot of the prototype

Tracking your christmas packages

Blog,English — Tags: , , , , , — Alexander Nossum (alexanno) | 22 December, 2008 @ 4:22 pm

During christmas time a common activity is to track either your own sent packages or your receiving packages. The postal system in Norway (posten.no) provides a solution for finding the path of a package sent. One can say the system is driven by geographical attributes, however, no map is ever utilized. I found this a bit strange and during a late evening some days ago I set out on the mission to try to prototype such a solution. The solution became a system wrapping the package tracking web-site from posten.no, extracting the geographic location (postal code and place name), geocoding them on-the-fly and visualizing the information in a map with lines indicating the path. The system can be found in the sandbox; package tracking. If you don’t have a package to track you can test with this package; sm128209247no

Snapshot of prototype

Snapshot of prototype

I wonder why they don’t have a solution like this already? Fairly easy to prototype, fairly free-of-charge, easy to scale… What’s the downside? Creativity?

Oh, btw!

Merry Christmas everybody!

Redirecting/prettifying URLs with .htaccess

Blog,English — Tags: , , — Alexander Nossum (alexanno) | 25 January, 2008 @ 12:20 pm

Everyone that has ever tried to use mod_rewrite with .htaccess files, to get a nice url or even just to redirect to a subdirectory without the user knowing it, have probably been swearing, biting, hitting and cried over; the regex, the syntax, the lack of (human-oriented) documentation and so on.

A friend of mine and I tried went through several of these phases yesterday; the goal was easy:

get http://localhost/ams/anything.php to redirect to http://localhost/ams/qsys/anything.php

With localhost being variable and offcourse http://localhost/ams to redirect to http://localhost/ams/qsys/

We tried several approaches with increasing complexity. And cried, sweared, killed apache and so on. The apache test server was installed locally on windows plattform (xampp) so the first glimpse of light was when we realized the /apache/logs/error.log and the setting for apache; LogLevel debug. This resulted in some debug information on what the .htaccess made apache do. After realizing the plain .htaccess in /ams/.htaccess, containing something like this;

RewriteRule ^(.*)$ qsys/$1 [L]

Made apache reach a recursive hell into qsys/qsys/***. But nevertheless, at the first call it did exactly what it was supposed to do. So. How to stop it. The solution, easy, probably not a silver bullett, but works;

A .htaccess in /ams/qsys/.htaccess with RewriteEngine Off

Like a deux ex machina it worked!

So, to all out there that have reach insanity over mod_rewrite and nice urls. Do it simple! Hope it works out well:)

« Previous Page
This work is licensed under a Creative Commons Attribution 3.0 Unported License.
(c) 2010 What's Sound? | powered proudly by WordPress