coord2zipcode is a perl script that can print city name, zip ranges, important buildings, public wireless access points from Mobilander and gps locations of cities in The Netherlands if the user specifies either a city name, a zip code or his current location. It reads this information from the file coords_nl.db.gz (13MB) which should be un-gzipped (53MB) and put in the users home dir. This database is created from several sources on the internet and from the amuse project. If the user specifies a coordinate (-c or -cz option), coord2zipcode also computes the distance to every location.

Usage:
coord2zipcode [-c|-cz] lat long range
coord2zipcode [-c|-cz] range
coord2zipcode -t city
coord2zipcode -z zipcode
coord2zipcode -o object
coord2zipcode -w wlan

The first 2 forms show the cities and their zipcodes and locations that are in the area [lat-range, long-range] - [lat+range, long+range]. If -c is specified, coord2zipcode only shows important buildings; if -cz is specified, the zipcodes in that area are also shown (warning: output can be very large!).

The second form tries to get the current location from gpsd at localhost (localhost:gps; works if "gps 2947/tcp" is added to /etc/services and gpsd is running).

The other 4 forms show cities and their zipcodes and objects and locations by specifing the city (case insensitive), zipcode, object or wireless lan access point provider.

Requirements: perl, libdbd-sqlite-perl, libnet-telnet-perl, gpsdrive (optional)

This program can be quite fun in a train or car ('while true; do coord2zipcode -c .03; sleep 10; done' to get a continuous update of the objects in your neighbourhood), but it can also be used to create waypoints files for gpsdrive. EG, with 'coord2zipcode -w mobilander|awk -F "$(echo -en "\t")" '{print $3"\t"$1"\t"$2"\tWLAN-WEP"}'|sed 's/ /_/g' > way_wlan_mobilander.txt', I created way_wlan_mobilander.txt which contains all public wireless accesspoints of Mobilander in the Netherlands. (Just put that textfile in ~/.gpsdrive and tell gpsdrive to use that file for waypoints.)