# geo-file-type

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

Latest version **0.0.3** (published 2020-12-27) · CC0-1.0 license · 0 weekly downloads

## Install

```sh
npm install geo-file-type
pnpm add geo-file-type
yarn add geo-file-type
bun add geo-file-type
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.3 |
| Published | 2020-12-27 |
| First published | 2020-11-27 |
| Weekly downloads | 0 |
| License | CC0-1.0 |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 10 |
| Unpacked size | 11.4 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Daniel J. Dufour |
| Maintainers | danieljdufour |
| Keywords | ascii, aux, auxiliary, file, geo, geotiff, grid, jpg, netcdf, png, shapefile, shp, type, world, file, wld, xml |

## Links

- npm: https://www.npmjs.com/package/geo-file-type
- Repository: https://github.com/DanielJDufour/geo-file-type
- Homepage: https://github.com/DanielJDufour/geo-file-type#readme
- Issues: https://github.com/DanielJDufour/geo-file-type/issues
- npm.io page: https://npm.io/package/geo-file-type

## Dependencies (10)

- [id-jpg](https://npm.io/package/id-jpg.md) 0.0.1
- [id-png](https://npm.io/package/id-png.md) 0.0.0
- [id-tif](https://npm.io/package/id-tif.md) 0.0.1
- [is-cog](https://npm.io/package/is-cog.md) 0.0.1
- [is-prj](https://npm.io/package/is-prj.md) 0.0.3
- [is-shp](https://npm.io/package/is-shp.md) 0.0.1
- [is-wld](https://npm.io/package/is-wld.md) ^1.0.0
- [aux-xml](https://npm.io/package/aux-xml.md) 0.0.0
- [ascii-grid](https://npm.io/package/ascii-grid.md) ^0.1.2
- [is-geotiff](https://npm.io/package/is-geotiff.md) 0.0.1

## Alternatives

- [babylon](https://npm.io/package/babylon.md) — 5.1M weekly downloads
- [csscolorparser](https://npm.io/package/csscolorparser.md) — 3.7M weekly downloads
- [expr-eval-fork](https://npm.io/package/expr-eval-fork.md) — 1.5M weekly downloads
- [@leeoniya/ufuzzy](https://npm.io/package/@leeoniya/ufuzzy.md) — 247.7K weekly downloads
- [xml-parser](https://npm.io/package/xml-parser.md) — 78.4K weekly downloads

## Recent versions

- 0.0.3 (latest) — 2020-12-27
- 0.0.2 — 2020-11-28
- 0.0.1 — 2020-11-27

## README

# 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
```javascript
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:
- ASCII Grid: https://en.wikipedia.org/wiki/Esri_grid
- Cloud Optimized GeoTIFF: https://www.cogeo.org/
- GeoTIFF: https://en.wikipedia.org/wiki/GeoTIFF
- GeoRaster: https://github.com/geotiff/georaster
- GeoJSON: https://geojson.org/
- JPG: https://en.wikipedia.org/wiki/JPEG
- PNG: https://en.wikipedia.org/wiki/Portable_Network_Graphics
- NetCDF: https://en.wikipedia.org/wiki/NetCDF
- TopoJSON: https://github.com/topojson/topojson
- World File: https://en.wikipedia.org/wiki/World_file

---
_Source: https://npm.io/package/geo-file-type · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
