chronhq / backend

Backend for database. Python, Django, PostGIS
https://maps.chron.ist/
GNU General Public License v3.0
6 stars 1 forks source link

Animations for expeditions (Military Symbols) #181

Open MiklerGM opened 4 years ago

MiklerGM commented 4 years ago

This issue is connected to #155 #94

In order to implement animations for expeditions or LineStrings we need to modify data set provided to mapbox on the fly. So we can't use MVT. https://docs.mapbox.com/mapbox-gl-js/example/animate-a-line/

For this purpose I would propose to create a separate endpoint for serving full GeoJSON with every military symbol for specified narrative (not narration).

Second Problem -- additional research needed The speed of animation will depend on number of points. Straight line would be animated in one animation frame, triangle in three and so on.

To keep the animation speed steady the LineString should be populated with points with similar space in between

I've been looking into smooth functions, like https://postgis.net/docs/ST_ChaikinSmoothing.html But I think they will have zero effect on a straight line