[GIS] How to load big geo-data file into web application

d3geojsonjavascriptleaflettopojson

I am building a web app where I show details in map. I load data using geojson file (190 mb).

I was looking in different possibilities to show the data, here there are:

The simplest way to load the file is using jquery "getJson".

jQuery.getJSON(url, function(data){
..
}

Someone suggested to stream the JSON data rather than bulk-load it. I have tried https://github.com/tmcw/geojson-stream .
I couldn't get great results in all the cases.

Can you please suggest any better approach ?

Best Answer

It's obvious here that you can't expect to get 200 MB from a server to a client in a reasonable amount of time.

Your only options are to drastically simplify it (probably will resulting unusable information) or tiling it (either vector or raster tiling should work).

What you do depends on what you know and what you want to achieve. Here's what I suggest, in order of easiness:

  1. use MapBox or CartoDB or equivalent to do the magic for you.
  2. use GeoServer to do the backend stuff for you (you'll end up tiling with WMS and can use WFS for interactivity)
  3. use TileJSON to tile up your vector data. This is more custom, if you're into that.