geotiff.js is a small library to parse TIFF files for visualization or analysis. It is written in pure JavaScript, and is usable in both the browser and node.js applications.

Overview

geotiff.js

Node.js CI npm version Gitter chat

Read (geospatial) metadata and raw array data from a wide variety of different (Geo)TIFF files types.

Features

Currently available functionality:

  • Parsing TIFFs from various sources:
    • remote (via fetch or XHR)
    • from a local ArrayBuffer
    • from the filesystem (on Browsers using the FileReader and on node using the filesystem functions)
  • Parsing the headers of all possible TIFF files
  • Rudimentary extraction of geospatial metadata
  • Reading raster data from:
    • stripped images
    • tiled images
    • band interleaved images
    • pixel interleaved images
  • Supported data-types:
    • (U)Int8/16/32
    • UInt1-31 (with some drawbacks)
    • Float16/32/64
  • Enabled compressions:
    • no compression
    • Packbits
    • LZW
    • Deflate (with floating point or horizontal predictor support)
    • JPEG
    • LERC (with additional Deflate compression support)
  • Automatic selection of overview level to read from
  • Subsetting via an image window or bounding box and selected bands
  • Reading of samples into separate arrays or a single pixel-interleaved array
  • Configurable tile/strip cache
  • Configurable Pool of workers to increase decoding efficiency
  • Utility functions for geospatial parameters (Bounding Box, Origin, Resolution)
  • Limited bigTIFF support
  • Automated testing via PhantomJS

Further documentation can be found here.

Example Usage

3D slice view

contour

Setup

To setup the repository do the following steps:

# clone repo
git clone https://github.com/constantinius/geotiff.js.git
cd geotiff.js/

# install development dependencies
npm install

Testing and Building

In order to run the tests you first have to set up the test data. This requires the GDAL and ImageMagick tools. Installation of these tools varies according to the operating system, the following listing shows the installation on Ubuntu (using the ubuntugis-unstable repository):

sudo add-apt-repository -y ppa:ubuntugis/ubuntugis-unstable
sudo apt-get update
sudo apt-get install -y gdal-bin imagemagick

To install GDAL and ImageMagick on MacOS X, please use Homebrew. The setup script also needs wget on MacOS X

brew install wget gdal imagemagick

When GDAL and ImageMagick is installed, the test data setup script can be run:

cd test/data
sh setup_data.sh
cd -

To test the library (using PhantomJS, karma, mocha and chai) do the following:

npm test

To do some in-browser testing do:

npm run dev

and navigate to http://localhost:8090/index.html

To build the library do:

npm run build

The output is written to dist-browser/main.js and dist-node/main.js.

Install

You can install geotiff.js using npm:

npm install geotiff

or you can use the prebuilt version with a CDN:

<script src="https://cdn.jsdelivr.net/npm/geotiff"></script>

Note: Currently the CDN installation is not compatible with GeoTIFF workers pool GeoTIFF.Pool.

Usage

geotiff.js works with both require, import and the global variable GeoTIFF:

const GeoTIFF = require('geotiff');
const { fromUrl, fromUrls, fromArrayBuffer, fromBlob } = GeoTIFF;

// or
import GeoTIFF, { fromUrl, fromUrls, fromArrayBuffer, fromBlob } from 'geotiff';

or:

<script async src="https://cdn.jsdelivr.net/npm/geotiff"></script>
<script>
  console.log(GeoTIFF);
  // Note: GeoTIFF.Pool will not work
</script>

To parse a GeoTIFF, first a data source is required. To help with the development, there are shortcuts available. The following creates a source that reads from a remote GeoTIFF referenced by a URL:

fromUrl(someUrl)
  .then(tiff => { /* ... */});

// or when using async/await
(async function() {
  const tiff = await fromUrl(someUrl);
  // ...
})()

Note: the interactions with geotiff.js objects are oftentimes asynchronous. For the sake of brevity we will only show the async/await syntax and not the Promise based one in the following examples.

Accessing remote images is just one way to open TIFF images with geotiff.js. Other options are reading from a local ArrayBuffer:

// using local ArrayBuffer
const response = await fetch(someUrl);
const arrayBuffer = await response.arrayBuffer();
const tiff = await fromArrayBuffer(arrayBuffer);

or a Blob/File:

<input type="file" id="file">
<script>
  const input = document.getElementById('file'):
  input.onchange = async function() {
    const tiff = await fromBlob(input.files[0]);
  }
</script>

Now that we have opened the TIFF file, we can inspect it. The TIFF is structured in a small header and a list of one or more images (Image File Directory, IFD to use the TIFF nomenclature). To get one image by index the getImage() function must be used. This is again an asynchronous operation, as the IFDs are loaded lazily:

const image = await tiff.getImage(); // by default, the first image is read.

Now that we have obtained a GeoTIFFImage object we can inspect its metadata (like size, tiling, number of samples, geographical information, etc.). All the metadata is parsed once the IFD is first parsed, thus the access to that is synchronous:

