Neoclassical Programming Multitude

    geo-file-type

    0.0.3 • Public • Published

    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:

    Install

    npm i geo-file-type

    DownloadsWeekly Downloads

    4

    Version

    0.0.3

    License

    CC0-1.0

    Unpacked Size

    11.7 kB

    Total Files

    5

    Last publish

    Collaborators

    • danieljdufour