Giter Club home page Giter Club logo

gdal2tiles's Introduction

gdal2tiles

image

image

Documentation Status

A python library for generating map tiles inspired by gdal2tiles.py from GDAL project.

Dependancies

  • GDAL development header files, sometimes available as libgdal-dev or libgdal-devel packages.

Installation

To install gdal2tiles library you can use pip:

$ pip install gdal2tiles

Basic usage

import gdal2tiles

gdal2tiles.generate_tiles('/path/to/input_file', '/path/to/output_dir/')

You can also pass various keyword as optional keyword arguments to generate_tiles() function. For example

gdal2tiles.generate_tiles('input_file', 'output_dir/', nb_processes=2, zoom='7-9')

OR

options = {'zoom': (7, 9), 'resume': True}
gdal2tiles.generate_tiles('input_file', 'output_dir/', **options)

In general

gdal2tiles.generate_tiles(input_file, output_folder, **options)
Arguments:

input_file (str): Path to input file.

output_folder (str): Path to output folder.

options: Tile generation options.

Options:
profile (str): Tile cutting profile (mercator,geodetic,raster) - default

'mercator' (Google Maps compatible)

resampling (str): Resampling method (average,near,bilinear,cubic,cubicsp

line,lanczos,antialias) - default 'average'

s_srs: The spatial reference system used for the source input data

zoom: Zoom levels to render; format: '[int min, int max]',

'min-max' or 'int/str zoomlevel'.

tile_size (int): Size of tiles to render - default 256

resume (bool): Resume mode. Generate only missing files.

srcnodata: NODATA transparency value to assign to the input data

tmscompatible (bool): When using the geodetic profile, specifies the base

resolution as 0.703125 or 2 tiles at zoom level 0.

verbose (bool): Print status messages to stdout

kml (bool): Generate KML for Google Earth - default for 'geodetic'

profile and 'raster' in EPSG:4326. For a dataset with different projection use with caution!

url (str): URL address where the generated tiles are going to be published

webviewer (str): Web viewer to generate (all,google,openlayers,none) - default 'all'

title (str): Title of the map

copyright (str): Copyright for the map

googlekey (str): Google Maps API key from

http://code.google.com/apis/maps/signup.html

bingkey (str): Bing Maps API key from https://www.bingmapsportal.com/

nb_processes (int): Number of processes to use for tiling.

gdal2tiles's People

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.