const width = image.getWidth();
const height = image.getHeight();
const tileWidth = image.getTileWidth();
const tileHeight = image.getTileHeight();
const samplesPerPixel = image.getSamplesPerPixel();

// when we are actually dealing with geo-data the following methods return
// meaningful results:
const origin = image.getOrigin();
const resolution = image.getResolution();
const bbox = image.getBoundingBox();

The actual raster data is not fetched and parsed automatically. This is because it is usually much more spacious and the decoding of the pixels can be time consuming due to the necessity of decompression.

To read a whole image into one big array of arrays the following method call can be used:

const data = await image.readRasters();

For convenience the result always has a width and height attribute:

const data = await image.readRasters();
const { width, height } = data;

By default, the raster is split to a separate array for each component. For an RGB image for example, we'd get three arrays, one for red, green and blue.

const [red, green, blue] = await image.readRasters();

If we want instead all the bands interleaved in one big array, we have to pass the interleave: true option:

const [r0, g0, b0, r1, g1, b1, ...] = await image.readRasters({ interleave: true });

If we are only interested in a specific region of the image, the window option can be used to limit reading in that bounding box. Note: the bounding box is in 'image coordinates' not geographical ones:

const left = 50;
const top = 10;
const right = 150;
const bottom = 60;

const data = await image.readRasters({ window: [left, top, right, bottom] });

This image window can go beyond the image bounds. In that case it might be usefull to supply a fillValue: value option (can also be an array, one value for each sample).

It is also possible to just read specific samples for each pixel. For example, we can only read the red component from an RGB image:

const [red] = await image.readRasters({ samples: [0] });

When you want your output in a specific size, you can use the width and height options. This defaults of course to the size of your supplied window or the image size if no window was supplied.

As the data now needs to be resampled, a resampleMethod can be specified. This defaults to the nearest neighbour method, but also the 'bilinear' method is supported:

const data = await image.readRasters({ width: 40, height: 40, resampleMethod: 'bilinear' });

Using decoder pools to improve parsing performance

Decoding compressed images can be a time consuming process. To minimize this geotiff.js provides the Pool mechanism which uses WebWorkers to split the amount of work on multiple 'threads'.

const pool = new GeoTIFF.Pool();
const data = await image.readRasters({ pool });

It is possible to provide a pool size (i.e: number of workers), by default the number of available processors is used.

Because of the way WebWorker work (pun intended), there is a considerable overhead involved when using the Pool, as all the data must be copied and cannot be simply be shared. But the benefits are two-fold. First: for larger image reads the overall time is still likely to be reduced and second: the main thread is relieved which helps to uphold responsiveness.

If you want to use the Worker Pool in a project built with webpack (ex: VueJS or React) you have to install threads-plugin and add the plugin to your webpack.config.js:

npm install -D threads-plugin
const ThreadsPlugin = require('threads-plugin')

module.exports = {
  // ...
  plugins: [
    new ThreadsPlugin()
  ]
}

Dealing with visual data

The TIFF specification provides various ways to encode visual data. In the specification this is called photometric interpretation. The simplest case we already dealt with is the RGB one. Others are grayscale, paletted images, CMYK, YCbCr, and CIE Lab.

geotiff.js provides a method to automatically convert these images to RGB: readRGB(). This method is very similar to the readRasters method with distinction that the interleave option is now always true and the samples are automatically chosen.

const rgb = await image.readRGB({
  // options...
});

Automatic image selection (experimental)

When dealing with images that have internal (or even external, see the next section) overviews, GeoTIFF objects provide a separate readRasters method. This method works very similar to the method on the GeoTIFFImage objects with the same name. By default, it uses the larges image available (highest resolution), but when either width, height, resX, or resY are specified, then the best fitting image will be used for reading.

Additionally, it allows the bbox instead of the window parameter. This works similarly, but uses geographic coordinates instead of pixel ones.

const data = await tiff.readRasters({
  bbox: [10.34, 57.28, 13.34, 60.23],
  resX: 0.1,
  resY: 0.1
});

External overviews

Especially for certain kinds of high resolution images it is not uncommon to separate the highest resolution from the lower resolution overviews (usually using the .ovr extension). With geotiff.js it is possible to use files of this setup, just as you would use single-file images by taking advantage of the MultiGeoTIFF objects. They behave exactly the same as the before mentioned GeoTIFF objects: you can select images by index or read data using readRasters. Toget such a file use the fromUrls factory function:

const multiTiff = await fromUrls(
  'LC08_L1TP_189027_20170403_20170414_01_T1_B3.TIF',
  ['LC08_L1TP_189027_20170403_20170414_01_T1_B3.TIF.ovr']
);

AbortController Support

Geotiff.js supports the use of AbortControllers. Calls to getRasters, readRGB and getTileOrStrip will throw an Error with name AbortSignal similar to the browser's fetch behavior.

const abortController = new AbortController();
const { signal } = abortController;
abortController.abort();
try {
  const data = await tiff.readRasters({ signal });
} catch(e) {
  if (err.name === 'AbortError') {
    // do stuff
  }
}

