tilelive-csvin
A tilelive provider for CSV inputs that supports streaming reads.
Usage
This example requires @mojodna's fork of
mbtiles
for createWriteStream()
.
"use strict"; var MBTiles = tilelive = ; var CSV = tilelive; "csvin+file://./data.csv?delimiter=\t&encoding=base64" { "mbtiles://./tiles.mbtiles" { src; };};
Options
The following query parameters are recognized:
delimiter
- Column delimiter. Defaults to,
.encoding
- Option source encoding. Defaults tonull
. Other valid values:base64
.columnIndex
- 0-based index for the column containing data. Defaults to1
.
Supported Protocols
This provider understands the file:
(e.g. csvin+file://./stuff.csv
) and stdin:
protocols.
Why?
CSV is a popular format with the Big Data set.
Streaming
For sparsely filled or unknown bounding boxes, iterating over a known list of
tiles is more efficient than using
a tilelive
Scheme
.
getInfo()
?
That's not implemented. You'll want to fake it by generating your own TileJSON separately. Perhaps one could be provided as a query parameter? (Patches welcomed!)
Base64 Encoding?
CSV is a text-based format, after all.
Writing?
Nope. Why?
getTile()
)?
Random Access (Nope.