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 🙏

© 2026 – Pkg Stats / Ryan Hefner

surtgis

v0.1.0

Published

High-performance geospatial analysis in the browser via WebAssembly

Readme

surtgis

High-performance geospatial analysis in the browser via WebAssembly.

SurtGIS compiles 33 terrain, hydrology, imagery, morphology and statistics algorithms to WASM, giving you native-speed raster processing with zero server dependencies.

Live Demo | GitHub

Install

npm install surtgis

Quick Start

Browser (with bundler)

import { SurtGIS } from "surtgis/surtgis.js";

const gis = await SurtGIS.init();

// Load a GeoTIFF as Uint8Array
const dem = new Uint8Array(await fetch("dem.tif").then(r => r.arrayBuffer()));

// Compute slope
const slopeResult = gis.slope(dem, { units: "degrees" });

// Compute hillshade
const hillshade = gis.hillshade(dem, { azimuth: 315, altitude: 45 });

Web Worker (off main thread)

import { SurtGISWorker } from "surtgis/surtgis-worker.js";

const gis = await SurtGISWorker.init();

// All methods return Promise<Uint8Array>
const result = await gis.slope(dem, { units: "degrees" });

gis.terminate(); // when done

Low-level bindings

import { slope, hillshade_compute } from "surtgis";

const slopeBytes = slope(demBytes, "degrees");
const hillshadeBytes = hillshade_compute(demBytes, 315, 45);

API Reference

All functions accept and return Uint8Array (GeoTIFF bytes).

Terrain (17)

| Method | Options | Description | |--------|---------|-------------| | slope(dem, opts?) | { units: "degrees"\|"percent" } | Slope gradient | | aspect(dem) | — | Aspect in degrees (0-360) | | hillshade(dem, opts?) | { azimuth: 315, altitude: 45 } | Analytical hillshade | | multidirectionalHillshade(dem) | — | 6-azimuth combined hillshade | | curvature(dem, opts?) | { type: "general"\|"profile"\|"plan" } | Surface curvature | | tpi(dem, opts?) | { radius: 3 } | Topographic Position Index | | tri(dem) | — | Terrain Ruggedness Index | | twi(dem) | — | Topographic Wetness Index | | geomorphons(dem, opts?) | { flatness: 1.0, radius: 10 } | Landform classification | | northness(dem) | — | Cosine of aspect | | eastness(dem) | — | Sine of aspect | | dev(dem, opts?) | { radius: 10 } | Deviation from Mean Elevation | | shapeIndex(dem) | — | Shape index | | curvedness(dem) | — | Surface curvedness | | skyViewFactor(dem, opts?) | { directions: 16, radius: 10 } | Sky View Factor | | uncertaintySlope(dem, opts?) | { demRmse: 1.0 } | Slope uncertainty (RMSE) | | ssa2dDenoise(dem, opts?) | { window: 10, components: 3 } | 2D-SSA denoising |

Hydrology (5)

| Method | Options | Description | |--------|---------|-------------| | fillSinks(dem) | — | Fill depressions | | priorityFlood(dem) | — | Priority-flood filling (Barnes 2014) | | flowDirectionD8(dem) | — | D8 flow direction | | flowAccumulationD8(fdir) | — | Flow accumulation from D8 directions | | hand(dem, opts?) | { streamThreshold: 1000 } | Height Above Nearest Drainage |

Imagery (4)

| Method | Options | Description | |--------|---------|-------------| | ndvi(nir, red) | — | Normalized Difference Vegetation Index | | ndwi(green, nir) | — | Normalized Difference Water Index | | savi(nir, red, opts?) | { lFactor: 0.5 } | Soil-Adjusted Vegetation Index | | normalizedDifference(a, b) | — | Generic (A-B)/(A+B) |

Morphology (4)

| Method | Options | Description | |--------|---------|-------------| | erode(dem, opts?) | { radius: 1 } | Morphological erosion | | dilate(dem, opts?) | { radius: 1 } | Morphological dilation | | opening(dem, opts?) | { radius: 1 } | Opening (erode + dilate) | | closing(dem, opts?) | { radius: 1 } | Closing (dilate + erode) |

Statistics (3)

| Method | Options | Description | |--------|---------|-------------| | focalMean(dem, opts?) | { radius: 3 } | Focal mean | | focalStd(dem, opts?) | { radius: 3 } | Focal standard deviation | | focalRange(dem, opts?) | { radius: 3 } | Focal range (max - min) |

Bundle Size

| Component | Size | Gzipped | |-----------|------|---------| | WASM binary | ~570 KB | ~195 KB | | JS glue | ~3 KB | ~1 KB |

License

MIT OR Apache-2.0