Writing GeoTIFFs (Beta Version)

You can create a binary representation of a GeoTIFF using writeArrayBuffer. This function returns an ArrayBuffer which you can then save as a .tif file. ⚠️ writeArrayBuffer currently writes the values uncompressed

import GeoTIFF, { writeArrayBuffer } from 'geotiff';

const values = [1, 2, 3, 4, 5, 6, 7, 8, 9];
const metadata = {
  height: 3,
  width: 3
};
const arrayBuffer = await writeArrayBuffer(values, metadata);

You can also customize the metadata using names found in the TIFF Spec and GeoTIFF spec.

import { writeArrayBuffer } from 'geotiff';

const values = [1, 2, 3, 4, 5, 6, 7, 8, 9];
const metadata = {
  height: 3,
  ModelPixelScale: [0.031355, 0.031355, 0],
  ModelTiepoint: [0, 0, 0, 11.331755000000001, 46.268645, 0],
  width: 3
};
const arrayBuffer = await writeArrayBuffer(values, metadata);

What to do with the data?

There is a nice HTML 5/WebGL based rendering library called plotty, that allows for some really nice on the fly rendering of the data contained in a GeoTIFF.

<canvas id="plot"></canvas>
<script>
  // ...

  (async function() {
    const tiff = await fromUrl(url);
    const image = await tiff.getImage();
    const data = await image.readRasters();

    const canvas = document.getElementById("plot");
    const plot = new plotty.plot({
      canvas,
      data: data[0],
      width: image.getWidth(),
      height: image.getHeight(),
      domain: [0, 256],
      colorScale: "viridis"
    });
    plot.render();
  })();
</script>

BigTIFF support

geotiff.js has a limited support for files in the BigTIFF format. The limitations originate in the capabilities of current JavaScript implementations regarding 64 bit integer parsers and structures: there are no functions to read 64 bit integers from a stream and no such typed arrays. As BigTIFF relies on 64 bit offsets and also allows tag values of those types. In order to still provide a reasonable support, the following is implemented:

  • 64 bit integers are read as two 32 bit integers and then combined. As numbers in JavaScript are typically implemented as 64 bit floats, there might be inaccuracies for very large values.
  • For 64 bit integer arrays, the default Array type is used. This might cause problems for some compression algorithms if those arrays are used for pixel values.

n-bit Support

geotiff.js has some n-bit support which means that it supports unsigned integer data reading with each element using a non-multiple of 8 bit depth. This only works with band interleaved images (see this related issue).

Planned stuff:

  • Better support of geospatial parameters:
    • Parsing of EPSG identifiers
    • WKT representation

Known Issues

The open issues can be found on GitHub.

Contribution

If you have an idea, found a bug or have a remark, please open a ticket, we will look into it ASAP.

Pull requests are welcome as well!

Community Packages

A list of community packages can be found in COMMUNITY.md

Acknowledgements

This library was inspired by GeotiffParser. It provided a great starting point, but lacked the capabilities to read the raw raster data which is the aim of geotiff.js.

