OSM Composer

From OpenStreetMap Wiki
Jump to navigation Jump to search

Description

OSM Composer is a Java GUI to create up-to-date topological maps. The current version generates maps for Garmin devices with custom map features. Composer is intended to simplify/automate the steps of creating topo maps with the latest data for selected regions. The idea is to define your areas of interest (home town, mapping area, hiking tours, frequently visited places) and transfer only that data to your device instead of whole continents. But these areas of interest should be done with the latest data - including your own recent editings uploaded 10 minutes ago - and displayed exactly in the way you like it, customized for your favourite pastimes. To this end it contains an editor for customizing the mapping instructions of mkgmap and a TYP file for your device in one integrated tool. It can also do some additional transformations on the OSM data. Once everything is set up, you just press "Generate" and watch Map Composer do all the work.

Originally I had intended to develop Composer as an internationalized application and support it here on this page in English. But as the translation effort was never completed and virtually all questions were in German I have decided to fall back to a German application at wiki page as of V0.7. The current version is available there now.

The older version was still available here, but unfortunately it has been deprecated 
by the change to API0.6 and the development of mkgmap and srtm2osm.


OSMC Screen1.jpg OSMC Screen2.jpg OSMC Screenshot3.jpg Mtb=yes.png

Screenshots of hiking/trail riding map created with OSM Composer V0.5


Main design goals:

  • Manage a set of regions, download data for smaller regions
  • Integrate all required tools into a simple GUI, generate new map with one click
  • Integrated editor for designing TYP files and matching mkgmap rules
  • Route handling and conversion rules for custom map enhancements
  • Integration of MapSource and devices via sendmap20


OSMC rule editor.jpg

Screenshot of the editor for mkgmap rules with integrated TYP file support.


I have written OSMap Composer for my own use to create the best possible topo map for my Garmin etrex Vista HCx. It works for me but it comes without any warranties and has only been tested on Windows. It is currently not open source, but free to use. Internationalization is available but the only maintained language is German. If you feel like changing that, let me know. :-)


OSMC dataflow.jpg

This diagram shows the flow of data in the map generation process and the tools and files involved. This diagram shows V0.51.

Features

Current version V0.60

  • Manage a set of different regions that will be combined into a Garmin map
    • Set a region by geo coordinates
    • Set a region by dragging a openstreetmap.org URL
    • Quickly include and remove regions from the map set
    • Download OSM data for regions
      • Update in configurable intervals
      • Download partitioned in small segments that can be handled by the server
      • Segment size configurable for regions with different topo density
      • rather fast, multithreaded downloading
      • Auto-Retry if download of a segment fails
      • Proxy server support
      • Select download xapi URL
    • Alternatively read from local OSM file
      • Directly load a region from an OSM file
      • cut file from a planet file with Osmosis
  • Create topological contour files using srtm2osm
    • update contours only if required
    • elevation lines intervals configurable in GUI
    • numbering may be removed from minor elevations to declutter the map
  • Preprocess Conversion on OSM data
    • Modifies the OSM data to allow additional object combinations
    • Complex replacement rules
      • Conditions for one or a combination of two tags
      • Conditions using regular expressions
      • Adjustable order and break option.
    • Custom tagging
      • Change and replace tags
      • Creation of overlays
      • Marking nodes of a way with an icon
  • Support for route relations
    • Filter what route types to use
    • Manage list of routes to show
    • Mark route segments by name
    • Render routes with markings
    • Render routes as overlays
    • Helper button to add hiking routes into WikiProject Germany/Wanderwege-Netz
  • TYP file integration
    • Custom names
    • Custom line types, solid and patterned
    • Custom area types
    • Custom POI icons
      • use PNG icons directly (e.g. from JOSM)
    • generate and compile TYP file with cgpsmapper
  • Mapping rule editor
    • Import existing sets of mapping rules for mkgmap
      • Create dummy TYP entries for unknown items
    • Editor for mapping rules, assigning Garmin objects to tags
      • Graphical hints in editor how an object will be rendered
    • Filtering, Search and Replace functions for all data
    • Validator indicates invalid rules that cannot be displayed
    • statistic about usage of mapped tags and unknown tags in your data
  • Editable map levels
  • Combines all data into a garmin map using mkgmap
    • generate mapping rules from editor data
    • use ready-made mapping rules if you haven't customized them yet
  • Map Source integration
    • configurable product code and family ID
    • Patch/Rename overview map file from mkgmap to make them work in MapSource
    • Generate matching registry-File for maps and TYP file
    • automated install/uninstall in registry
    • Warning if MapSource is running
  • Creates a batch file with all external commands used to create the map
  • Install map into Garmin device
    • Send map directly with sendmap20
    • create gmapsupp.img locally if not uploaded directly


