def drawData_( self ): """Define what we have to be drawn (needed from base class) is called while a draw event is fired.""" proj = self.getProjection( ) for p in self.gpsWPTs: x,y = proj( p[0], p[1] ) self.axes.plot( x, y, 'x', markersize = 12, color = 'blue' ) self.axes.text( x, y, p[2] ) if self.newXLimits is not None: self.axes.set_xlim( self.newXLimits ) self.axes.set_ylim( self.newYLimits ) underlayMap( self.axes, proj, vendor = self.vendorProp(), zoom = -1, pixelLimit = [1500, 1024], verbose = True ) self.axes.grid()
def drawData_(self): """Define what we have to be drawn (needed from base class) is called while a draw event is fired.""" proj = self.getProjection() for p in self.gpsWPTs: x, y = proj(p[0], p[1]) self.axes.plot(x, y, 'x', markersize=12, color='blue') self.axes.text(x, y, p[2]) if self.newXLimits is not None: self.axes.set_xlim(self.newXLimits) self.axes.set_ylim(self.newYLimits) underlayMap(self.axes, proj, vendor=self.vendorProp(), zoom=-1, pixelLimit=[1500, 1024], verbose=True) self.axes.grid()
#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]) axes = plt.gca() underlayMap( axes, proj, vendor=vendor, zoom=10, pixelLimit=[ 1024, 1024], verbose=True, fitMap=True) axes.grid() plt.show()