Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

When using Leaflet to visualize a large dataset (GeoJSON with 10,000 point features), not surprisingly the browser crashes or hangs. A sub-sample of 1000 features from the same dataset works flawlessly. Unfortunately I can't share the dataset for others to try out.

Does anybody have better solutions for visualizing such large datasets? (ultimate aim is to scale this to 2 million features) I'm even willing to consider offline visualization frameworks in case browser based alternatives such as Polymaps or d3.js etc. are deemed incapable.

Edit: Forgot to mention, the user needs to be able to filter the dataset by attributes. So out of N features, only the matching n <= N features might need to be dynamically rendered.

share|improve this question
2  
Similar discussions: gis.stackexchange.com/questions/4096/ gis.stackexchange.com/questions/14882 gis.stackexchange.com/questions/6954 –  julien Oct 1 '12 at 10:45

6 Answers 6

I've written this, still work in progress http://gee.chalo.org.uk/Gee/Eric.html?databaseName=gtfs I have lots of stop icons, which are the little blue squares. If you pan out (assuming you are getting something) you should see black lines, which is the composite route map which takes a while to fetch, with what are obviously stations as they are vertices, but with no station. they stop rendering if you pan about, in particular from the north it seems.

they are there, you can get them back by judicious zooming in. Any clues ?. I've just started using featuregroups, which are obviously a massive UI component, so I dont know if it's that and if I need to set "always reneder, dont try and suss the zoom level render value" or whatever.

share|improve this answer
    
Hey Mark, welcome to SE. You may want to try posting this as a separate question with reference to this question here if the answers here are not working for you. –  GISKid Aug 7 at 15:11

I had solutions to map out 50 to 100 million records, you need to use server-side solutions to do grid and dynamic based. You can not reply on web map APIs (Google,or others) to do client-side's rendering....

[http://96.231.36.9:8080/rbgis/google_map.html][1] try the above links and see how

share|improve this answer
1  
Please expand your answer, so it will be helpful even when your server is inaccessible. –  lynxlynxlynx Sep 4 '13 at 15:28

I'm Leaflet author. There's an awesome clustering plugin for this, Leaflet.markercluster. It's very fast and efficient (take a look at 50k markers example), looks and works very smoothly with nice animations, and has lots of options to suit to your needs.

share|improve this answer

You can use TileMill and render points as raster images, with fast interactivity from UTFGrid. It scales to millions of points and polygons, like this census map, since it intelligently sends only the data needed for specific areas, exactly when it's needed.

As far as I know, there are no other fast methods for doing this other than having a very fast WFS server, which is rather hard to maintain/scale to many viewers.

Disclosure: work for MapBox, wrote quite a bit of the code. But TileMill is free/open source, etc.

share|improve this answer
1  
I forgot to mention the user should be able to filter the dataset by attributes and display only matching records. So let's say out of 10,000 records, only 500 may actually need to be rendered for a given case. Can (or how would) I do this with TileMill? –  Imad Oct 1 '12 at 9:16
2  
Nope. You might want to try CartoDB, but you should know that making things dynamic and making things performant are opposing goals. –  tmcw Oct 1 '12 at 14:31

You should never display millions of points on a map. Not only because of the major performance problems, but also from a user's perspective because for them it most certainly will be difficult to interpret this data. Use some means of aggregating the data (clustering, aggregating to polygon areas etc.) combined with different display types at different zoom levels (e.g. show the "raw" point data only on very high zoom levels and use aggregated data everywhere else). An example would be a real estate site such as zillow.com.

share|improve this answer

Have you looked into the leaflet clusterer? A blog post by the author describes it here

Another option worth a look may be to use leaflet in combination with GIS Cloud. Take a look at this demo to see it handle a lot of geometries very quickly. Very impressive. I am in no way affiliated with GISCloud.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.