[OSM-dev] Cutting the planet into tiles

Frederik Ramm frederik at remote.org
Thu Dec 4 23:40:45 GMT 2008


Hi,

Ben Supnik wrote:
> Before I go forward...am I reinventing the wheel? 

Well here's my version of the wheel, in
svn.openstreetmap.org/applications/utils/osm-extract/osmcut/osmcut.c:

/*
  * osmcut.c
  *
  * Cuts up osm data into a grid of individual files, each containing
  * an area of x by x degrees (with x variable).
  *
  * Usage:
  *   osmcut [--destination|-d outputdir] [--force|-f]
  *          [--size|-s tilesize] input.osm
  *
  * Where tilesize is the length, in degrees, of a tile edge. This defaults
  * to 2.5 degrees.
  */

But be sure to read the caveats in the file comments, especially #9 
(which would be easy to fix if you need it). It is fairly efficient but 
maybe your algorithm is better? There's also a (source code unreleased) 
Java program that does the same (in preparation for Garmin map creation) 
but reportedly is better at keeping boundary ways intact, contact Wiki 
user "computerteddy" or check out his user page.

Bye
Frederik

-- 
Frederik Ramm  ##  eMail frederik at remote.org  ##  N49°00'09" E008°23'33"




More information about the dev mailing list