1.0.0 • Published 6 years ago

@macrostrat/dbgeo-stream v1.0.0

Weekly downloads
21
License
MIT
Repository
github
Last release
6 years ago

dbgeo-stream

A simplified streaming version of dbgeo for use with node-pg-query-stream. Takes as an input a readable object stream, and each object must have a property geom which is a WKB geometry. Will output a valid GeoJSON FeatureCollection as a stream that can be piped directly to a file or HTTP response.

Installation
npm install @macrostrat/dbgeo-stream
Example Usage
const dbgeoStream = require('@macrostrat/dbgeo-stream')

// Connect to Postgres, etc...
let query = new QueryStream('SELECT id, geom FROM land', [])
client.query(query)
  .pipe(dbgeoStream)
  .pipe(res)

License

MIT