Coder Social home page Coder Social logo

vt-geojson's People

Contributors

anandthakker avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

vt-geojson's Issues

Fails to install

Running: npm install -g vt-geojson

processing (master) $ npm install -g vt-geojson
npm ERR! Error: Unsupported URL Type: github:anandthakker/node-mbtiles
npm ERR!     at parseUrl (/usr/local/lib/node_modules/npm/node_modules/npm-package-arg/npa.js:148:13)
npm ERR!     at npa (/usr/local/lib/node_modules/npm/node_modules/npm-package-arg/npa.js:62:12)
npm ERR!     at resolver (/usr/local/lib/node_modules/npm/lib/install.js:679:42)
npm ERR!     at null._onTimeout (/usr/local/lib/node_modules/npm/lib/install.js:674:7)
npm ERR!     at Timer.listOnTimeout [as ontimeout] (timers.js:112:15)
npm ERR! If you need help, you may report this *entire* log,
npm ERR! including the npm and node versions, at:
npm ERR!     <http://github.com/npm/npm/issues>

npm ERR! System Darwin 13.4.0
npm ERR! command "node" "/usr/local/bin/npm" "install" "-g" "vt-geojson"
npm ERR! cwd /Users/aaron/processing
npm ERR! node -v v0.10.30
npm ERR! npm -v 2.0.0-alpha-5
npm ERR! 
npm ERR! Additional logging details can be found in:
npm ERR!     /Users/aaron/processing/npm-debug.log
npm ERR! not ok code 0

Secure URLs forced to use port 80.

Again, with browserify: When using a secure URL, at some point along the line the URL is injected with ":80" at the end of the domain, causing an SSL error.

fails to convert this particular tile

This module is working great for selecting points along a route from my vector tile source, but for some reason it seems to fail with one particular tile.

The trouble tile seems to be [[19086,24820,16]] in my aarondennis.7i147a82 tile source. There could be others too, I just happened on this one. I used tippecanoe to create these tiles, and maybe the problem was there, but it seems that vt-geojson can't process something about this tile.

screen shot 2015-10-28 at 11 45 01 am

I expected the script below to output the red point features inside the yellow tile boundaries from the image above, but after success with only some of the features, it then returns an error.

var cover = require('tile-cover'),
    vtGeoJson = require('vt-geojson');

// tile boundaries
var area =  {
      "type": "Feature",
      "geometry": {
        "type": "Polygon",
        "coordinates": [
          [
            [
              -75.157470703125,
              39.956069770090046
            ],
            [
              -75.157470703125,
              39.9602803542957
            ],
            [
              -75.1519775390625,
              39.9602803542957
            ],
            [
              -75.1519775390625,
              39.956069770090046
            ],
            [
              -75.157470703125,
              39.956069770090046
            ]
          ]
        ]
      },
      "properties": {}
    }

var limits = {
  min_zoom: 16,
  max_zoom: 16
};

var tiles = cover.tiles(area.geometry, limits);

var source = 'tilejson+http://api.tiles.mapbox.com/v4/aarondennis.7i147a82.json?access_token=pk.eyJ1IjoiYWFyb25kZW5uaXMiLCJhIjoiem5LLURoYyJ9.T3tswGTI5ve8_wE-a02cMw'

vtGeoJson(source, { tiles: tiles })
  .on('data', function(feature) {
    console.log(feature);
  });

The error I receive:

/Users/aaron/node_modules/vt-geojson/node_modules/vector-tile/lib/vectortilefeature.js:81
            throw new Error('unknown command ' + cmd);
                  ^
Error: unknown command 0
    at VectorTileFeature.loadGeometry (/Users/aaron/node_modules/vt-geojson/node_modules/vector-tile/lib/vectortilefeature.js:81:19)
    at VectorTileFeature.toGeoJSON (/Users/aaron/node_modules/vt-geojson/node_modules/vector-tile/lib/vectortilefeature.js:133:23)
    at /Users/aaron/node_modules/vt-geojson/index.js:120:41
    at Array.forEach (native)
    at processTile (/Users/aaron/node_modules/vt-geojson/index.js:115:10)
    at Gunzip.onEnd (zlib.js:227:5)
    at Gunzip.emit (events.js:129:20)
    at _stream_readable.js:908:16
    at process._tickCallback (node.js:355:11)

The same area is successfully processed if I change the zoom limits to 17.

NaN in tile parameters

When using browserify to create a bundle suitable for browsers, at some point along the line the z, x, and y parameters are passed NaN. This, of course, fails.

progress callback

offer a progress callback, estimating % done with (sum of examined features) / (total test polygon area)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.