Skip to content

cutting-room-floor/tile-stat-stream

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

25 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Tile Statistics Stream

build status npm version

A transform stream that gathers statistics from vector tile data.

example

var tilelive = require('tilelive'),
    TileStatStream = require('tile-stat-stream');

var tileStatStream = new TileStatStream();

tilelive.copy(src, dst, { transform: tileStatStream }, function(err) {
    var stats = tileStatStream.getStatistics();
});

output

{
  "world_merc": {
    "geometryTypes": {
      "Unknown": 0,
      "Point": 0,
      "LineString": 0,
      "Polygon": 245
    },
    "count": 245,
    "fields": {
      "AREA": {
        "min": 0,
        "max": 1638094,
        "sum": 12963239,
        "values": [
          44,
          238174,
          8260,
          2740,

install

npm install --save tile-stat-stream

About

generate statistics from vector tile streams

Resources

License

Stars

Watchers

Forks

Packages

No packages published