Giter Site home page Giter Site logo

vss-devel / tilers-tools Goto Github PK

View Code? Open in Web Editor NEW
16.0 5.0 7.0 415 KB

A few tools to create raster tile sets from digital maps and convert between tile set formats

Python 87.08% Batchfile 0.18% HTML 12.74%
gdal tilesets pyramid digital-maps bsb-charts

tilers-tools's Introduction

A collection of scripts for creating and handling a tile sets from digital raster maps. The scripts are based on GDAL tools.

NB: These scripts are not in active development anymore.

This version of the scripts requires GDAL python bindings version 2.xx


tiler.py -- converts a GDAL-compatible map file (dataset) into a set of zoom-leveled tile directories (a pyramid). A few output pyramid structure/projections (profiles) are supported: compatible with Google Maps (native and TMS-compatible), Google Earth and generic. The script is relatively fast, especially when processing a paletted source in the "draft mode" or rendering a few datasets simultaneously. It is also less picky with dataset formats and projections. In particular, it can cope with maps crossing the 180° meridian.

tiler.py should read from standard GDAL datasets, but for some of them it uses map2gdal.py internally to implement more accurate metadata translation: BSB (.kap), Geo/Nos (.geo), Ozi (.map) and KML with ground overlays (raster images). GDAL itself has some support for these formats, but the script extracts somewhat more geographical data from these source formats. For example, for BSB charts it supports more data and projections than GDAL does natively (currently the only datum for BSB charts is WGS84), it also makes use of BSB's DTM northing/easting data.

tiles_merge.py -- merges a few separate tile sets created by tiler.py into a single one, so to cover a larger area and/or more zoom levels.

tiles_convert.py -- converts tile sets between a few tile set structure and tile image formats.

Some auxiliary scripts:

ozf_decoder.py -- converts ozf2 and ozfx3 files into tiff format. If locally installed GDAL tools do not have an ozf reader built in, this one would help. This script is also able to cope with some broken files.

hdr_pcx_merge.py -- assembles a set of HDR-PCX chart tiles into a single PNG file;

tilers-tools's People

Contributors

vadp avatar vss-devel avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

tilers-tools's Issues

Memory problem

I'm tried to build tiles with command tiler.py -z 0,19 maps/global_ortho.vrt -t maps/orthotiles but as result it eat all the memory.

What is the proper way of call tiler.py ?

Too many values to unpack

I used this script a long time ago and it worked then, but something must have changed, as I have python complaining now:

python tiler.py /Volumes/Three/Documents/Kartes/Vesturiskas/KdWR/KdwR_J11_Lyserort_1917_400dpi.map INFO:root: /Volumes/Three/Documents/Kartes/Vesturiskas/KdWR/KdwR_J11_Lyserort_1917_400dpi.map : Kdwr_j11_lyserort_1917_400dpi.jpg (/Volumes/Three/Documents/Kartes/Vesturiskas/KdWR/KdwR_J11_Lyserort_1917_400dpi.jpg) INFO:root: WGS 84, Latitude/Longitude INFO:root: /Volumes/Three/Documents/Kartes/Vesturiskas/KdWR/KdwR_J11_Lyserort_1917_400dpi.vrt -> /Volumes/Three/Documents/Kartes/Vesturiskas/KdWR/KdwR_J11_Lyserort_1917_400dpi.zyx Traceback (most recent call last): File "tiler.py", line 181, in <module> main(sys.argv) File "tiler.py", line 175, in main parallel_map(process_src, flatten(res)) File "/Users/normis/tilers-tools/tilers_tools/tiler_functions.py", line 97, in parallel_map return map(func, iterable) File "tiler.py", line 66, in process_src prm.generate_tiles() File "/Users/normis/tilers-tools/tilers_tools/tiler_backend.py", line 696, in generate_tiles self.create_target_dataset() File "/Users/normis/tilers-tools/tilers_tools/tiler_backend.py", line 524, in create_target_dataset base_ds = self.create_warped_vrt(top_left_coord, res, size) File "/Users/normis/tilers-tools/tilers_tools/tiler_backend.py", line 545, in create_warped_vrt ok, src_igeotr = gdal.InvGeoTransform(src_geotr) ValueError: too many values to unpack

python --version
Python 2.7.10

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.