Giter Site home page Giter Site logo

gastonzalba / wmts-downloader Goto Github PK

View Code? Open in Web Editor NEW
4.0 1.0 0.0 2.1 MB

Script to download raster layers from WMTS services. The proccess downloads each geoserver tile, geolocates it, and creates a world file for each tile.

Python 100.00%
download downloader geoserver raster tiles wmts

wmts-downloader's Introduction

wmts-downloader

Script to download raster layers from WMTS services. The proccess downloads each geoserver tile (256x256), geolocates it, and creates a world file for each tile. These can then be merged, cropped (and maybe reprojected) using gdal, qgis, etc. Keep it in mind that if the target zoom level is to high, and/or the area of interest is big enough, each execution can trigger thousands or millions of requests to the server, so use this with caution. To avoid overloading the server and facilitate the process, the script can resume incompleted jobs and add some sleep time betweeen requests. Running it multiples times with the same parameters, it will continue from the last downloaded tile.

Installation

  • Create a local enviroment running python -m venv .venv (install virtualenv if you don't have it)
  • Load the local enviroment: .venv\Scripts\activate
  • Install using pip install -r requirements.txt

Instructions

  • Load local enviroment .venv\Scripts\activate
  • Run python wmts-downloader.py --help to show all available options and arguments
  • Run the script with something like this python wmts-downloader.py https://imagenes.ign.gob.ar/geoserver/cartas_mosaicos/gwc/service/wmts --layer cartas_50k --zoom 14 --limit 1000 --bbox -7092196.7637569485232234 -5039771.7783368593081832 -6263492.7329376600682735 -3889283.7355505060404539
  • You can use the limit and sleep arguments to avoid overloading the target server. You can later rerun the script to continue from the last downloaded tile.
  • Check the console for details and the /output folder (the default) for the tiles

Example to combine tiles

  • Check combine-ign.py file to see an example to combine, crop and reproject the tiles using a geojson shape as reference.

Limitations

  • The projection EPSG:3857 is currently the only one supported

Todo

  • Add EPSG:4326 support

wmts-downloader's People

Contributors

gastonzalba avatar

Stargazers

 avatar  avatar

Watchers

 avatar

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.