{"_id":"geo-pixel-stream","_rev":"122-c29fbd7cbe38a014d7beff7dda7965ad","name":"geo-pixel-stream","description":"[![Build Status](https://travis-ci.org/mapbox/geo-pixel-stream.svg?branch=master)](https://travis-ci.org/mapbox/geo-pixel-stream)","dist-tags":{"latest":"0.4.0"},"versions":{"0.1.0":{"name":"geo-pixel-stream","version":"0.1.0","description":"[![Build Status](https://travis-ci.org/mapbox/geo-pixel-stream.svg?branch=master)](https://travis-ci.org/mapbox/pixel-stream)","main":"index.js","scripts":{"test":"tape test/*.test.js"},"repository":{"type":"git","url":"https://github.com/mapbox/geo-pixel-stream.git"},"author":{"name":"Mapbox"},"license":"ISC","bugs":{"url":"https://github.com/mapbox/geo-pixel-stream/issues"},"homepage":"https://github.com/mapbox/geo-pixel-stream","dependencies":{"gdal":"^0.4.1"},"devDependencies":{"mapnik":"^3.1.4","mapnik-test-data":"https://mapbox-npm.s3.amazonaws.com/package/mapnik-test-data-2.0.3-fece0a9c546074a1479e9eae2333184029bb2279.tgz","mkdirp":"^0.5.0","queue-async":"^1.0.7","tape":"^3.4.0","underscore":"^1.7.0"},"gitHead":"2e6382dfc1100fe360ae5dc25046642878a3060f","_id":"geo-pixel-stream@0.1.0","_shasum":"f05fcca0a4704a861d15d773b042f09d8f0334e7","_from":".","_npmVersion":"2.1.6","_nodeVersion":"0.10.33","_npmUser":{"name":"rclark","email":"ryan.clark.j@gmail.com"},"maintainers":[{"name":"rclark","email":"ryan.clark.j@gmail.com"}],"dist":{"shasum":"f05fcca0a4704a861d15d773b042f09d8f0334e7","tarball":"https://registry.npmjs.org/geo-pixel-stream/-/geo-pixel-stream-0.1.0.tgz","integrity":"sha512-PT/aokPV0TkILrSXLknAnOk0LvRIdG4XQtJB/sPXarsRNcYAvvosPHO0iESYkBucvaaf42vFhwsTtHMFbr4Jig==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIE1bpleEujGzeGl8XnnhvvQfAXgdpcG4bHvkXHdNXXhxAiEArkv3dmegUipQvsnRphSqtRAgckvQoiySCKRjGbwrDVE="}]},"deprecated":"This module is now under the @mapbox namespace: install @mapbox/geo-pixel-stream instead","directories":{}},"0.1.1":{"name":"geo-pixel-stream","version":"0.1.1","description":"[![Build Status](https://travis-ci.org/mapbox/geo-pixel-stream.svg?branch=master)](https://travis-ci.org/mapbox/pixel-stream)","main":"index.js","scripts":{"test":"tape test/*.test.js"},"repository":{"type":"git","url":"https://github.com/mapbox/geo-pixel-stream.git"},"author":{"name":"Mapbox"},"license":"ISC","bugs":{"url":"https://github.com/mapbox/geo-pixel-stream/issues"},"homepage":"https://github.com/mapbox/geo-pixel-stream","dependencies":{"gdal":"^0.4.1"},"devDependencies":{"mapnik":"^3.1.4","mapnik-test-data":"https://mapbox-npm.s3.amazonaws.com/package/mapnik-test-data-2.0.3-fece0a9c546074a1479e9eae2333184029bb2279.tgz","mkdirp":"^0.5.0","queue-async":"^1.0.7","tape":"^3.4.0","underscore":"^1.7.0"},"gitHead":"e969610f5d243a97a07fb8dddf98fcc030aaca9e","_id":"geo-pixel-stream@0.1.1","_shasum":"bdcb3312f188f8f26bf94c71c9b8935d92691b11","_from":".","_npmVersion":"2.1.6","_nodeVersion":"0.10.33","_npmUser":{"name":"rclark","email":"ryan.clark.j@gmail.com"},"maintainers":[{"name":"rclark","email":"ryan.clark.j@gmail.com"}],"dist":{"shasum":"bdcb3312f188f8f26bf94c71c9b8935d92691b11","tarball":"https://registry.npmjs.org/geo-pixel-stream/-/geo-pixel-stream-0.1.1.tgz","integrity":"sha512-X1L0BFCngPww+OrzSPk3RS3wimp4CLKfXYx225xaYJXy6/MLcPRX2fCnP3XN22fph/OD6rK/i5SLRNIukfjyzw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCNeVVA4p9vThEkESkCGLibc2I4lKqtLG9nBIiwqMRsWgIhALB7wnEsL//AL2FinL4Rs9KBr8DT7f9+uMSrZcJV33K1"}]},"deprecated":"This module is now under the @mapbox namespace: install @mapbox/geo-pixel-stream instead","directories":{}},"0.1.2":{"name":"geo-pixel-stream","version":"0.1.2","description":"[![Build Status](https://travis-ci.org/mapbox/geo-pixel-stream.svg?branch=master)](https://travis-ci.org/mapbox/geo-pixel-stream)","main":"index.js","scripts":{"test":"tape test/*.test.js"},"repository":{"type":"git","url":"git+https://github.com/mapbox/geo-pixel-stream.git"},"author":{"name":"Mapbox"},"license":"ISC","bugs":{"url":"https://github.com/mapbox/geo-pixel-stream/issues"},"homepage":"https://github.com/mapbox/geo-pixel-stream","dependencies":{"gdal":"~0.5.0"},"devDependencies":{"mapnik":"^3.1.4","mapnik-test-data":"https://mapbox-npm.s3.amazonaws.com/package/mapnik-test-data-2.0.3-fece0a9c546074a1479e9eae2333184029bb2279.tgz","mkdirp":"^0.5.0","queue-async":"^1.0.7","tape":"^3.4.0","underscore":"^1.7.0"},"gitHead":"9a60ac3633c94149f5039f1393669df1afd99d6b","_id":"geo-pixel-stream@0.1.2","_shasum":"b4c1ad0d401f4f3f80d2c2e428a4a43488402458","_from":".","_npmVersion":"2.8.3","_nodeVersion":"0.10.38","_npmUser":{"name":"rclark","email":"ryan.clark.j@gmail.com"},"maintainers":[{"name":"rclark","email":"ryan.clark.j@gmail.com"},{"name":"edenh","email":"eden@mapbox.com"},{"name":"sgillies","email":"sean@mapbox.com"},{"name":"lbud","email":"lauren@mapbox.com"},{"name":"bsudekum","email":"bobby@mapbox.com"},{"name":"dnomadb","email":"damon@mapbox.com"},{"name":"ian29","email":"ian.villeda@gmail.com"},{"name":"dvncan","email":"duncan@mapbox.com"},{"name":"nickidlugash","email":"nicki@mapbox.com"},{"name":"samanbb","email":"saman@mapbox.com"},{"name":"ajashton","email":"aj.ashton@gmail.com"},{"name":"lxbarth","email":"alex@developmentseed.org"},{"name":"mikemorris","email":"michael.patrick.morris@gmail.com"},{"name":"ianshward","email":"ian@mapbox.com"},{"name":"mourner","email":"agafonkin@gmail.com"},{"name":"tristen","email":"tristen.brown@gmail.com"},{"name":"ingalls","email":"nicholas.ingalls@gmail.com"},{"name":"ansis","email":"ansis.brammanis@gmail.com"},{"name":"jfirebaugh","email":"john.firebaugh@gmail.com"},{"name":"miccolis","email":"jeff@miccolis.net"},{"name":"gretacb","email":"carol@mapbox.com"},{"name":"aaronlidman","email":"aaronlidman@gmail.com"},{"name":"morganherlocker","email":"morgan.herlocker@gmail.com"},{"name":"camilleanne","email":"camille@mapbox.com"},{"name":"mapbox","email":"accounts@mapbox.com"},{"name":"willwhite","email":"will@mapbox.com"},{"name":"springmeyer","email":"dane@mapbox.com"},{"name":"kkaefer","email":"kkaefer@gmail.com"},{"name":"dthompson","email":"dthompson@gmail.com"},{"name":"yhahn","email":"young@developmentseed.org"},{"name":"tmcw","email":"tom@macwright.org"}],"dist":{"shasum":"b4c1ad0d401f4f3f80d2c2e428a4a43488402458","tarball":"https://registry.npmjs.org/geo-pixel-stream/-/geo-pixel-stream-0.1.2.tgz","integrity":"sha512-0Wb3vV7BmXVDGL+smdigMmT67iT90rSM3vr/scOGk8pwbnlsn5pmNYVKdDeviI074T0I+CWQyWVOKXKIcmb5qg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDCI/EGwocxjH9SQOL5n+IaF2GY/lg8LksQkE9ahxUJ2wIhAOpribeUi5HA2tBcH8LRirn6+l77FmdSedVkDZLlQABq"}]},"deprecated":"This module is now under the @mapbox namespace: install @mapbox/geo-pixel-stream instead","directories":{}},"0.2.0":{"name":"geo-pixel-stream","version":"0.2.0","description":"[![Build Status](https://travis-ci.org/mapbox/geo-pixel-stream.svg?branch=master)](https://travis-ci.org/mapbox/geo-pixel-stream)","main":"index.js","scripts":{"test":"tape test/*.test.js"},"repository":{"type":"git","url":"https://github.com/mapbox/geo-pixel-stream.git"},"author":{"name":"Mapbox"},"license":"ISC","bugs":{"url":"https://github.com/mapbox/geo-pixel-stream/issues"},"homepage":"https://github.com/mapbox/geo-pixel-stream","dependencies":{"gdal":"~0.7.0"},"devDependencies":{"mapnik":"^3.1.4","mapnik-test-data":"https://mapbox-npm.s3.amazonaws.com/package/mapnik-test-data-2.0.3-fece0a9c546074a1479e9eae2333184029bb2279.tgz","mkdirp":"^0.5.0","queue-async":"^1.0.7","tape":"^3.4.0","underscore":"^1.7.0"},"gitHead":"89429366dfb9a27cf9b0f0166481b9285dcce557","_id":"geo-pixel-stream@0.2.0","_shasum":"97f2e9b6f57f78897d6028f5efccae9589871271","_from":".","_npmVersion":"1.4.28","_npmUser":{"name":"yhahn","email":"young@mapbox.com"},"maintainers":[{"name":"rclark","email":"ryan.clark.j@gmail.com"},{"name":"edenh","email":"eden@mapbox.com"},{"name":"sgillies","email":"sean@mapbox.com"},{"name":"lbud","email":"lauren@mapbox.com"},{"name":"bsudekum","email":"bobby@mapbox.com"},{"name":"dnomadb","email":"damon@mapbox.com"},{"name":"ian29","email":"ian.villeda@gmail.com"},{"name":"dvncan","email":"duncan@mapbox.com"},{"name":"nickidlugash","email":"nicki@mapbox.com"},{"name":"samanbb","email":"saman@mapbox.com"},{"name":"ajashton","email":"aj.ashton@gmail.com"},{"name":"lxbarth","email":"alex@developmentseed.org"},{"name":"mikemorris","email":"michael.patrick.morris@gmail.com"},{"name":"ianshward","email":"ian@mapbox.com"},{"name":"mourner","email":"agafonkin@gmail.com"},{"name":"tristen","email":"tristen.brown@gmail.com"},{"name":"ingalls","email":"nicholas.ingalls@gmail.com"},{"name":"ansis","email":"ansis.brammanis@gmail.com"},{"name":"jfirebaugh","email":"john.firebaugh@gmail.com"},{"name":"miccolis","email":"jeff@miccolis.net"},{"name":"gretacb","email":"carol@mapbox.com"},{"name":"aaronlidman","email":"aaronlidman@gmail.com"},{"name":"morganherlocker","email":"morgan.herlocker@gmail.com"},{"name":"camilleanne","email":"camille@mapbox.com"},{"name":"mapbox","email":"accounts@mapbox.com"},{"name":"willwhite","email":"will@mapbox.com"},{"name":"springmeyer","email":"dane@mapbox.com"},{"name":"kkaefer","email":"kkaefer@gmail.com"},{"name":"dthompson","email":"dthompson@gmail.com"},{"name":"yhahn","email":"young@developmentseed.org"},{"name":"tmcw","email":"tom@macwright.org"}],"dist":{"shasum":"97f2e9b6f57f78897d6028f5efccae9589871271","tarball":"https://registry.npmjs.org/geo-pixel-stream/-/geo-pixel-stream-0.2.0.tgz","integrity":"sha512-QUSPckHRWvQdSzDFPx60bB/anDT5WDhqHTcYOSnCHqM8SP0XEjBYlw4BmAdLUb80pfaWfyu9oqYIRMeAZfRsVg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDOYqL+UN2TsBotZfnedtOqX8dWhemnkuSrXexXEVWq0AIgOk7c+pGFceUzqOMQ01HzPvj8VzjGY06xBTOeQ8b78+o="}]},"deprecated":"This module is now under the @mapbox namespace: install @mapbox/geo-pixel-stream instead","directories":{}},"0.3.0":{"name":"geo-pixel-stream","version":"0.3.0","description":"[![Build Status](https://travis-ci.org/mapbox/geo-pixel-stream.svg?branch=master)](https://travis-ci.org/mapbox/geo-pixel-stream)","main":"index.js","scripts":{"test":"tape test/*.test.js"},"repository":{"type":"git","url":"https://github.com/mapbox/geo-pixel-stream.git"},"author":{"name":"Mapbox"},"license":"ISC","bugs":{"url":"https://github.com/mapbox/geo-pixel-stream/issues"},"homepage":"https://github.com/mapbox/geo-pixel-stream","dependencies":{"gdal":"^0.8.0"},"devDependencies":{"mapnik":"^3.1.4","mapnik-test-data":"https://mapbox-npm.s3.amazonaws.com/package/mapnik-test-data-2.0.3-fece0a9c546074a1479e9eae2333184029bb2279.tgz","mkdirp":"^0.5.0","queue-async":"^1.0.7","tape":"^3.4.0","underscore":"^1.7.0"},"gitHead":"2e03106c9daf623bc72f445426076e10f340584e","_id":"geo-pixel-stream@0.3.0","_shasum":"6be412cc36ad7afee9ef3c75507004b6356f6f5a","_from":".","_npmVersion":"1.4.28","_npmUser":{"name":"springmeyer","email":"dane@mapbox.com"},"maintainers":[{"name":"aaronlidman","email":"aaronlidman@gmail.com"},{"name":"ajashton","email":"aj.ashton@gmail.com"},{"name":"ansis","email":"ansis.brammanis@gmail.com"},{"name":"bsudekum","email":"bobby@mapbox.com"},{"name":"camilleanne","email":"camille@mapbox.com"},{"name":"dnomadb","email":"damon@mapbox.com"},{"name":"dthompson","email":"dthompson@gmail.com"},{"name":"gretacb","email":"carol@mapbox.com"},{"name":"ian29","email":"ian.villeda@gmail.com"},{"name":"ianshward","email":"ian@mapbox.com"},{"name":"ingalls","email":"nicholas.ingalls@gmail.com"},{"name":"jfirebaugh","email":"john.firebaugh@gmail.com"},{"name":"kkaefer","email":"kkaefer@gmail.com"},{"name":"lbud","email":"lauren@mapbox.com"},{"name":"lxbarth","email":"alex@mapbox.com"},{"name":"mapbox-admin","email":"accounts@mapbox.com"},{"name":"miccolis","email":"jeff@miccolis.net"},{"name":"mikemorris","email":"michael.patrick.morris@gmail.com"},{"name":"morganherlocker","email":"morgan.herlocker@gmail.com"},{"name":"mourner","email":"agafonkin@gmail.com"},{"name":"nickidlugash","email":"nicki@mapbox.com"},{"name":"rclark","email":"ryan.clark.j@gmail.com"},{"name":"samanbb","email":"saman@mapbox.com"},{"name":"sgillies","email":"sean@mapbox.com"},{"name":"springmeyer","email":"dane@mapbox.com"},{"name":"tmcw","email":"tom@macwright.org"},{"name":"tristen","email":"tristen.brown@gmail.com"},{"name":"willwhite","email":"will@mapbox.com"},{"name":"yhahn","email":"young@mapbox.com"}],"dist":{"shasum":"6be412cc36ad7afee9ef3c75507004b6356f6f5a","tarball":"https://registry.npmjs.org/geo-pixel-stream/-/geo-pixel-stream-0.3.0.tgz","integrity":"sha512-idIriTzCL6Zl2FGkgDNx32Bs+27UVo1JVr1fvqKodCiGgngYi73EkVWfJG3j9l2mQwCTjOep6FKzhHoqNXDbvg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIAjD12SLBu564MANDyU7yFK6fbcrytRlG1e69JApUxcBAiAj8LCOqquNDRAIJX2REogpUOfTEjOcdDFnYNvJowfRGg=="}]},"deprecated":"This module is now under the @mapbox namespace: install @mapbox/geo-pixel-stream instead","directories":{}},"0.4.0":{"name":"geo-pixel-stream","version":"0.4.0","description":"[![Build Status](https://travis-ci.org/mapbox/geo-pixel-stream.svg?branch=master)](https://travis-ci.org/mapbox/geo-pixel-stream)","main":"index.js","scripts":{"test":"tape test/*.test.js"},"repository":{"type":"git","url":"git+https://github.com/mapbox/geo-pixel-stream.git"},"author":{"name":"Mapbox"},"license":"ISC","bugs":{"url":"https://github.com/mapbox/geo-pixel-stream/issues"},"homepage":"https://github.com/mapbox/geo-pixel-stream","dependencies":{"gdal":"~0.9.3"},"devDependencies":{"mapnik":"~3.5.14","mapnik-test-data":"https://mapbox-npm.s3.amazonaws.com/package/mapnik-test-data-2.0.3-fece0a9c546074a1479e9eae2333184029bb2279.tgz","mkdirp":"^0.5.0","queue-async":"^1.0.7","tape":"^3.4.0","underscore":"^1.7.0"},"gitHead":"364bd16ba81aa8b5ee20cc18a871ee1fd96cb3ae","_id":"geo-pixel-stream@0.4.0","_shasum":"9118b0c53a611d2bce157891126031053d872c9c","_from":".","_npmVersion":"2.15.5","_nodeVersion":"4.4.5","_npmUser":{"name":"mapsam","email":"sam@mapbox.com"},"dist":{"shasum":"9118b0c53a611d2bce157891126031053d872c9c","tarball":"https://registry.npmjs.org/geo-pixel-stream/-/geo-pixel-stream-0.4.0.tgz","integrity":"sha512-+GsIjKjo3kSTkVBgTBJI91rwFfIjKchmo24GVdyKjJxRxJXdnrb2VWYYh36X/XkAglKVUdpJECNcYqBoNa/3cA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIDIz0Wbl6KyOKMr6hTHNnE21WsM3WAH+bIy3iL5hluIqAiAU65zqmxERmvyqyiymuywWApDN9K/7Ozm45lPbkCelVQ=="}]},"maintainers":[{"name":"aaronlidman","email":"aaronlidman@gmail.com"},{"name":"ajashton","email":"aj.ashton@gmail.com"},{"name":"ansis","email":"ansis.brammanis@gmail.com"},{"name":"bsudekum","email":"bobby@mapbox.com"},{"name":"camilleanne","email":"camille@mapbox.com"},{"name":"dnomadb","email":"damon@mapbox.com"},{"name":"dthompson","email":"dthompson@gmail.com"},{"name":"gretacb","email":"carol@mapbox.com"},{"name":"ian29","email":"ian.villeda@gmail.com"},{"name":"ianshward","email":"ian@mapbox.com"},{"name":"ingalls","email":"nicholas.ingalls@gmail.com"},{"name":"jfirebaugh","email":"john.firebaugh@gmail.com"},{"name":"kkaefer","email":"mail@kkaefer.com"},{"name":"lbud","email":"lauren@mapbox.com"},{"name":"lxbarth","email":"alex@mapbox.com"},{"name":"mapbox-admin","email":"accounts@mapbox.com"},{"name":"mapsam","email":"sam@mapbox.com"},{"name":"miccolis","email":"jeff@miccolis.net"},{"name":"mikemorris","email":"michael.patrick.morris@gmail.com"},{"name":"morganherlocker","email":"morgan.herlocker@gmail.com"},{"name":"mourner","email":"agafonkin@gmail.com"},{"name":"nickidlugash","email":"nicki@mapbox.com"},{"name":"rclark","email":"ryan.clark.j@gmail.com"},{"name":"samanbb","email":"saman@mapbox.com"},{"name":"sgillies","email":"sean@mapbox.com"},{"name":"springmeyer","email":"dane@mapbox.com"},{"name":"tmcw","email":"tom@macwright.org"},{"name":"tristen","email":"tristen.brown@gmail.com"},{"name":"willwhite","email":"will@mapbox.com"},{"name":"yhahn","email":"young@mapbox.com"}],"_npmOperationalInternal":{"host":"packages-16-east.internal.npmjs.com","tmp":"tmp/geo-pixel-stream-0.4.0.tgz_1473977174805_0.17971831071190536"},"deprecated":"This module is now under the @mapbox namespace: install @mapbox/geo-pixel-stream instead","directories":{}}},"readme":"# geo-pixel-stream\n\n[![Build Status](https://travis-ci.org/mapbox/geo-pixel-stream.svg?branch=master)](https://travis-ci.org/mapbox/geo-pixel-stream)\n\n[wip] Node.js streams for reading/writing/transforming pixels using node-gdal\n\n## PixelReader streams\n\nCreate streams that read pixels from each band of a source image:\n\n```js\nvar pixels = require('geo-pixel-stream');\nvar dcrgb = 'node_modules/mapnik-test-data/data/geotiff/DC_rgb.tif';\nvar readers = pixels.createReadStreams(dcrgb);\n```\n\nIf an image has 4 bands (e.g. RGBA), then the `streams` array will contain four stream objects. Each stream contains metadata about the original datasource and the band represented:\n\n```js\nconsole.log(readers[0].metadata);\n// {\n//   driver: 'GTiff',\n//   width: 1541,\n//   height: 1913,\n//   numBands: 4,\n//   srs: gdal.SpatialReference.fromEPSG(26918),\n//   geotransform: [ 326356, 4.00129785853342, 0, 4318980, 0, -4.0015682174594875 ],\n//   id: 1,\n//   type: 'Byte',\n//   blockSize: {\n//     x: 1541,\n//     y: 1\n//   }\n// }\n```\n\nEach PixelReader is a [Node.js readable stream](http://nodejs.org/api/stream.html#stream_class_stream_readable). The stream's `data` event will emit objects indicating the offset (in terms of blocks, not pixels), block size (in pixels) and a TypedArray of pixel data.\n\n```js\nreaders[0].once('data', function(data) {\n  console.log(data);\n  // {\n  //   offset: { x: 0, y: 0 },\n  //   blockSize: { x: 1541, y: 1 },\n  //   buffer: [ Uint8TypedArray ]\n  // }\n});\n```\n\n[Inheriting from the stream api](http://nodejs.org/api/stream.html#stream_readable_pipe_destination_options), PixelReaders can send data to writable streams via `pipe`:\n\n```js\nvar writable = new stream.Writable();\nreaders[1].pipe(writable);\n```\n\n## PixelWriter streams\n\nCreate streams that write pixels from each band of a destination image:\n\n```js\nvar outputFile = '~/some.tif';\nvar writers = pixels.createWriteStreams(outputFile);\n```\n\nAgain, if this will generate one stream for each band of the output file. If, instead of writing to an existing file, you want to write to a new, blank image, you must provide sufficient metadata to generate the new image:\n```js\nvar outfile = '~/just-red-pixels.tif'\nvar outputMetadata = {\n  driver: 'GTiff',\n  width: 1541,\n  height: 1913,\n  numBands: 1,\n  srs: gdal.SpatialReference.fromEPSG(26918),\n  geotransform: [ 326356, 4.00129785853342, 0, 4318980, 0, -4.0015682174594875 ],\n  id: 1,\n  type: 'Byte',\n  blockSize: { x: 1541, y: 1 }\n};\nvar writers = pixels.createWriteStreams(outputFile, outputMetadata);\n```\n\nOnce you've created readers and writers, you can `pipe` data from one image to another:\n\n```js\nvar dcrgb = 'node_modules/mapnik-test-data/data/geotiff/DC_rgb.tif';\nvar readers = pixels.createReadStreams(dcrgb);\nvar readRedBand = readers[0];\n\nvar writers = pixels.createWriteStreams(outputFile);\nvar writeRedBand = writers[0];\n\nreadRedBand.pipe(writeRedBand).on('finish', function() {\n  console.log('All done!');\n});\n```\n\n## PixelTransform streams\n\nCreate a stream that takes input pixels, performs some sort of manipulation of them, and outputs the adjusted pixels. You create a function that will receive a TypedArray of pixels, performs some adjustment, and provides the adjusted pixels to the provided `callback` function:\n\n```js\nfunction processPixels(buffer, callback) {\n  var result = buffer.map(function(pixel) {\n    return pixel + 10;\n  });\n  callback(null, result);\n}\n\nvar transform = pixels.createTransformStream(processPixels);\n```\n\nIf processing encounters an error, send the error as the first argument to the provided `callback` function.\n\nYou can use a transform stream to make adjustments to pixel values before writing them to a destination file:\n\n```js\nvar dcrgb = 'node_modules/mapnik-test-data/data/geotiff/DC_rgb.tif';\nvar readers = pixels.createReadStreams(dcrgb);\nvar writers = pixels.createWriteStreams(outputFile);\nvar transform = pixels.createTransformStream(processPixels);\n\nreaders[0].pipe(transform).pipe(writers[0]).on('close', function() {\n  console.log('All done!');\n});\n```\n","maintainers":[{"email":"accounts@mapbox.com","name":"mapbox-admin"}],"time":{"modified":"2022-09-20T01:12:28.416Z","created":"2015-01-27T23:33:20.781Z","0.1.0":"2015-01-27T23:33:20.781Z","0.1.1":"2015-01-28T02:13:28.253Z","0.1.2":"2015-06-17T23:03:26.408Z","0.2.0":"2015-09-02T16:19:42.081Z","0.3.0":"2016-01-23T01:01:24.939Z","0.4.0":"2016-09-15T22:06:17.673Z"},"homepage":"https://github.com/mapbox/geo-pixel-stream","repository":{"type":"git","url":"git+https://github.com/mapbox/geo-pixel-stream.git"},"author":{"name":"Mapbox"},"bugs":{"url":"https://github.com/mapbox/geo-pixel-stream/issues"},"license":"ISC","readmeFilename":"readme.md"}