GeoTracking/class/gpxInterpreter.py

23 lines
555 B
Python

import gpxpy
import gpxpy.gpx
from sqlalchemy.orm import Session
class GPXHandler:
__dbSession: Session
def __init__(self, session:Session):
self.__dbSession = session
pass
# handles converting a gpx file into usable data
def parse(self, file):
self.gpx = gpxpy.parse(file)
pass
# handles a route from db and converting it into geoJSON
def getRoute(self, route):
pass
# handles calculating the distance between two points
def calcDist(self, p1, p2):
pass