x, y = xfm.to_grid(p2.x, p2.y) print(' p2: {0:.4f}, {1:.4f}'.format(x,y)) x, y = xfm.to_local(x, y) print(' p2: {0:.4f}, {1:.4f}'.format(x,y)) print(' p3: {0:.4f}, {1:.4f}'.format(p3.x, p3.y)) x, y = xfm.to_grid(p3.x, p3.y) print(' p3: {0:.4f}, {1:.4f}'.format(x,y)) x, y = xfm.to_local(x, y) print(' p3: {0:.4f}, {1:.4f}'.format(x,y)) print() filename_local_points = 'data/Points_05-NOV-15.txt' filename_grid_points = 'data/Waypoints_05-NOV-15.gpx' projection = ProjectionLC('SPCS', '0401') local_pts = Point.read_local_points(filename_local_points, 'sft') if not local_pts: print("No points. Nothing to do.") exit(1) grid_pts = Point.read_gpx_waypoints(filename_grid_points, 'meters', projection) if not grid_pts: print("No waypoints. Nothing to do.") exit(1) def find_point(pts, name): for p in pts: if p.name == name: return p return None