Git Product home page Git Product logo

labs-geojson2mvt's Issues

Memory leak?

Running geojson2mvt on a large region tends to crash with the javascript heap size limit being reached. I think something is leaking memory in there. Plot shows heapsize vs tile number. You can see the Garbage collection working but its not grabbing everything.

heap

Not sure if this is an issue in geojson2mvt or one of the required libraries but investigating.

Generating mvt for big geojson files

Reading big files in node

I would like to generate mvt pyramids with your package for really big geojson file(2GB). It is not possible with fs.readFileSync, because of file size. How can I deal with this problem?
Is it possible to generate piramides for many geojson files? Or maybe I should use streams?

Is it use case for multiple layers? Should I cut geojson on many smaller?

Multiple layers

Would you be open to accepting a pull request that changes the API slightly to support multiple layers? Something like

var fs = require('fs');
var geojson2mvt = require('geojson2mvt');
 
const busRoutes = './bus_routes.geojson';
const busStops = './bus_stops.geojson';
 
var options = {
  rootDir: 'tiles',
  bbox : [40.426042,-74.599228,40.884448,-73.409958], //[south,west,north,east]
  zoom : {
    min : 8,
    max : 18,
  },
  layers: {
    'layer0': JSON.parse(fs.readFileSync(busRoutes, "utf8")),
    'layer1': JSON.parse(fs.readFileSync(busStops, "utf8"))
  },
};
 
// build the static tile pyramid
geojson2mvt(options);

I could also make this in a backwards compatible way, if desired.

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.