GithubHelp home page GithubHelp logo

hkucuk / dem-tiler Goto Github PK

View Code? Open in Web Editor NEW

This project forked from kylebarron/dem-tiler

0.0 0.0 0.0 10.7 MB

Serverless terrain contours, quantized mesh, and RGB-encoded terrain tiles

License: MIT License

Shell 6.39% Python 92.58% Makefile 0.57% Dockerfile 0.46%

dem-tiler's Introduction

dem-tiler

Work in progress

A fork of cogeo-mosaic-tiler to serve elevation products on demand from a mosaic of Cloud-Optimized GeoTIFF elevation data.

Overview

Input Formats

AWS Terrain Tiles

AWS Terrain Tiles is an open dataset on S3 with global elevation data in the Web Mercator projection. This makes it easy to use as an input format, and is the fastest input format available.

COG MosaicJSON

MosaicJSON of Cloud-Optimized GeoTIFF (COG) files.

The USGS has recently put almost all their elevation files in COG format. Additionally, the USGS plans to complete 1-meter DEMs of the entire continental U.S. by the end of 2023, and all these files are created in COG format. See usgs-dem-mosaic (WIP) for instructions on creating a MosaicJSON of USGS COGs.

Output Formats

Terrain RGB

Encodes raw elevation values into a PNG, using the red, green, and blue channels for a high bit depth. The terrarium encoding has 3-millimeter precision and the mapbox encoding (not yet implemented) has 10-centimeter precision.

If you plan to use AWS terrain tiles as the input format, and don't plan to add a buffer to the tile, there's no reason to use this package, and you should access the public tiles directly.

Extra buffer

Can export PNG images of size 258x258 pixels or 518x518px, i.e. an extra 1-pixel border around the normal 256 or 512-pixel tile. This is helpful for client-side slope computations, where you need a 1 pixel border around the tile.

Contours

Uses gdal_contour and tippecanoe to provide Mapbox Vector Tiles of elevation contours on demand. Contours can be generated at an arbitrary interval, and can be shown in either meters or feet.

Quantized Mesh

Quantized Mesh is a file format for terrain meshes, ideal for transport to the browser for 3D terrain rendering. This output format uses pymartini for fast mesh generation from a raster heightmap, and then quantized-mesh-encoder to encode the mesh.

Deploy

Package Lambda

Create the AWS Lambda deployment package

make package

Deploy to AWS

This project uses Serverless to manage deploy on AWS.

If you plan to use AWS Terrain Tiles as input data, you should deploy to us-east-1 for minimal latency. If you plan to use USGS COGs as input data, you should deploy to us-west-2 for minimal latency. If you plan to use both, it may be wise to deploy to both regions and switch between them depending on the data source for the request.

# Install and Configure serverless (https://serverless.com/framework/docs/providers/aws/guide/credentials/)
$ npm install serverless -g

$ sls deploy --region us-east-1 --bucket a-bucket-where-you-store-data

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.