Getting OSM Composer

Prerequisites

Download

See DE:OSM Composer (German) for the current version.

The last version of OSMap Composer with support in English was V0.60. It has been deprecated by the change to API0.6 and ongoing development on mkgamp and srtm2osm, so it does no longer run.

Changes in V0.60:

  • switched data handling from jdom to stax. Memory consumption drastically reduced, can handle handle osm files of 600MB now.
  • Osmosis integration changed, now several regions can be cut from the same file in one step.

Last stable version of OSMap Composer is V0.53. Download

Language Files in English are here, some menus are still in German - not in config files for English: Download Language Files

Changes in V0.54dev:

  • Backup feature keeps copies of the ways you yourself have mapped
  • fix: Bug in topo type filter when creating new rules

Changes in V0.53:

  • The Ignore list has been extended (see manual).
  • Adjustable memory request for java tools
  • Internationalization enabled
  • Helper button to add hiking routes into WikiProject Germany/Wanderwege-Netz
  • Editable map levels
  • Replacements now have a defined order and break option.
    • Attention: If you are updating, you need to generate once before changing the order will work.
  • fix: Multiple replacements not working.

Changes in V0.52:

  • Improved error handling
  • fixed excessive memory requirement for Java tools

Changes in V0.51:

  • Major Performance improvements
  • Improved handling of large files
  • Improved MapSource integration
  • Improved mkgmap rule import
  • Integration of external TYP files
  • Customizable contour setup
  • Attention 1600MB of Memory have to be available for JVM, otherwise this version won't run. Maybe critical under Windows XP.

Installation

  • Download and install
    • First install: Unzip into any directory
    • Updates: Copy only the .jar files
  • Start application with start.bat
  • Open options with button "Einstellungen"
    • Define your working directory
    • Set the path to the (included) icons directory
    • Enter the path to your srtm2osm
    • Enter the path to your mkgmap
    • Enter the path to your sendmap
    • Enter the path to your cgpsmapper (if you want to create TYP files)
    • Enter the path to your osmosis (if you want to read parts of local files)
  • Restart

Usage

OSMap Composer is simple to use. Enter the regions you are interested in, press generate button, and wait for the progress bar. Composer will call all required tools and put the resulting map into MapSource and onto your device.

If you already have a pre-made TYP file and map_feature.csv for mkgmap you can use these files.

If you want to customize your map design, you can use Composer's editor to edit TYP definition and mkgmap rule set at the same time and produce a consistent layout. By default, Composer contains my setup to produce a topo map that looks very much like a 1:25000 hiking map, particularly tuned to show the different grades of paths and tracks and landmarks useful for orientation as well as some additional hints for trail riding.

Composer can enrich the map by adding/duplicating map elements to be rendered in different ways on top of the basic content. Set up the "Ersetzung" rules to use this. Composer also offeres support for marking hiking routes (or any other route relations) in the map.

See OSM Composer/Manual for the beginnings of a manual.

Output

The results of a generation run are:

  • gmapsupp.img: The garmin map created by sendmap (if not uploaded directly to device)
  • 88220000.tdb + *.img: Garmin map files
  • 88220000.reg: Registry file to install the maps into Garmin MapSource
  • commands.log: the commands for external tools used to create the map
  • statistics.txt: a statistics on used tags and unknown tags in the processed data
  • customMapping.csv: the mapping rule file (only if you have activated the rule editor)

See also