This gives a simple GPX track that is drawn with asynchronous point reduction to improve the speed of display.
Also, the simple region-based culling gets rid of entire tracks from the draw pipeline for further sppedups.
Reworked all the renderers to be much more object oriented.
Got the sample arrow and conveyor renderers working
Tracked down a few bugs - particularly one still there - TrkSegment with 0 points!
This in my opinion should never happen - it's coming in from "outside" to my code.
WHAT THIS PROVIDES:
A generic rendering/draw of GPX tracks that allows multiple 'renders' to be included as a part of the draw of any
TrkSegment. These 'renders' include the basic track drawing, but also other options such as dashed lines,
rainbow-coloured altitude indication, speed indication, arrows to point direction, animating 'lines' showing
direction of movement, and dots/text showing 1km (or any other) distances along tracks. It's very extendable
and incredibly cheap in terms of procesisng speed.
For a view of some of these operating on this version of the code, see https://youtu.be/aRGCNLmBAlk
Additionally, all of the above have automatic asynchronous track resampling - either via line culling of
Ramer-Douglas-Peucer (implemented for the base track draw at different zooms), or an actual resampler that
takes a distance and steps off and creates a new track with points spaced exactly that distance apart along
the original track. The asynchronous resampling/culling willl automatically enable the new (optimal) track
display when the background task has completed.
This is completely up to date with the master branch as of an hour or so ago!
Two modified files
- GPXUtilities
Added some fields to WptPt to enable distance measurement on tracks and colouring for altitude/speed
- GPXLayer
Installed the new track rendering with examples (commented/out)
Two new files
- AsynchronousResampler.java
Implements line resampling and culling asynchrnonously for all line drawing
- Renderable.java
Set of classes for drawing different kinds of gpx 'renders'
- normal with automatic Ramer-Douglas-Peucer line culling
- conveyor-belt type animation of segments on a path
- altitude colouring of a path
- speed colouring of a path
- distance based waypoint/marker drawing