Gosmore

From OpenStreetMap

Jump to: navigation, search
Gosmore Screenshot
Gosmore Screenshot

Gosmore is a routing and viewer of OSM XML data such as the planet.osm, [1] or [2].

Contents

Features

  • A map viewing window (Mercator projection)
  • Incremental search of all tags. Results are ordered from nearest to farthest.
  • Routing
  • Obtaining the current location from a GPS receiver using gpsd (Linux) or from a NMEA source (Windows CE).
NB: As of 1 August, Gosmore not longer goes into an infinite loop when compiled with gcc-4.x.

Downloading and running

  • Linux or FreeBSD:
svn co http://svn.openstreetmap.org/applications/rendering/gosmore/
cd gosmore
make
bzcat planet-...osm.bz2 | ./gosmore rebuild 

This last step takes typically 3 hours for a current planet file on a dual core 64 bit machine with 2GB RAM and requires close to 20GB of harddisk space.

On FreeBSD, you will need to use GNU Make (gmake) to build as the Makefile is in a GNU Make format, rather than the traditional BSD make.

After building it, it will run fairly responsively on a 256 MB machine.

  • Windows: Download it from http://www.rational.co.za/gosmore/ You will however need a Linux user to provide you with the gosmore.pak file. Ironically the rendering of rotated text is faster than under Linux.
  • maemo devices from Nokia: See [3].
Gosmore on WinCE
Gosmore on WinCE

GTK+ Interface (Linux / Windows)

The main window consists of

  • the map view Click to pan.
  • the search box
  • the search results Click / double click to move there
  • options for selecting icon types, detail level and routing settings.
  • the location bar Copy and paste to / from JOSM or the www.openstreetmap.org permalinks.

Windows CE Interface

Gosmore starts in menu mode. You can cycle through the options with the 'O' button and change (or activate) them using the '+' and '-' buttons:

  • On a touchscreen device you should activate QuickOptions for rapidly configuring the program.
  • Activating the Search option will open the search dialog. When ModelessDialog is 1, it works better on some devices, while on others it does not work at all.
  • Editing.
  1. To add a node, activate the AddWayOrNode option and click on the location of the node.
  2. If you then click on 'O', a dialog will appear where you can enter the name and type of the node. To add a way, follow the same procedure, but click multiple times on the map.
  3. Exit gosmore and sync with your PC.
  4. Open '\My Documents\gosmoreN.osm' and '\My Documents\YYMMDD-HHMMSS.gpx' with JOSM.
  5. Download data to the same layer.
  6. Edit. To find the changes pending, click on search and enter 'id:'.
  7. Upload
  • Changing the CommPort and BaudRate settings requires restarting the application. The Windows CE version saves the options and GPX tracklogs to '\My Documents', while the other ports save it to the current directory.
  • Activate the 'Exit' option to close the application and write the GPX file and the options.

The last display in the cycle is the map mode. There you can use the '+' and '-' buttons to zoom or click on the map to pan.

On phones and other devices without a mouse and a touchscreen, use the arrow keys and '9' as '+', '8' as '-' and '0' as 'O'.

Devices

Device CommPort BaudRate AnsiCodePage Notes Date
TGPS 374 1 0 0 Works perfectly 08-06-21
JNC 578 7 38400 0 Hangs after FollowGPSr 08-06-21
XRoad v4150 5 9600 1 No luck with 'FollowGPSr' yet [4] 08-06-24
HTC P3600 9 9600 0 Taskbar gets a little bit in the way 08-06-28
MyRoad 4308T 2 38400 1 Works fine 2008-07-15
ETEN M500 (w/BT GPS) 7 4800  ? Works well, but some of the dialogs don't work very well in a portrait-orientated screen 2008-07-26
Lark 35.3 (w/SiRFstar III) 1 9600 0 (English) Works fine 2008-08-08

Tips and tricks

  • Type the name of an item to the search in the line edit. Double click an item in the list to center the map around that area.
  • To find nearby amenities enter the relevant tag value, e.g. fuel.
  • To find the name of the area you are looking at, try to search for suburb, city or village. Click on the item and look at the name that comes up.
  • To see all the tags for an object, zoom in very close.
  • Use the mouse wheel to zoom in and out
  • Use the left mouse button to pan the map. Click above the center of the map to pan upwards, click below the center of the map to pan downwards and vice versa
  • Mark the starting point of the desired route with the middle mouse button and the end point with the right mouse button. Gosmore will paint the route into the map
  • Set the render quality to lowest for a more responsive experience.
  • For optimal battery life, only 'Follow' when you are looking at the display. A simple tap on the map will cancel the 'Follow' function.
  • If you have an already extracted OSM file, e.g. as output by the planetosm-excerpt-area.pl script, you can feed it into gosmore as well:
cat MyArea.osm | ./gosmore rebuild
  • You can create a smaller pak file by specifying a cropping bounding box during a second pass. For example for a 32 bit machine can exclude the Americas to create a file that will fit into the address space:
 mv gosmore.pak master.pak
 bzcat planet...osm.bz2 | ./gosmore rebuild -83 -30 83 179

Major bugs and shortcomings

In order of importance:

  • Translations (being worked on)
  • Improve verbal instructions (being worked on)
  • 3-D display
  • Turn restrictions aren't implemented, because the commonly used tag is ambiguous and not approved.
  • Rotate the map with gpsd.
  • 32 bit machines can create and use only pak files smaller than 2GB.
  • Pak file cannot be dynamically updated e.g. osmosis. However, since the objects we map (roads etc) change infrequently and mappers take very long to resurvey existing data, you will most likely only find the spots where the pak file is out of date if actively go looking for them.
  • Pak file cannot be moved to a machine with a different endianness.
  • If double decker bridges are drawn with 2 or more nodes on exactly the same latitude and longitude, gosmore may make incorrect routing decisions. (It can be solved at the cost of a 10% larger pak file).

Internals

Gosmore makes extensive use of sorted arrays, integers and fixed point numbers. See the current file format [5]

The source code has a low complexity (measured by Halstead Metric or SLOC), reducing the number of bugs.

Why isn't there an OpenMoko, Java, Nokia, iPhone, OpenTom or Palm port ?

Because

  • the WinCE installed base is huge and growing at more than 1 million per month.
  • the WinCE Core that gosmore requires is cheap [6]. Expect to find WinCE based GPSs (new or secondhand) at an online auction site near you at rock bottom prices. Many of the house brand GPSs are WinCE based. All that's needed is a way to unlock the device [7] [8]
  • the Win32 API has been stable for more than a decade now and we don't need the messy parts like WinSock and OverlappedIO.
Personal tools
recent changes