Skip to content

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

License

Notifications You must be signed in to change notification settings

DanielJDufour/geo-file-type

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

Name Supported
ASCII Grid Yes
Auxiliary XML Yes
Cloud Optimized GeoTIFF Yes
GeoRaster Yes
GeoJSON No
GeoTIFF Yes
NetCDF Yes
JPG Yes
PNG Yes
PRJ Yes
SHP (Shapefile) Yes
TopoJSON No
World File Yes

further reading:

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

About

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

Topics

Resources

License

Stars

Watchers

Forks