def openFile( self, files = None ): """Load data here.""" print(files.find('.gpx')) if files.find('.gpx') != -1: self.gpsWPTs = readGPX( files ) else: self.gpsWPTs = readSimpleLatLon( files ) print("reading ", len( self.gpsWPTs ), " points") self.utmZone.setVal( findUTMZone( self.gpsWPTs[0][0], self.gpsWPTs[0][1] ) ) self.draw()
def openFile(self, files=None): """Load data here.""" print(files.find('.gpx')) if files.find('.gpx') != -1: self.gpsWPTs = readGPX(files) else: self.gpsWPTs = readSimpleLatLon(files) print("reading ", len(self.gpsWPTs), " points") self.utmZone.setVal(findUTMZone(self.gpsWPTs[0][0], self.gpsWPTs[0][1])) self.draw()
# -*- coding: utf-8 -*- #import pygimli as g from pygimli.mplviewer import underlayMap from pygimli.importexport import readGPX, readSimpleLatLon import matplotlib.pyplot as plt import pyproj #zone = 32 #vendor = 'OSM' #pnts = readGPX( 'rieseltag.gpx' ) zone = 31 vendor = 'GM' pnts = readSimpleLatLon('bleicherode.dat', True) #zone = 29 #pnts = readGPX( 'gps.gpx' ) proj = pyproj.Proj(proj='utm', zone=zone, ellps='WGS84') # gauss krüger projektion 4. Meridianstreifen (GK 4), Ellipsoid = "Bessel" proj = pyproj.Proj(proj='tmerc', init='epsg:31468', ellps='WGS84') #proj = pyproj.Proj( proj = 'tmerc', init = 'epsg:31468', ellps = 'bessel' ) for p in pnts: x, y = proj(p[0], p[1]) print(x, y) plt.plot(x, y, '.', markersize=18) plt.text(x, y, p[2])