Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/derhuerst/spaten-parser
Parse Spaten-encoded geodata.
https://github.com/derhuerst/spaten-parser
gis spaten
Last synced: 6 days ago
JSON representation
Parse Spaten-encoded geodata.
- Host: GitHub
- URL: https://github.com/derhuerst/spaten-parser
- Owner: derhuerst
- License: isc
- Created: 2020-07-30T17:38:28.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2020-07-30T17:52:07.000Z (over 4 years ago)
- Last Synced: 2024-11-01T15:36:53.314Z (13 days ago)
- Topics: gis, spaten
- Language: JavaScript
- Homepage: https://github.com/derhuerst/spaten-parser#spaten-parser
- Size: 11.7 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
- License: license.md
Awesome Lists containing this project
README
# spaten-parser
**Parse [Spaten-encoded geodata](https://thomas.skowron.eu/spaten/).**
[![npm version](https://img.shields.io/npm/v/spaten-parser.svg)](https://www.npmjs.com/package/spaten-parser)
[![build status](https://api.travis-ci.org/derhuerst/spaten-parser.svg?branch=master)](https://travis-ci.org/derhuerst/spaten-parser)
![ISC-licensed](https://img.shields.io/github/license/derhuerst/spaten-parser.svg)
![minimum Node.js version](https://img.shields.io/node/v/spaten-parser.svg)
[![chat with me on Gitter](https://img.shields.io/badge/chat%20with%20me-on%20gitter-512e92.svg)](https://gitter.im/derhuerst)
[![support me via GitHub Sponsors](https://img.shields.io/badge/support%20me-donate-fa7664.svg)](https://github.com/sponsors/derhuerst)## Installation
```shell
npm install spaten-parser
```## Usage
```js
const {readFileSync} = require('fs')
const parse = require('spaten-parser')const buf = readFileSync('path/to/file.spaten')
for (const item of parse(buf)) {
console.log(item)
}
````parse` is a [generator function](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/function*), so it returns an [iterator](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols#iterator).
## Contributing
If you have a question or need support using `spaten-parser`, please double-check your code and setup first. If you think you have found a bug or want to propose a feature, use [the issues page](https://github.com/derhuerst/spaten-parser/issues).