Skip to content

Latest commit

 

History

History
22 lines (18 loc) · 685 Bytes

README.md

File metadata and controls

22 lines (18 loc) · 685 Bytes

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"]