source: subversion/applications/routing/pyroute/tracklog.py @ 5886

Last change on this file since 5886 was 5832, checked in by ojw, 12 years ago

Allow recording of tracklogs

File size: 1.3 KB
Line 
1#!/usr/bin/python
2#-----------------------------------------------------------------------------
3#
4#
5# Usage:
6#
7#-----------------------------------------------------------------------------
8# Copyright 2007, Oliver White
9#
10# This program is free software: you can redistribute it and/or modify
11# it under the terms of the GNU General Public License as published by
12# the Free Software Foundation, either version 3 of the License, or
13# (at your option) any later version.
14#
15# This program is distributed in the hope that it will be useful,
16# but WITHOUT ANY WARRANTY; without even the implied warranty of
17# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
18# GNU General Public License for more details.
19#
20# You should have received a copy of the GNU General Public License
21# along with this program.  If not, see <http://www.gnu.org/licenses/>.
22#-----------------------------------------------------------------------------
23from base import pyrouteModule
24import os
25import cairo
26from lib_gpx import lib_gpx
27
28class tracklog(pyrouteModule, lib_gpx):
29  """  """
30  def __init__(self, modules):
31    lib_gpx.__init__(self)
32    pyrouteModule.__init__(self, modules)
33    self.active = []
34    self.lines.append(self.active)
35   
36  def addPoint(self,lat,lon):
37    self.active.append([lat,lon])
Note: See TracBrowser for help on using the repository browser.