Assume I have recorded the following values during a bike trip. One such dataset has been recorded every 5 seconds:
timestamp, longitute, latitude, pulse rate, pedal frequency
What is the best way to store them in a GeoDjango application? I thought about using a model similar to the following.
class Measurement(models.Model): comment = models.CharField() class MeasurementPoint(models.Model): measurement = models.ForeignKey(Measurement) timestamp = models.DateTimeField() point = models.PointField(srid=4326) pulse = models.IntegerField() pedal = models.IntegerField()
This works and I can query the measurement points. But now I want to display the bike trip on a map, so I have to convert the individual points to a LineString. How is this done? And how would it bit possible to use different colors to highlight for example the pulse rate with different colors?