[Mapit] Creating tiles from raster and vector graphics

Bernhard Herzog bh at intevation.de
Thu Mar 1 16:19:52 CET 2001


Just a quick note for everybody who wants to adapt existing vector or
raster graphics for MapIt!. MapIt! comes with a script called epscut
that reads an EPS file and renders a complete tile hierarchy from it
using ghostscript. The script is not very polished because I wrote it as
a quick hack to create the Europe example tileset.

Basic usage:

   src/tools/epscut map.eps

This will create the tile hierarchy in a subdirectory called map,
complete with the info files.

What zoom factors will be available and the tile size is hardcoded in
one place in the script (patches to make this more flexible welcome :)),
in lines 189 and 190. overview_size is the size of the overview tile,
while factors is a tuple containing the zoom factors to use.

The script can be used to cut raster images into tiles as well, by
converting it to eps (e.g. with ImageMagick's convert) and, for optimal
quality, choosing overview size as a divisor of the raster image's size
in pixels and setting factors to (1, f) where f is the quotient of the
image size and the overview size.

  Bernhard

-- 
Intevation GmbH                                 http://intevation.de/
Sketch                                 http://sketch.sourceforge.net/
MapIt!                                               http://mapit.de/




More information about the Mapit mailing list

This site is hosted by Intevation GmbH (Datenschutzerklärung und Impressum | Privacy Policy and Imprint)