npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@gisatcz/deckgl-geolib

v1.11.2

Published

<p align="right"> <a href="https://www.npmjs.com/package/@gisatcz/deckgl-geolib"> <img src="https://img.shields.io/npm/v/@gisatcz/deckgl-geolib.svg?style=flat-square" alt="version" /> </a> </p>

Downloads

178

Readme

3DFLUS - Geolib Visualizer

The Geolib Visualizer is a library that extends the deck.gl framework to enable the visualization of geospatial data, currently supporting Cloud-Optimized GeoTIFF (COG) files. This library offers an efficient way to display bitmap and terrain data in applications with advanced customization options using CogBitmapLayer and CogTerrainLayer. Another developed libraries GeoImage and CogTiles enhance rendering options.

Key Features

  • COG Rendering: Efficiently loads and displays Cloud-Optimized GeoTIFF files.
  • Bitmap and Terrain Layers: Supports visualizing both bitmap and elevation data.
  • Customizable Rendering: Allows custom color scales, opacity control, and flexible geographic bounds.

Installation

To use the Geolib Visualizer library, you need to have deck.gl and its dependencies installed.

Install the Geolib Visualizer via npm or yarn:

npm install @gisatcz/deckgl-geolib

or

yarn add @gisatcz/deckgl-geolib

For more information, visit the npm package page. You can visit the package page to explore further versions and additional information.

COG Data Preparation

For seamless integration of Geolib Visualizer library, please make sure you have followed our workflow Data Preparation Guide for converting GeoTIFFs to COG files.

Usage

Import package into project:

import geolib from '@gisatcz/deckgl-geolib'

1. COG Bitmap Layer

The CogBitmapLayer is designed for visualizing Cloud-Optimized GeoTIFF files as raster layers. The example below demonstrates its implementation, for more information and examples refer to the CogBitmapLayer.

const CogBitmapLayer = geolib.CogBitmapLayer;

const cogLayer = new CogBitmapLayer(
  id: 'cog_bitmap_name',
  rasterData:  'cog_bitmap_data_url.tif',
  isTiled: true,
  cogBitmapOptions: {
    type: 'image'
  }
);

2. COG Terrain Layer

For 3D terrain rendering, use CogTerrainLayer to visualize elevation data stored in Cloud-Optimized GeoTIFF format, for more information and examples refer to the CogTerrainLayer.

const CogTerrainLayer = geolib.CogTerrainLayer;

const cogLayer = new CogTerrainLayer(
  id: 'cog_terrain_name',
  elevationData:  'cog_terrain_data_url.tif',
  isTiled: true,
  tileSize: 256,
  meshMaxError: 1,
  operation: 'terrain+draw',
  terrainOptions: {
    type: 'terrain',
  }
);

add layer to DeckGL instance, visit deck.gl for more about deck.gl compoments.

<DeckGL
    initialViewState={INITIAL_VIEW_STATE}
    controller={true}
    layers={cogLayer} />

Development

Clone the repository and install dependencies

yarn install

Start an example

yarn start

The example is defaultly running at http://localhost:5173/

The bitmap and terrain example files are located here example/src/examples