0.0.3 • Published 3 years ago

geo-file-type v0.0.3

Weekly downloads
3
License
CC0-1.0
Repository
github
Last release
3 years ago

geo-file-type

Detect the Types of Geospatial Input, including ASCII Grid, Auxiliary XML, GeoTIFF, JPG, PNG, SHP (Shapefile), and World File

features

  • Memory Safe: avoids loading the whole file into memory

usage

const geoFileType = require("geo-file-type");
const fs = require("fs");

const buffer = fs.readFileSync("./data/chattanooga.shp");
const result = geoFileType({
    data: buffer,
    debug: false // set debug to true for extra logging
});
// result is { type: "SHP (Shapefile)" }

file types

NameSupported
ASCII GridYes
Auxiliary XMLYes
Cloud Optimized GeoTIFFYes
GeoRasterYes
GeoJSONNo
GeoTIFFYes
NetCDFYes
JPGYes
PNGYes
PRJYes
SHP (Shapefile)Yes
TopoJSONNo
World FileYes

further reading:

If you'd like to learn more about the formats, please consult the following: