Visualization of CSV GPS data on map

78 views
Skip to first unread message

architek...@gmail.com

unread,
May 22, 2016, 1:56:40 PM5/22/16
to Leaflet

I want to realize GPS big data visualization in a map. My input is a huge .csv file in the following format:

TYPE_1;400d4;1450134000000;48.8296939287473;9.06997193073387 TYPE_1;400d4;1450134770000;48.823998928453776;9.06802699392104 TYPE_1;400d4;1450135080000;48.82397193872555;9.06794392926057 TYPE_2;4f1da;1450137659000;51.946744933699605;12.45337794183445 TYPE_3;f75bd;1450137659000;52.69536095331207;13.201165997051245

The input data is structured in the following way: The type; ID; timestamp; latitude; longitude

At first I tried using the leaflet.js JavaScript library in connection with the leaflet plugin TimeDimension. To get the proper GeoJSON format the plugin needs I utilized leaflet-omnivore plugin.

TimeDimension does exactly what I need for my app:

  • The data can be displayed like an interactive movie
  • You can scroll trough the timeline with a slider
  • The time passed while playing is scalable
  • Different layers of entities can be shown/hidden
  • Now the problem is loading my csv. It seemed like the browser/leaflet-omnivoreleaflet-omnivore was not capable of handling such big files.

Some more examples my app should be like:

Can you give me some advice to find the 'right' approach?

architek...@gmail.com

unread,
May 22, 2016, 2:01:03 PM5/22/16
to Leaflet
Sry this is the right format of the .csv file:

Dr. Ezra Boyd

unread,
May 22, 2016, 10:52:40 PM5/22/16
to Leaflet

Do you need every vertex in your layer? If you can sacrifice some accuracy when the user is zoomed in, then you can lower the file size using the simplify tool in QGIS.  I am sure there are other tools, but that one has worked for me when I had a similar problem.

Ezra 

Vic Slagter

unread,
Jun 3, 2016, 4:41:38 PM6/3/16
to Leaflet
Read the csv
split the data on newlines
split the lines on ; to get each point data
add marker to the map with this data
Reply all
Reply to author
Forward
0 new messages