Skip to content

hstin-de/lightpollution

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 

Repository files navigation

Light Pollution Map Tiles

Here's a simple way to turn light pollution GeoTIFF data into map tiles using gdal. It's just a small script I made, nothing fancy, but it works!

What you need

  • Light pollution GeoTIFF data (download for example from here)
  • gdal
  • mb-util (to convert tiles into a single mbtiles file, install it with pip install mbutil)

Quick Start

  1. Extract the downloaded GeoTIFF if it's zipped.
  2. Run the script like this:
./tile.sh World_Atlas_2015.tif colors.txt 3-12 48 output_tiles

This will make tiles for zoom levels 3-12 in the output_tiles folder using 48 threads.

  1. (optional) Convert your tiles to MBTiles format:
mb-util --silent output_tiles --scheme=tms lightpollution.mbtiles

(you need to use --scheme=tms because gdal2tiles outputs already in the XYZ scheme, but mb-utils tries to flip the Y axis again)

That's it! You'll end up with a lightpollution.mbtiles file ready to use.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages