Git Product home page Git Product logo

gullies's Issues

Performance improvements needed for the line simplification step

When rendering an image with a huge number of destination points (>10k) the line simplification step starts to become very slow (> 1h for routes to 20k points)

There's an obvious quadratic step in there that could be sped up by shrinking the relevant bits of the mergeable_segments set. Ways to do that include:

  1. Using a pair of kd trees to store segments - indexed by both start and end points - and then using them to find the nearest neighbours of the segment endpoints

  2. Splitting out the mergeable_segments set by segment weight - that could help if the weights are well distributed. I suspect that a majority of the segments are going to be of weight 1, however, so this may not buy is very much.

Remove the MAX_ROUTE_COUNT limit set in getroutes.py

That limit was put in place back when I was trying to use plotly to generate the output.

Now we're instead doing some custom line simplification in plotmatplotlib.py (and also using matplotlib instead of plotly js to do the actual rendering) it's no longer necessary, and in particular it confuses things when using the new getlocations.py script to generate a custom number of destination locations from an OSM snapshot.

Use a real command line args library

like argparse or something, instead of reading out argv values by hand.

That will let us support nice things like overrideable default values for e.g. the lat-long coords of the point that all the routes drain into.

Autodetect a good aspect ratio for the output plot when plotting with matplotlib

Right now we explicitly set an image size that results in an image with a 4:3 aspect ratio. This happens to work out okay for plots of the continental US or NY state, but for plotting other things we should probably figure out a good aspect ratio for the data we're plotting.

It's fine to start off by assuming that we'll want an equirectangular projection, so x and y coordinates on the plot map linearly to degrees of longitude and latitude; eventually that might change if we want to support 'real' map projections.

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.