Skip to content

Get the Most Precise Bounding Box for a GeoTIFF. Avoid Floating Point Arithmetic Issues.

License

Notifications You must be signed in to change notification settings

GeoTIFF/geotiff-precise-bbox

Repository files navigation

geotiff-precise-bbox

Get the Most Precise Bounding Box for a GeoTIFF. Avoid Floating Point Arithmetic Issues. Supports Rotation.

install

npm install geotiff-precise-bbox

usage

import { fromURL } from "geotiff";
import getPreciseBoundingBox from "geotiff-precise-bbox";

const url = "https://raw.githubusercontent.com/GeoTIFF/test-data/master/files/eu_pasture.tiff";
const tif = await fromURL(url);
const image = await tif.getImage();
image.getBoundingBox();
[-31.456975828130908, 27.635001972364492, 40.20531917186909, 80.7984254723645]

getPreciseBoundingBox(image)
["-31.456975828130908", "27.6350019723645", "40.205319171869092", "80.7984254723645"]

About

Get the Most Precise Bounding Box for a GeoTIFF. Avoid Floating Point Arithmetic Issues.

Resources

License

Stars

Watchers

Forks

Packages

No packages published