cferrero.net      

Mapping la vida loca

 

 Home

 Photos

 Videos

 Maps

 About

Concept

OSMgenerate produces OSM files consisting of a standard grid of POIs or polygons (lines are not yet supported), each with a unique tag/key combination. It also produces a mkgmap style file. By compiling the OSM file using mkgmap in combination with the style file, you can generate a Garmin map with a grid of POIs or polygons, each with a unique hexadecimal Garmin type code, so that you can see what POI or polygon corresponds to any given Garmin type code.

Where do I get it?

You can get the precompiled binary (for Windows only) here.
You can get the source code (in c) here. Usual disclaimers apply

How do I use it?

Either double click the exe file (in Windows) or compile the source file to an executable. Then answer the basic questions in order to generate a grid of POIs or polygons. The base coordinates (bottom left) are set by default within the programme, but you can change these by calling the executable with them as a command-line switch:
ogm_generate.exe baselat baselon
Where baselat is the base latitude in digital degrees (e.g. 51.41111) and baselon is the base longitude in similar format.

Once the programme is complete, you will find an OSM file and a style file (either a points style file if you selected the POI option, or a polygons file if you selected the polygon option). Move the style file to a new directory (e.g. called test) and invoke mkgmap:
java -ea -jar mkgmap.jar --gmapsupp --style-file=path_to_test -c template.args

You can now open the gmapsupp file in your GPS and see what each type code corresponds to - each element in the Garmin map will be labelled with the type code.

Note If you are using Mapsource, remember that later versions of Mapsource cache tiles. Thus if you are continually changing the map, then re-opening Mapsource, you may be looking at the cached version, not the latest version. I recommend creating a batch file to a) build the map and b) wipe the tile cache clean every time you rebuild your test map. In Windows Vista, the command is:
del c:\users\YOURUSERNAME\appdata\roaming\garmin\mapsource\tilecache\*.tile

Disclaimer

THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  Copyright 2005-2010 All Rights Reserved cferrero.net