Comments
  • Implement threads.js and parcel-bundler

    Implement threads.js and parcel-bundler

    This one is quite a long shot, I've implemented thread.js for the decoder.worker.js (#115) which was the main issue about the package bundling (and babel configuration). I also changed the package bundler to parcel-bundler which is much faster and simpler in my opinion.

    • Introduce two separate builds for browser and nodejs which, i think, should solve most of the issues about importing geotiff.js (#98 #126 #110 #74 #23 #43)
    • Upgrade and cleanup dependencies
    • Lint and tests fixes

    Bundle size comparison:

    • Browser:
      • before: 690KB
      • after: 316KB
    • Node:
      • before: 690KB
      • after: 55.13KB

    Fixes #53 Fixes #71 by adding set -e to setup_data.sh to force script failure Closes #115

    opened by PacoDu 27
  • Cannot display tiff

    Cannot display tiff

    Hello, is there a reason why I cannot display this type of tiff? I'm using the latest stable version (0.4.1). It doesn't throw any error but it isn't displayed on the leaflet layer... It works with other tiff.

    Tiff dump Magic: 0x4949 Version: 0x2a Directory 0: offset 32450 (0x7ec2) next 0 (0) ImageWidth (256) SHORT (3) 1<631> ImageLength (257) SHORT (3) 1<461> BitsPerSample (258) SHORT (3) 4<8 8 8 8> Compression (259) SHORT (3) 1<8> Photometric (262) SHORT (3) 1<2> FillOrder (266) SHORT (3) 1<1> StripOffsets (273) LONG (4) 1<8> Orientation (274) SHORT (3) 1<1> SamplesPerPixel (277) SHORT (3) 1<4> RowsPerStrip (278) SHORT (3) 1<461> StripByteCounts (279) LONG (4) 1<32442> PlanarConfig (284) SHORT (3) 1<1> PageNumber (297) SHORT (3) 2<0 1> Whitepoint (318) RATIONAL (5) 2<0.3127 0.329> PrimaryChromaticities (319) RATIONAL (5) 6<0.64 0.33 0.3 0.6 0.15 0.06> ExtraSamples (338) SHORT (3) 1<2> 33550 (0x830e) DOUBLE (12) 3<1000 1000 0> 33922 (0x8482) DOUBLE (12) 6<0 0 0 255000 480000 0> 34735 (0x87af) SHORT (3) 96<1 1 0 23 1024 0 1 1 1025 0 1 1 1026 34737 11 0 2048 0 1 32767 2049 34737 82 11 ...> 34736 (0x87b0) DOUBLE (12) 13<6.3774e+06 299.153 0 674.374 15.056 405.346 600000 200000 7.43958 46.9524 1 90 90> 34737 (0x87b1) ASCII (2) 94<SWISS_GRID|GCS Name = SW ...>

    image

    opened by rtrap-rsi 20
  • replaced txml with xml-utils

    replaced txml with xml-utils

    This pull request introduces xml-utils and removes txml. xml-utils doesn't have any dependencies (other than the test runner flug for development) and it doesn't use any NodeJS builtins. There shouldn't be any configuration required for use with webpack or any other bundler. This should fix https://github.com/geotiffjs/geotiff.js/issues/241

    Note: I didn't see any tests covering getGDALMetadata, but I might have missed them. I don't have time at the moment to add any more tests (prepping for FOSS4G!), but would have time in a week or so.

    opened by DanielJDufour 18
  • AbortController

    AbortController

    Fixes #170. I'm opening this as a draft so you may comment on the API structure here. I return empty arrays when the request is aborted - is there an edge case I am missing here? I can also raise an error, but I don't know if we want that error propagating out of the library. Let me know!

    opened by ilan-gold 17
  • AbortController Bypasses Cache

    AbortController Bypasses Cache

    I did some refactoring that makes things a bit simpler for the AbortSignal handling, I think. I also added a note about how to use it properly.

    Feedback welcome! @zakjan were you interested in this?

    opened by ilan-gold 15
  • algorithm speed

    algorithm speed

    Hi, I just posted a question on GIS exchange: https://gis.stackexchange.com/q/358221/161669, and I wondered if you could have a look? The question is related to whether I can leveraging geotiff.js in the best way, as the performance seems slow compared to public APIs...any suggestions welcome, and thanks for your hard work on maintaining this library!!

    opened by kissenger 15
  • GDAL_NODATA value being rounded

    GDAL_NODATA value being rounded

    Generally the GDAL_NODATA metadata is working for me but I have some files that get an incorrect value.

    For example with this file, when I run gdalinfo I get a nodata value of 9.99999998050644787e+18 but geotiff.js says 1.0E19 (gdalinfo is correct).

    I'm not sure what the difference is with how gdalinfo determines the value, so I'm not sure if it's possible that the nodata metadata is incorrect but gdalinfo gets its info from somewhere else, or if geotiff.js is not reading the value correctly.

    $ gdalinfo example.tif
    
    Driver: GTiff/GeoTIFF
    Files: example.tif
    Size is 279, 416
    Coordinate System is:
    GEOGCRS["WGS 84",
        DATUM["World Geodetic System 1984",
            ELLIPSOID["WGS 84",6378137,298.257223563,
                LENGTHUNIT["metre",1]]],
        PRIMEM["Greenwich",0,
            ANGLEUNIT["degree",0.0174532925199433]],
        CS[ellipsoidal,2],
            AXIS["geodetic latitude (Lat)",north,
                ORDER[1],
                ANGLEUNIT["degree",0.0174532925199433]],
            AXIS["geodetic longitude (Lon)",east,
                ORDER[2],
                ANGLEUNIT["degree",0.0174532925199433]],
        ID["EPSG",4326]]
    Data axis to CRS axis mapping: 2,1
    Origin = (135.033453258464164,-23.596259085710940)
    Pixel Size = (0.003889256068923,-0.003789922154798)
    Metadata:
      AREA_OR_POINT=Area
      TIFFTAG_RESOLUTIONUNIT=1 (unitless)
      TIFFTAG_XRESOLUTION=1
      TIFFTAG_YRESOLUTION=1
    Image Structure Metadata:
      INTERLEAVE=BAND
    Corner Coordinates:
    Upper Left  ( 135.0334533, -23.5962591) (135d 2' 0.43"E, 23d35'46.53"S)
    Lower Left  ( 135.0334533, -25.1728667) (135d 2' 0.43"E, 25d10'22.32"S)
    Upper Right ( 136.1185557, -23.5962591) (136d 7' 6.80"E, 23d35'46.53"S)
    Lower Right ( 136.1185557, -25.1728667) (136d 7' 6.80"E, 25d10'22.32"S)
    Center      ( 135.5760045, -24.3845629) (135d34'33.62"E, 24d23' 4.43"S)
    Band 1 Block=272x416 Type=Float32, ColorInterp=Gray
      NoData Value=9.99999998050644787e+18
    
    opened by rooby 14
  • BigTIFF Support/Directory Parsing

    BigTIFF Support/Directory Parsing

    Hello, I have a use case of large BigTIFF files (hundreds of image pages) and I am having trouble parsing them as things stand. I believe the issue centers around how 64 bit integers are handled for this type https://github.com/geotiffjs/geotiff.js/blob/master/src/dataslice.js#L97. Currently, the operation for combining the two 32 bit integers is

    let left;
    let right;
    if (this._littleEndian) {
      left = this.readInt32(offset);
      right = this.readUint32(offset + 4);
    
      return (left << 32) | right;
    }
    left = this.readUint32(offset - this._sliceOffset);
    right = this.readInt32(offset - this._sliceOffset + 4);
    return (right << 32) | left;
    

    but on the Mozilla page, one of two is recommended:

    const left =  dataview.getUint32(byteOffset, littleEndian);
    const right = dataview.getUint32(byteOffset+4, littleEndian);
    
    // combine the two 32-bit values
    const combined = littleEndian? left + 2**32*right : 2**32*left + right;
    if (!Number.isSafeInteger(combined))
        console.warn(combined, 'exceeds MAX_SAFE_INTEGER. Precision may be lost');
    left + 2**32*right
    

    or

    const left = BigInt(dataview.getUint32(byteOffset|0, !!littleEndian)>>>0);
    const right = BigInt(dataview.getUint32((byteOffset|0) + 4|0, !!littleEndian)>>>0);
    
    // combine the two 32-bit values and return
    return littleEndian ? (right<<bigThirtyTwo)|left : (left<<bigThirtyTwo)|right;
    

    The first approach is not guaranteed to be precise past 2 ** 53, though, hence the warning. I have done some testing and not had problems with this approach but I could see things going wrong (although 2 ** 53 is a lot, so not sure we'd actually ever run into that if all this method is for is byte offsets; 2 ** 53 bytes is nine million gigabytes, I think).

    The behavior I was seeing originally was similar to #63 and #68 where I would get negative numbers. I see in #68 that you added a BigInt support but I am not sure that is necessary (I also tried it using the above approach and did not have success, and tried your approach but it nearly crashed my browser).

    Additionally, the current state of parseFileDirectories seems problematic for me because it attempts to parse all the file directories, which is unnecessary in our use case. Could we add a flag to stop that? Our use case only needs the first image pane to get some metadata and can infer what is in the rest. If you think there is a good reason for parsing everything every time, I'd love to discuss - I'm new to the tiff ecosystem so could certainly be missing a crucial use-case.

    Thanks! This package is quite the workhorse, great stuff!!!! :) :)

    opened by ilan-gold 13
  • Fix package import for modern frontend

    Fix package import for modern frontend

    This PR fixes issues I introduced with #131 :

    • I removed the browser field from package.json and added the module field pointing to src/main.js. The browser field was misleading builders like webpack that were using the built version of the application (dist-browser), breaking tree-shaking and imports from src. (see: https://github.com/webpack/webpack/issues/4674 about webpack's package.json fields priority)
    • I also removed the import 'threads/register' which was breaking webpack builds
    • Add files to package.json
    • Add jsdelivr to package.json for CDN installation and usage of GeoTIFF via the global variable
    • Enhance README for installation and usage (also add CDN installation)
    • Add documentation about webpack build requirement for the worker Pool to work properly
    • Parallel build for browser and node with npm-run-all

    I created a repo to do some tests with treads.js packaged in a library: https://github.com/PacoDu/threads-package. I've tested the solution with multiple clients: VueJS, React, NodeJS, raw webpack and raw parcel bundling. It seems to work properly in every cases.

    This PR may needs more tests, but it's better than the current version that is not working as expected for modern frontend builds.

    Should fix: #143

    opened by PacoDu 12
  • 64bit int uint

    64bit int uint

    Copying the arithmetic here: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/DataView. Fixes #132, Fixes #68, Fixes #63.

    I think this is exclusively used for reading byte offsets, so unless someone tries to read a 9,000,000 GB file, the maximum available javascript integer of 2 ** 53 - 1 should preclude us from using BitInt and its performance knock.

    opened by ilan-gold 12
  • Use type: module for better ES module handling

    Use type: module for better ES module handling

    This pull request makes it easier to use geotiff.js in modern JavaScript environments (ES module capable Node versions, modern bundlers). It is somewhat related to #242.

    By importing from 'geotiff/src/geotiff.js' instead of geotiff, consumers can opt in to unconditionally using the native ES module code.

    See https://github.com/openlayers/openlayers/issues/13114#issuecomment-994134162.

    opened by ahocevar 11
  • Bump flat and mocha

    Bump flat and mocha

    Bumps flat to 5.0.2 and updates ancestor dependency mocha. These dependencies need to be updated together.

    Updates flat from 4.1.1 to 5.0.2

    Commits
    • e5ffd66 Release 5.0.2
    • fdb79d5 Update dependencies, refresh lockfile, format with standard.
    • e52185d Test against node 14 in CI.
    • 0189cb1 Avoid arrow function syntax.
    • f25d3a1 Release 5.0.1
    • 54cc7ad use standard formatting
    • 779816e drop dependencies
    • 2eea6d3 Bump lodash from 4.17.15 to 4.17.19
    • a61a554 Bump acorn from 7.1.0 to 7.4.0
    • 20ef0ef Fix prototype pollution on unflatten
    • Additional commits viewable in compare view

    Updates mocha from 7.2.0 to 10.2.0

    Release notes

    Sourced from mocha's releases.

    v10.2.0

    10.2.0 / 2022-12-11

    :tada: Enhancements

    • #4945: API: add possibility to decorate ESM name before import (@​j0tunn)

    :bug: Fixes

    :book: Documentation

    v10.1.0

    10.1.0 / 2022-10-16

    :tada: Enhancements

    :nut_and_bolt: Other

    v10.0.0

    10.0.0 / 2022-05-01

    :boom: Breaking Changes

    :nut_and_bolt: Other

    ... (truncated)

    Changelog

    Sourced from mocha's changelog.

    10.2.0 / 2022-12-11

    :tada: Enhancements

    • #4945: API: add possibility to decorate ESM name before import (@​j0tunn)

    :bug: Fixes

    :book: Documentation

    10.1.0 / 2022-10-16

    :tada: Enhancements

    :nut_and_bolt: Other

    10.0.0 / 2022-05-01

    :boom: Breaking Changes

    :nut_and_bolt: Other

    ... (truncated)

    Commits

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    • @dependabot use these labels will set the current labels as the default for future PRs for this repo and language
    • @dependabot use these reviewers will set the current reviewers as the default for future PRs for this repo and language
    • @dependabot use these assignees will set the current assignees as the default for future PRs for this repo and language
    • @dependabot use this milestone will set the current milestone as the default for future PRs for this repo and language

    You can disable automated security fix PRs for this repo from the Security Alerts page.

    dependencies 
    opened by dependabot[bot] 0
  • Bump express from 4.17.1 to 4.17.3

    Bump express from 4.17.1 to 4.17.3

    Bumps express from 4.17.1 to 4.17.3.

    Release notes

    Sourced from express's releases.

    4.17.3

    4.17.2

    Changelog

    Sourced from express's changelog.

    4.17.3 / 2022-02-16

    4.17.2 / 2021-12-16

    Commits

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    • @dependabot use these labels will set the current labels as the default for future PRs for this repo and language
    • @dependabot use these reviewers will set the current reviewers as the default for future PRs for this repo and language
    • @dependabot use these assignees will set the current assignees as the default for future PRs for this repo and language
    • @dependabot use this milestone will set the current milestone as the default for future PRs for this repo and language

    You can disable automated security fix PRs for this repo from the Security Alerts page.

    dependencies 
    opened by dependabot[bot] 0
  • Bump qs from 6.7.0 to 6.11.0

    Bump qs from 6.7.0 to 6.11.0

    Bumps qs from 6.7.0 to 6.11.0.

    Changelog

    Sourced from qs's changelog.

    6.11.0

    • [New] [Fix] stringify: revert 0e903c0; add commaRoundTrip option (#442)
    • [readme] fix version badge

    6.10.5

    • [Fix] stringify: with arrayFormat: comma, properly include an explicit [] on a single-item array (#434)

    6.10.4

    • [Fix] stringify: with arrayFormat: comma, include an explicit [] on a single-item array (#441)
    • [meta] use npmignore to autogenerate an npmignore file
    • [Dev Deps] update eslint, @ljharb/eslint-config, aud, has-symbol, object-inspect, tape

    6.10.3

    • [Fix] parse: ignore __proto__ keys (#428)
    • [Robustness] stringify: avoid relying on a global undefined (#427)
    • [actions] reuse common workflows
    • [Dev Deps] update eslint, @ljharb/eslint-config, object-inspect, tape

    6.10.2

    • [Fix] stringify: actually fix cyclic references (#426)
    • [Fix] stringify: avoid encoding arrayformat comma when encodeValuesOnly = true (#424)
    • [readme] remove travis badge; add github actions/codecov badges; update URLs
    • [Docs] add note and links for coercing primitive values (#408)
    • [actions] update codecov uploader
    • [actions] update workflows
    • [Tests] clean up stringify tests slightly
    • [Dev Deps] update eslint, @ljharb/eslint-config, aud, object-inspect, safe-publish-latest, tape

    6.10.1

    • [Fix] stringify: avoid exception on repeated object values (#402)

    6.10.0

    • [New] stringify: throw on cycles, instead of an infinite loop (#395, #394, #393)
    • [New] parse: add allowSparse option for collapsing arrays with missing indices (#312)
    • [meta] fix README.md (#399)
    • [meta] only run npm run dist in publish, not install
    • [Dev Deps] update eslint, @ljharb/eslint-config, aud, has-symbols, tape
    • [Tests] fix tests on node v0.6
    • [Tests] use ljharb/actions/node/install instead of ljharb/actions/node/run
    • [Tests] Revert "[meta] ignore eclint transitive audit warning"

    6.9.7

    • [Fix] parse: ignore __proto__ keys (#428)
    • [Fix] stringify: avoid encoding arrayformat comma when encodeValuesOnly = true (#424)
    • [Robustness] stringify: avoid relying on a global undefined (#427)
    • [readme] remove travis badge; add github actions/codecov badges; update URLs
    • [Docs] add note and links for coercing primitive values (#408)
    • [Tests] clean up stringify tests slightly
    • [meta] fix README.md (#399)
    • Revert "[meta] ignore eclint transitive audit warning"

    ... (truncated)

    Commits
    • 56763c1 v6.11.0
    • ddd3e29 [readme] fix version badge
    • c313472 [New] [Fix] stringify: revert 0e903c0; add commaRoundTrip option
    • 95bc018 v6.10.5
    • 0e903c0 [Fix] stringify: with arrayFormat: comma, properly include an explicit `[...
    • ba9703c v6.10.4
    • 4e44019 [Fix] stringify: with arrayFormat: comma, include an explicit [] on a s...
    • 113b990 [Dev Deps] update object-inspect
    • c77f38f [Dev Deps] update eslint, @ljharb/eslint-config, aud, has-symbol, tape
    • 2cf45b2 [meta] use npmignore to autogenerate an npmignore file
    • Additional commits viewable in compare view

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    • @dependabot use these labels will set the current labels as the default for future PRs for this repo and language
    • @dependabot use these reviewers will set the current reviewers as the default for future PRs for this repo and language
    • @dependabot use these assignees will set the current assignees as the default for future PRs for this repo and language
    • @dependabot use this milestone will set the current milestone as the default for future PRs for this repo and language

    You can disable automated security fix PRs for this repo from the Security Alerts page.

    dependencies 
    opened by dependabot[bot] 0
  • require not working with dist-node

    require not working with dist-node

    dist-node should work with require but it complains with import errors on a sub dependency.

    Error [ERR_REQUIRE_ESM]: Must use import to load ES Module: /home/jasmin/projects/solargraf-api/node_modules/quick-lru/index.js
    require() of ES modules is not supported.
    require() of /home/jasmin/projects/solargraf-api/node_modules/quick-lru/index.js from /home/jasmin/projects/solargraf-api/node_modules/geotiff/dist-node/source/blockedsource.js is an ES module file as it is a .js file whose nearest parent package.json contains "type": "module" which defines all .js files in that package scope as ES modules.
    Instead rename index.js to end in .cjs, change the requiring code to use import(), or remove "type": "module" from /home/jasmin/projects/solargraf-api/node_modules/quick-lru/package.json.
    
    opened by CutiePi 2
  • Bump marked from 2.1.3 to 4.2.1

    Bump marked from 2.1.3 to 4.2.1

    Bumps marked from 2.1.3 to 4.2.1.

    Release notes

    Sourced from marked's releases.

    v4.2.1

    4.2.1 (2022-11-02)

    Bug Fixes

    v4.2.0

    4.2.0 (2022-10-31)

    Features

    v4.1.1

    4.1.1 (2022-10-01)

    Bug Fixes

    v4.1.0

    4.1.0 (2022-08-30)

    Features

    v4.0.19

    4.0.19 (2022-08-21)

    Bug Fixes

    • make second parameter optional on lexer.inline (#2552) (f1a9608)

    v4.0.18

    4.0.18 (2022-07-11)

    Bug Fixes

    v4.0.17

    4.0.17 (2022-06-13)

    ... (truncated)

    Commits
    • 3d389d5 chore(release): 4.2.1 [skip ci]
    • 5eee913 🗜️ build [skip ci]
    • 377823a fix: Support escapes within emphasis (#2627)
    • 54410cd chore(release): 4.2.0 [skip ci]
    • c05218a 🗜️ build [skip ci]
    • 715f88a docs: add cli extension docs (#2632)
    • b5bdcf9 chore(deps-dev): Bump jasmine from 4.4.0 to 4.5.0 (#2637)
    • 207149e chore(deps-dev): Bump eslint-plugin-n from 15.3.0 to 15.4.0 (#2636)
    • 6973195 chore(deps-dev): Bump rollup-plugin-license from 2.8.2 to 3.0.1 (#2635)
    • d22e409 chore(deps-dev): Bump uglify-js from 3.17.3 to 3.17.4 (#2634)
    • Additional commits viewable in compare view

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    • @dependabot use these labels will set the current labels as the default for future PRs for this repo and language
    • @dependabot use these reviewers will set the current reviewers as the default for future PRs for this repo and language
    • @dependabot use these assignees will set the current assignees as the default for future PRs for this repo and language
    • @dependabot use this milestone will set the current milestone as the default for future PRs for this repo and language

    You can disable automated security fix PRs for this repo from the Security Alerts page.

    dependencies 
    opened by dependabot[bot] 0
Releases(v2.0.4)
Owner
geotiff.js
geotiff.js is a small library to parse TIFF files for visualization or analysis. It is written in pure JavaScript, and is usable in both the browse
geotiff.js
Geokit - is a command-line interface (CLI) tool written in javascript, that contains all the basic functionalities for measurements, conversions and operations of geojson files.

Geokit Geokit is a command-line interface (CLI) tool written in javascript, that contains all the basic functionalities for measurements, conversions

Development Seed 31 Nov 17, 2022
The NASA WorldWind Javascript SDK (WebWW) includes the library and examples for creating geo-browser web applications and for embedding a 3D globe in HTML5 web pages.

Web WorldWind New versions of WorldWind released Web WorldWind 0.10.0 and WorldWind Java 2.2.0 are now available on GitHub. The new version of Web Wor

NASA WorldWind 770 Jan 1, 2023
WebGL2 powered geospatial visualization layers

deck.gl | Website WebGL2-powered, highly performant large-scale data visualization deck.gl is designed to simplify high-performance, WebGL-based visua

Vis.gl 10.5k Jan 9, 2023
Visualization of all roads within any city

city-roads Render every single road in any city at once: https://anvaka.github.io/city-roads/ How it is made? The data is fetched from OpenStreetMap u

Andrei Kashcha 5.3k Jan 3, 2023
3D web map rendering engine written in TypeScript using three.js

3D web map rendering engine written in TypeScript using three.js

HERE Technologies 1.2k Dec 30, 2022
Tools for editing Shapefile, GeoJSON, TopoJSON and CSV files

Mapshaper Introduction Mapshaper is software for editing Shapefile, GeoJSON, TopoJSON, CSV and several other data formats, written in JavaScript. Maps

Matthew Bloch 3.2k Jan 2, 2023
A very fast geospatial point clustering library for browsers and Node.

supercluster A very fast JavaScript library for geospatial point clustering for browsers and Node. <script src="https://unpkg.com/[email protected]/d

Mapbox 1.6k Jan 7, 2023
A Node.js map tile library for PostGIS and torque.js, with CartoCSS styling

Windshaft A Node.js map tile library for PostGIS and torque.js, with CartoCSS styling. Can render arbitrary SQL queries Generates image and UTFGrid in

CARTO 306 Dec 22, 2022
Interactive, thoroughly customizable maps in the browser, powered by vector tiles and WebGL

Mapbox GL JS is a JavaScript library for interactive, customizable vector maps on the web. It takes map styles that conform to the Mapbox Style Specif

Mapbox 9.4k Jan 7, 2023
re:places is a serverless database of 41,000 global cities for your browser

An in-cache, searchable database of 41,000 global cities. It’s designed as a light-weight polyfill for ‘cities’ in Algolia's places API, for when it sunsets in May 2022

null 21 Dec 9, 2022
An open-source JavaScript library for world-class 3D globes and maps :earth_americas:

CesiumJS is a JavaScript library for creating 3D globes and 2D maps in a web browser without a plugin. It uses WebGL for hardware-accelerated graphics

Cesium 9.7k Dec 26, 2022
An open-source JavaScript library for world-class 3D globes and maps :earth_americas:

CesiumJS is a JavaScript library for creating 3D globes and 2D maps in a web browser without a plugin. It uses WebGL for hardware-accelerated graphics

Cesium 9.7k Jan 3, 2023
The smallest, simplest and fastest JavaScript pixel-level image comparison library

pixelmatch The smallest, simplest and fastest JavaScript pixel-level image comparison library, originally created to compare screenshots in tests. Fea

Mapbox 5.1k Jan 8, 2023
:leaves: JavaScript library for mobile-friendly interactive maps

Leaflet is the leading open-source JavaScript library for mobile-friendly interactive maps. Weighing just about 39 KB of gzipped JS plus 4 KB of gzipp

Leaflet 36.5k Jan 1, 2023
Polymaps is a free JavaScript library for making dynamic, interactive maps in modern web browsers.

Polymaps Polymaps is a free JavaScript library for making dynamic, interactive maps in modern web browsers. See http://polymaps.org for more details.

Urban Airship 1.6k Dec 23, 2022
JavaScript library to transform coordinates from one coordinate system to another, including datum transformations

PROJ4JS Proj4js is a JavaScript library to transform point coordinates from one coordinate system to another, including datum transformations. Origina

null 1.7k Dec 28, 2022
Node.js REST API for PostGres Spatial Entities. AKA: SpatialServer

PGRestAPI (a.k.a. Chubbs Spatial Server) Overview Node.js REST API for PostgreSQL Spatial Tables. An introduction to PGRestAPI can be found here A few

SpatialDev 429 Dec 9, 2022
Asynchronous, non-blocking SQLite3 bindings for Node.js

Asynchronous, non-blocking SQLite3 bindings for Node.js. Supported platforms The sqlite3 module works with: Node.js v11.x, v12.x, v13.x and v14.x. Ele

Mapbox 5.6k Jan 4, 2023
Lightweight Node.js isochrone map server

Galton Lightweight Node.js isochrone server. Build isochrones using OSRM, Turf and concaveman. Francis Galton is the author of the first known isochro

Urbica 266 Dec 17, 2022