Android line simplification
<p>I'm looking for some best practice advice.</p>

<p>I have create an app (very like mytracks) which collects GPS measurements and displays them on a map. I want to be able to record GPS data for ideally 24 hours at a 10 second interval. This is a lot of data, so I am not keeping it in memory, i'm storing it into an SQLiteDB as it arrives. Inside the draw() functions I am selecting everything and drawing it as a Path object.</p>

<p>My above approach works great until I have > 4 hours worth of data. Then the draw function takes for ever to execute which makes the application seem very slow.</p>

<p>I think what I need to do is draw a simplified trajectory onto the map. My question is what is the best way of doing this. </p>

<p>i) Processor heavy: In draw() select everything from the SQLiteDB, construct the simplified trajectory, draw it on the map.</p>

<p>ii) Memory heavy: Maintain a simplified trajectory in memory, update it as new data arrives, in draw() simply draw it to the map.</p>

<p>iii) Magic: Use some special OverlayLay that I don't know about which handles line simplification for you.</p>

<p>Kind regards,
Cathal</p>
