From 06d05fc6a40be2a152fcc13e2694525fe02d7ba3 Mon Sep 17 00:00:00 2001 From: BatchelorJ <6S7Jo!f%s8wQ@0yGX8ZM> Date: Tue, 7 Apr 2020 11:54:48 +1000 Subject: [PATCH] Remove surveyconvert modules --- geodepy/surveyconvert/classtools.py | 335 --------------- geodepy/surveyconvert/config.py | 95 ----- geodepy/surveyconvert/dna.py | 178 -------- geodepy/surveyconvert/fbk.py | 398 ------------------ geodepy/surveyconvert/gsi.py | 358 ---------------- geodepy/tests/resources/fbksample.fbk | 147 ------- geodepy/tests/resources/fbksample.gpy | 37 -- geodepy/tests/resources/fbksample.msr | 62 --- geodepy/tests/resources/fbksample.stn | 10 - geodepy/tests/resources/fbksample.txt | 14 - geodepy/tests/resources/gsisample.gpy | 21 - geodepy/tests/resources/gsisample.gsi | 147 ------- geodepy/tests/resources/gsisample.msr | 40 -- .../tests/resources/gsisample_noconfig.msr | 40 -- geodepy/tests/test_surveyconvert.py | 85 ---- 15 files changed, 1967 deletions(-) delete mode 100644 geodepy/surveyconvert/classtools.py delete mode 100644 geodepy/surveyconvert/config.py delete mode 100644 geodepy/surveyconvert/dna.py delete mode 100644 geodepy/surveyconvert/fbk.py delete mode 100644 geodepy/surveyconvert/gsi.py delete mode 100644 geodepy/tests/resources/fbksample.fbk delete mode 100644 geodepy/tests/resources/fbksample.gpy delete mode 100644 geodepy/tests/resources/fbksample.msr delete mode 100644 geodepy/tests/resources/fbksample.stn delete mode 100644 geodepy/tests/resources/fbksample.txt delete mode 100644 geodepy/tests/resources/gsisample.gpy delete mode 100644 geodepy/tests/resources/gsisample.gsi delete mode 100644 geodepy/tests/resources/gsisample.msr delete mode 100644 geodepy/tests/resources/gsisample_noconfig.msr delete mode 100644 geodepy/tests/test_surveyconvert.py diff --git a/geodepy/surveyconvert/classtools.py b/geodepy/surveyconvert/classtools.py deleted file mode 100644 index 4b0d3ec..0000000 --- a/geodepy/surveyconvert/classtools.py +++ /dev/null @@ -1,335 +0,0 @@ -#!/usr/bin/env python3 - -""" -Geoscience Australia - Python Geodesy Package -Survey Data Converter - Class Tools Module -""" - -import itertools -import operator -from statistics import mean, stdev -from geodepy.convert import DMSAngle, dec2dms, dd2sec -from geodepy.survey import first_vel_corrn - - -class Coordinate(object): - def __init__(self, pt_id, system, hz_datum, - vert_datum, epoch, x=0.0, y=0.0, z=0.0): - self.pt_id = pt_id - self.system = system - self.hz_datum = hz_datum - self.vert_datum = vert_datum - self.epoch = epoch - self.x = x - self.y = y - self.z = z - - def __repr__(self): - return ('{' + str(self.hz_datum) + ', ' - + str(self.x) + ', ' - + str(self.y) + ', ' - + str(self.z) + '}') - - -class InstSetup(object): - def __init__(self, pt_id, coordinate, observation=None): - self.pt_id = pt_id - self.coordinate = coordinate - if observation is None: - self.observation = [] - else: - self.observation = [] - self.observation.append(observation) - - def __repr__(self): - return ('{InstSetup: ' + repr(self.pt_id) - + ' ' + repr(self.coordinate) - + '}\n Observations:\n' - + repr(self.observation)) + '\n\n' - - def addobs(self, observation): - return self.observation.append(observation) - - def __iter__(self): - return self - - -class Observation(object): - def __init__(self, from_id, to_id, inst_height=0.0, target_height=0.0, - face='FL', rounds=0.5, - hz_obs=DMSAngle(0, 0, 0), hz_stdev=DMSAngle(0, 0, 0), - va_obs=DMSAngle(0, 0, 0), va_stdev=DMSAngle(0, 0, 0), - sd_obs=0.0, sd_stdev=0.0, - hz_dist=0.0, vert_dist=0.0): - self.from_id = from_id - self.to_id = to_id - self.inst_height = inst_height - self.target_height = target_height - self.face = face - self.rounds = rounds - self.hz_obs = hz_obs - self.hz_stdev = hz_stdev - self.va_obs = va_obs - self.va_stdev = va_stdev - self.sd_obs = sd_obs - self.sd_stdev = sd_stdev - self.hz_dist = hz_dist - self.vert_dist = vert_dist - - def __repr__(self): - return ('{from: ' + repr(self.from_id) - + 'to: ' + repr(self.to_id) - + '; inst_height ' + repr(self.inst_height) - + '; target_height ' + repr(self.target_height) - + '; face ' + repr(self.face) - + '; rounds ' + repr(self.rounds) - + '; hz_obs ' + repr(self.hz_obs) - + '; va_obs ' + repr(self.va_obs) - + '; sd_obs ' + repr(self.sd_obs) - + '}') - - def changeface(self): - # Change Horizontal Angle - if 0 <= self.hz_obs.degree < 180: - hz_switch = self.hz_obs + DMSAngle(180) - elif 180 <= self.hz_obs.degree < 360: - hz_switch = self.hz_obs - DMSAngle(180) - else: - raise ValueError('Horizontal Angle out of range (0 to 360 degrees)') - # Change Vertical Angle - if 0 <= self.va_obs.degree < 360: - va_switch = DMSAngle(360) - self.va_obs - else: - raise ValueError('Vertical Angle out of range (0 to 360 degrees)') - # Change Face Label - newface = None - if self.face == 'FL': - newface = 'FR' - elif self.face == 'FR': - newface = 'FL' - return Observation(self.from_id, - self.to_id, - self.inst_height, - self.target_height, - newface, - self.rounds, - hz_switch, - self.hz_stdev, - va_switch, - self.va_stdev, - self.sd_obs, - self.sd_stdev, - self.hz_dist, - self.vert_dist) - - -def meanfaces(ob1, ob2): - """ - Take two Observations and return their mean Face Left Sense Observation - If one Observation and one None, return Face Left Sense Observation - :param ob1: Observation Object (or None) - :param ob2: Observation Object (or None) - :return: Meaned Observation Object of ob1 and ob2 (Face Left Sense) - """ - if isinstance(ob1, Observation) and isinstance(ob1, type(None)): - raise TypeError('Invalid Input Type (ob1)') - elif isinstance(ob2, Observation) and isinstance(ob2, type(None)): - raise TypeError('Invalid Input Type (ob2)') - elif isinstance(ob1, type(None)) and isinstance(ob2, type(None)): - raise TypeError('Ob1 and Ob2 cannot both be None') - elif isinstance(ob1, type(None)) and isinstance(ob2, Observation): - if ob2.face == 'FL': - return ob2 - else: - return ob2.changeface() - elif isinstance(ob1, Observation) and isinstance(ob2, type(None)): - if ob1.face == 'FL': - return ob1 - else: - return ob1.changeface() - elif (ob1.from_id != ob2.from_id - or ob1.to_id != ob2.to_id - or ob1.inst_height != ob2.inst_height - or ob1.target_height != ob2.target_height): - raise ValueError('Inputs must be Observation Objects. ' - 'From, To, Instrument and Target Height must be the same to mean two observations\n' + - 'Observation 1\n' + - 'from: ' + ob1.from_id + ' to: ' + ob1.to_id + ' inst_ht: ' + str(ob1.inst_height) - + ' tgt_ht: ' + str(ob1.target_height) + '\n' + - 'Observation 2\n' + - 'from: ' + ob2.from_id + ' to: ' + ob2.to_id + ' inst_ht: ' + str(ob2.inst_height) - + ' tgt_ht: ' + str(ob2.target_height) + '\n') - else: - # Check Face Inputs, convert all to Face Left Sense - if ob1.face == 'FL' and ob2.face == 'FR': - ob2 = ob2.changeface() - elif ob1.face == 'FR' and ob2.face == 'FL': - ob1 = ob1.changeface() - elif ob1.face == 'FR' and ob2.face == 'FR': - ob1 = ob1.changeface() - ob2 = ob2.changeface() - elif ob1.face == 'FL' and ob2.face == 'FL': - pass - else: - raise ValueError('Incompatible Face Values') - # Calculate means, return new observation - if abs(ob1.hz_obs.dec() - ob2.hz_obs.dec()) < 180: - meaned_hz = (ob1.hz_obs + ob2.hz_obs) / 2 - elif ob1.hz_obs < ob2.hz_obs: - ob2_shift = -(DMSAngle(360) - ob2.hz_obs) - meaned_hz = (ob1.hz_obs + ob2_shift) / 2 - if meaned_hz < DMSAngle(0): - meaned_hz = meaned_hz + DMSAngle(360) - elif ob2.hz_obs < ob1.hz_obs: - ob1_shift = -(DMSAngle(360) - ob1.hz_obs) - meaned_hz = (ob1_shift + ob2.hz_obs) / 2 - if meaned_hz < DMSAngle(0): - meaned_hz = meaned_hz + DMSAngle(360) - meaned_va = (ob1.va_obs + ob2.va_obs) / 2 - meaned_sd = round(((ob1.sd_obs + ob2.sd_obs) / 2), 4) - return Observation(ob1.from_id, - ob1.to_id, - ob1.inst_height, - ob1.target_height, - ob1.face, - ob1.rounds + ob2.rounds, - meaned_hz, - ob1.hz_stdev, - meaned_va, - ob1.va_stdev, - meaned_sd, - ob1.sd_stdev) - - -def reducesetup(obslist, strict=False, zerodist=False, meanmulti=False): - """ - Takes a list of Observations from one setup and - means together FL, FR pairs of Observations. - :param obslist: List of Observations (i.e. from one InstSetup) - :param strict: If True, all single-face Obs are ignored. If False, all - single-face Obs are included and converted to Face Left - :param zerodist: If True, Obs with Slope Distance of Zero are included. - If False, these are ignored - :param meanmulti: If True, multiple rounds of observations are reduced - to a single FL-sense Observation - :return: a reduced list of Observations - """ - # Remove obs with sd_obs == 0 - if not zerodist: - for ob in obslist: - if ob.sd_obs == 0: - obslist.remove(ob) - - # Group obs numbers by to_id - uniqueto = [] - for ob in obslist: - uniqueto.append(ob.to_id) - uniqueto = list(set(uniqueto)) - # Sort Obs by to_id and face - meanedobs = [] - for unique_id in uniqueto: - fl_list = [] - fr_list = [] - for ob in obslist: - if ob.to_id == unique_id and ob.face == 'FL': - fl_list.append(ob) - elif ob.to_id == unique_id and ob.face == 'FR': - fr_list.append(ob) - elif ob.to_id != unique_id and (ob.face == 'FL' or ob.face == 'FR'): - pass - else: - raise ValueError('Invalid Face') - obsdict = {unique_id: {'FL': fl_list, 'FR': fr_list}} - - # Group Obs into FL, FR pairs and mean (Remove all non-paired obs) - if strict: - for key in obsdict: - pairedlist = list(zip(obsdict[key]['FL'], obsdict[key]['FR'])) - for pair in pairedlist: - meanob = meanfaces(pair[0], pair[1]) - meanedobs.append(meanob) - # Group Obs into FL, FR pairs and mean (Keep all non-paired obs) - elif not strict: - for key in obsdict: - pairedlist = list(itertools.zip_longest(obsdict[key]['FL'], obsdict[key]['FR'], fillvalue=None)) - for pair in pairedlist: - meanob = meanfaces(pair[0], pair[1]) - meanedobs.append(meanob) - # Mean multiple repeated measurements into a single FL observation - if meanmulti: - multiob = [] - to_ids = set([i.to_id for i in meanedobs]) - for id in to_ids: - matchedobs = [] - for ob in meanedobs: - if ob.to_id == id: - matchedobs.append(ob) - ob1 = matchedobs[0] - repeat_hz = [ob.hz_obs.dec() for ob in matchedobs] - repeat_hz = sorted(repeat_hz) - repeat_va = [ob.va_obs.dec() for ob in matchedobs] - repeat_sd = [ob.sd_obs for ob in matchedobs] - # Finds where Horizontal Obseravtions are either side of 360, converts those on 360 side to negative - hz_diff = [j - i for i, j in zip(repeat_hz[:-1], repeat_hz[1:])] - bigjump = 1e100 - for num, i in enumerate(hz_diff): - if i > 180: - bigjump = num - for num, ob in enumerate(repeat_hz): - if num > bigjump: - repeat_hz[num] = repeat_hz[num] - 360 - # Mean Repeated Observations - mean_hz = mean(repeat_hz) - if mean_hz < 0: - mean_hz += 360 - mean_va = mean(repeat_va) - mean_sd = mean(repeat_sd) - # Compute Standard Deviations for Observations - if len(repeat_hz) > 2: - hz_stdev = stdev(repeat_hz) - else: - hz_stdev = 0.0 - if len(repeat_va) > 2: - va_stdev = stdev(repeat_va) - else: - va_stdev = 0.0 - if len(repeat_sd) > 2: - sd_stdev = stdev(repeat_sd) - else: - sd_stdev = 0.0 - # Compute number of rounds of observations completed - sum_rounds = 0 - for ob in matchedobs: - sum_rounds += ob.rounds - # Output Meaned Observation - multiob.append(Observation(ob1.from_id, - id, - ob1.inst_height, - ob1.target_height, - ob1.face, - sum_rounds, - dec2dms(mean_hz), - dd2sec(hz_stdev), - dec2dms(mean_va), - dd2sec(va_stdev), - mean_sd, - sd_stdev)) - meanedobs = multiob - # Order list of meaned obs - sorted_meanedobs = sorted(meanedobs, key=operator.attrgetter('hz_obs')) - return sorted_meanedobs - - -def first_vel_observations(obslist, params, temp, pressure, rel_humidity): - """ - Performs a first velocity correction for all observed slope distances in a list of Observations - :param obslist: List of Observations (i.e. from one InstSetup) - :param params: Tuple of First Velocity Parameters C and D (see function first_vel_params) - :param temp: Observed Temperature (degrees Celsius) - :param pressure: Observed Pressure (hectopascals or millibars) - :param rel_humidity: Observed Relative Humidity (percentage) - :return: List of Observations with First Velocity Correction applied - """ - for obs in obslist: - obs.sd_obs = obs.sd_obs + first_vel_corrn(obs.sd_obs, params, temp, pressure, rel_humidity) - return obslist diff --git a/geodepy/surveyconvert/config.py b/geodepy/surveyconvert/config.py deleted file mode 100644 index 80ee40a..0000000 --- a/geodepy/surveyconvert/config.py +++ /dev/null @@ -1,95 +0,0 @@ -#!/usr/bin/env python3 - -""" -Geoscience Australia - Python Geodesy Package -Survey Data Converter - Class Tools Module -""" - - -def readconfig(path): - """ - Read data in from a DNA conversion config file to a list - :param path: .gpy file path - :return: config data in a list - """ - with open(path) as f: - fstring = f.read() - cfg_list = fstring.split('\n\n') - for num, linegroup in enumerate(cfg_list): - cfg_list[num] = cfg_list[num].lstrip('\n') - cfg_list[num] = cfg_list[num].rstrip('\n') - cfg_list[num] = cfg_list[num].splitlines() - return cfg_list - - -def renameobs(cfg_list, project): - # Find entry in cfg_list startswith rename - rename_list = [] - for group in cfg_list: - group_header = group[0].lower() - if group_header.startswith('rename'): - rename_list = group[1:] - for num, i in enumerate(rename_list): - rename_list[num] = i.split(',') - # if old in obs.to_id or obs.from_id, replace with new - for setup in project: - for obs in setup.observation: - for rename_pair in rename_list: - if rename_pair[0] == obs.from_id: - obs.from_id = rename_pair[1] - elif rename_pair[0] == obs.to_id: - obs.to_id = rename_pair[1] - # if old in setup info, replace with new - for setup in project: - for rename_pair in rename_list: - if setup.pt_id == rename_pair[0]: - setup.pt_id = rename_pair[1] - return project - - -def removeobs(cfg_list, project): - # Find entry in cfg_list startswith remove - remove_list = [] - for group in cfg_list: - group_header = group[0].lower() - if group_header.startswith('remove'): - remove_list = group[1:] - for remove_id in remove_list: - for setup in project: - if remove_id == setup.pt_id: - del setup - for setup in project: - for num, obs in enumerate(setup.observation): - if remove_id == obs.from_id: - del setup.observation[num] - elif remove_id == obs.to_id: - del setup.observation[num] - return project - - -def first_vel_cfg(cfg_list): - # Find First Velocity Parameter Inputs in cfg_list - for group in cfg_list: - group_header = group[0].lower() - if group_header.startswith('first vel'): - wavelength = float(group[1]) - temperature = float(group[2]) - pressure = float(group[3]) - rel_humidity = float(group[4]) - return wavelength, temperature, pressure, rel_humidity - else: - return None - - -def stdev_cfg(cfg_list): - # Find Survey Apriori Standard Deviations in cfg_list - for group in cfg_list: - group_header = group[0].lower() - if group_header.startswith('standard dev'): - stdev_angular = float(group[1]) - stdev_pointing = float(group[2]) - stdev_distconst = float(group[3]) - stdev_distppm = float(group[4]) - return stdev_angular, stdev_pointing, stdev_distconst, stdev_distppm - else: - return None diff --git a/geodepy/surveyconvert/dna.py b/geodepy/surveyconvert/dna.py deleted file mode 100644 index b6bb701..0000000 --- a/geodepy/surveyconvert/dna.py +++ /dev/null @@ -1,178 +0,0 @@ -#!/usr/bin/env python3 - -""" -Geoscience Australia - Python Geodesy Package -Survey Data Converter - DynAdjust DNA v3 Output Tools -""" - -from math import atan, degrees, sqrt -from geodepy.convert import dd2sec -from geodepy.statistics import k_val95 - - -def dnaout_dirset(obslist, same_stdev=True, stdev_angular=1, stdev_pointing=0.001): - # Test for Single Observation - if len(obslist) < 2: - return [] - fromlist = [] - for ob in obslist: - fromlist.append(ob.from_id) - fromlist = list(set(fromlist)) - if len(fromlist) != 1: - raise ValueError('Direction Set requires obs with same from_id') - else: - pass - dnaobs = [] - if same_stdev: - # create first line using obslist[0] - line1 = ('D ' - + obslist[0].from_id.ljust(20) - + obslist[0].to_id.ljust(20) - + str(len(obslist)-1).ljust(20) - + str(obslist[0].hz_obs.degree).rjust(17) - + ' ' - + str('%02d' % obslist[0].hz_obs.minute) - + ' ' - + str('{:.3f}'.format(obslist[0].hz_obs.second).rjust(6, '0').ljust(8)) - + ('{:.4f}'.format(stdev_angular))) # add standard deviation - dnaobs.append(line1) - # create other lines using range(1:) - for num in range(1, len(obslist)): - line = ('D ' - + ''.ljust(40) - + obslist[num].to_id.ljust(20) - + str(obslist[num].hz_obs.degree).rjust(17) - + ' ' - + str('%02d' % obslist[num].hz_obs.minute) - + ' ' - + str('{:.3f}'.format(obslist[num].hz_obs.second).rjust(6, '0').ljust(8)) - + ('{:.4f}'.format(stdev_angular))) # add standard deviation - dnaobs.append(line) - else: - # calc stdev for first ob - if obslist[0].sd_obs == 0: - stdev_pt = str(stdev_angular) - else: - # TODO create GUM Std Dev Model for Dirset - pointing_err_pt = dd2sec(degrees(atan(stdev_pointing / obslist[0].sd_obs))) - stdev_pt = str((sqrt((pointing_err_pt ** 2) + (stdev_angular ** 2)))/sqrt(obslist[0].rounds)) - # create first line using obslist[0] - line1 = ('D ' - + obslist[0].from_id.ljust(20) - + obslist[0].to_id.ljust(20) - + str(len(obslist)-1).ljust(20) - + str(obslist[0].hz_obs.degree).rjust(17) - + ' ' - + str('%02d' % obslist[0].hz_obs.minute) - + ' ' - + str('{:.3f}'.format(obslist[0].hz_obs.second).rjust(6, '0').ljust(8)) - + stdev_pt[0:5]) # add standard deviation - dnaobs.append(line1) - # create other lines using range(1:) - for num in range(1, len(obslist)): - if obslist[num].sd_obs == 0: # keep - stdev_pt = str(stdev_angular) - else: - pointing_err_pt = dd2sec(degrees(atan(stdev_pointing / obslist[num].sd_obs))) - stdev_pt = str((sqrt((pointing_err_pt ** 2) + (stdev_angular ** 2)))/sqrt(obslist[num].rounds)) - line = ('D ' - + ''.ljust(40) - + obslist[num].to_id.ljust(20) - + str(obslist[num].hz_obs.degree).rjust(17) - + ' ' - + str('%02d' % obslist[num].hz_obs.minute) - + ' ' - + str('{:.3f}'.format(obslist[num].hz_obs.second).rjust(6, '0').ljust(8)) - + stdev_pt[0:5]) # add standard deviation - dnaobs.append(line) - return dnaobs - - -def dnaout_sd(obslist, stdev_distconst=0.001, stdev_distppm=1): - dnaobs = [] - for observation in obslist: - # GUM Uncertainty Estimation Model - # Characterised Components (Uncertainty, k Value, Population (no of measurements - 1) - type_a_esdm = observation.sd_stdev / sqrt(observation.rounds) - if observation.rounds > 2: - type_a_uncertainty = (type_a_esdm, 1, observation.rounds - 1) - else: - type_a_uncertainty = (type_a_esdm, 1, 1) - inst_centring = (0.001, 2, 30) - tgt_centring = (0.001, 2, 30) - inst_uncertainty_const = (stdev_distconst, 2, 100) - inst_uncertainty_ppm = (stdev_distppm, 2, 100) - # Standard Error 1 sigma - sterr_typea = type_a_uncertainty[0] / type_a_uncertainty[1] - sterr_inst_centring = inst_centring[0] / inst_centring[1] - sterr_tgt_centring = tgt_centring[0] / tgt_centring[1] - sterr_inst_const = inst_uncertainty_const[0] / inst_uncertainty_const[1] - sterr_inst_ppm = observation.sd_obs * ((inst_uncertainty_ppm[0] / inst_uncertainty_ppm[1]) / 1000000) - combined_stdev1sigma = sqrt(sterr_typea ** 2 + sterr_inst_centring ** 2 + sterr_tgt_centring ** 2 + - sterr_inst_const ** 2 + sterr_inst_ppm ** 2) - # Effective Degrees of Freedom (Welch-Satterthwaite) and - vi_eff = (combined_stdev1sigma ** 4) / ((sterr_typea ** 4) / type_a_uncertainty[2] + - (sterr_inst_centring ** 4) / inst_centring[2] + - (sterr_tgt_centring ** 4) / tgt_centring[2] + - (sterr_inst_const ** 4) / inst_uncertainty_const[2] + - (sterr_inst_ppm ** 4) / inst_uncertainty_ppm[2]) - stdev = combined_stdev1sigma * k_val95(int(vi_eff)) - # Exclude slope distances of 0m - if observation.sd_obs == 0: - pass - else: - # Write line output in DNA v3 Format - line = ('S ' - + observation.from_id.ljust(20) - + observation.to_id.ljust(20) - + ''.ljust(19) - + ('{:.4f}'.format(observation.sd_obs)).rjust(9) - + ''.ljust(21) - + ('{:.4f}'.format(stdev)).ljust(8) - + ('{:.4f}'.format(observation.inst_height).ljust(7)) - + ('{:.4f}'.format(observation.target_height))) - dnaobs.append(line) - return dnaobs - - -def dnaout_va(obslist, same_stdev=True, stdev=1, stdev_pointing=0.001): - dnaobs = [] - if same_stdev: - for observation in obslist: - # Format Line - line = ('V ' - + observation.from_id.ljust(20) - + observation.to_id.ljust(20) - + ''.ljust(34) - + str(observation.va_obs.degree).rjust(3) + ' ' - + str(observation.va_obs.minute).rjust(2, '0') + ' ' - + ('{:.3f}'.format(observation.va_obs.second).rjust(6, '0')).ljust(8) - + ('{:.4f}'.format(stdev)).ljust(8) - + ('{:.4f}'.format(observation.inst_height)).ljust(7) - + ('{:.4f}'.format(observation.target_height))) - dnaobs.append(line) - else: - for observation in obslist: - # Calc Standard Deviation (in seconds) based on pointing error (in metres) - # and angular standard deviation (in seconds) - if observation.sd_obs == 0: - stdev_pt = str(stdev) - else: - # TODO create GUM Std Dev Model for VA - pointing_err_pt = dd2sec(degrees(atan(stdev_pointing / observation.sd_obs))) - stdev_pt = str((sqrt((pointing_err_pt ** 2) + (stdev ** 2)))/sqrt(observation.rounds)) - # Format Line - line = ('V ' - + observation.from_id.ljust(20) - + observation.to_id.ljust(20) - + ''.ljust(34) - + str(observation.va_obs.degree).rjust(3) - + ' ' - + str(observation.va_obs.minute).rjust(2, '0') - + ' ' - + str(('{:.3f}'.format(observation.va_obs.second).rjust(6, '0')).ljust(8)) - + stdev_pt[0:5].ljust(8) # add standard deviation - + ('{:.4f}'.format(observation.inst_height)).ljust(7) - + ('{:.4f}'.format(observation.target_height))) - dnaobs.append(line) - return dnaobs diff --git a/geodepy/surveyconvert/fbk.py b/geodepy/surveyconvert/fbk.py deleted file mode 100644 index 5c059ce..0000000 --- a/geodepy/surveyconvert/fbk.py +++ /dev/null @@ -1,398 +0,0 @@ -#!/usr/bin/env python3 - -""" -Geoscience Australia - Python Geodesy Package -Survey Data Converter - Geomax Zoom90 Theodelite FBK Format Import Tools -""" - -import os -import numpy as np -from geodepy.convert import DMSAngle -from geodepy.survey import first_vel_params -from geodepy.surveyconvert.config import readconfig, renameobs, removeobs, first_vel_cfg, stdev_cfg -from geodepy.surveyconvert.classtools import Coordinate, InstSetup, Observation, reducesetup, first_vel_observations -from geodepy.surveyconvert.dna import dnaout_dirset, dnaout_va, dnaout_sd - - -def fbk2msr(path, cfg_path, strict=False, zerodist=False, same_stdev=False): - """ - Converts .fbk format survey observations to DNA v3 .msr for use with DynAdjust - :param path: .fbk file path - :param cfg_path: .gpy DNA conversion config file - :param strict: If True, all single-face Obs are ignored. If False, all - single-face Obs are included and converted to Face Left - :param zerodist: If True, Obs with Slope Distance of Zero are included. - If False, these are ignored - :param same_stdev: - :return: DNA v3 .msr file (same directory as source .fbk file) - """ - fbk_project = fbk2class(readfbk(path)) - # Read config file - cfg = readconfig(cfg_path) - # Rename obs as per config file - fbk_project = renameobs(cfg, fbk_project) - # Remove obs as per config file - fbk_project = removeobs(cfg, fbk_project) - # Get First Velocity Correction Observations - first_vel_obs = first_vel_cfg(cfg) - # Get Standard Deviation Parameters - stdev_params = stdev_cfg(cfg) - # Reduce observations in setups - for setup in fbk_project: - reduced_obs = reducesetup(setup.observation, strict, zerodist) - setup.observation = reduced_obs - # Perform First Velocity Correction - if first_vel_obs is not None: - # Use wavelength and standard atmospheric parameters to get Parameters C and D - params = first_vel_params(first_vel_obs[0]) - for setup in fbk_project: - corrected_obs = first_vel_observations(setup.observation, - params, - first_vel_obs[1], # Observed Temperature - first_vel_obs[2], # Observed Pressure - first_vel_obs[3]) # Observed Relative Humidity - setup.observation = corrected_obs - # Produce Measurement format data from setups - msr_raw = [] - if stdev_params is None: - stdev_params = (1, 0.001, 0.001, 1) # Default standard deviation parameters - for setup in fbk_project: - dna_dirset = dnaout_dirset(setup.observation, same_stdev, stdev_params[0], stdev_params[1]) - dna_va = dnaout_va(setup.observation, same_stdev, stdev_params[0], stdev_params[1]) - dna_sd = dnaout_sd(setup.observation, stdev_params[2], stdev_params[3]) - msr_raw.append(dna_dirset + dna_va + dna_sd) - # Build msr header - dircount = 0 - vacount = 0 - sdcount = 0 - for group in msr_raw: - for line in group: - if line.startswith('D'): - dircount = 1 - elif line.startswith('V'): - vacount += 1 - elif line.startswith('S'): - sdcount += 1 - obscount = dircount + vacount + sdcount - day, month, year = fbkdate(path) - date = day + '.' + month + '.' + year - header = ('!#=DNA 3.01 MSR'.ljust(19) - + date.ljust(19) - + 'GDA94'.ljust(9) - + date.ljust(18) - + str(obscount)) - msr = [line for sublist in msr_raw for line in sublist] - msr = [header] + msr - # Output MSR File - fn, ext = os.path.splitext(path) - msr_fn = fn + '.msr' - with open(msr_fn, 'w+') as msr_file: - for line in msr: - msr_file.write(line + '\n') - # output will be dna msr file - return msr - - -def writestn(file, utmzone): - """ - Converts coordinate list file (.txt) associated with .fbk file into DNA v3 stn file - :param file: .txt co-ordinate list associated with .fbk file - :return: DNA v3 .stn file (same directory as source .fbk file) - """ - # Read Data from file - with open(file) as raw: - ptlist = raw.readlines() - # Split comma separated values - for num, line in enumerate(ptlist): - ptlist[num] = ptlist[num].strip() - ptlist[num] = ptlist[num].split(',') - # Get Date from last point - for i in ptlist[-1]: - if i.startswith('DATE'): - month = i[5:7] - day = i[8:10] - year = i[11:15] - - # Read Config file contents - fn, ext = os.path.splitext(file) - cfg_list = readconfig(fn + '.gpy') - constrain_list = [] - rename_list = [] - remove_list = [] - for group in cfg_list: - group_header = group[0].lower() - if group_header.startswith('constrain'): - constrain_list = group[1:] - elif group_header.startswith('rename'): - rename_list = group[1:] - elif group_header.startswith('remove'): - remove_list = group[1:] - - # Perform Block Shift of Coordinates as Specified in Config - elif group_header.startswith('blockshift'): - shift_list = group[1:] - delta_east = shift_list[0] - delta_north = shift_list[1] - delta_up = shift_list[2] - for pt in ptlist: - pt[1] = str('{:.4f}'.format(float(pt[1]) + float(delta_east))) - pt[2] = str('{:.4f}'.format(float(pt[2]) + float(delta_north))) - pt[3] = str('{:.4f}'.format(float(pt[3]) + float(delta_up))) - - # Rename Points as per Config file - for num, i in enumerate(rename_list): - rename_list[num] = i.split(',') - for pt_rename in rename_list: - for num, pt in enumerate(ptlist): - if pt[0] == pt_rename[0]: - ptlist[num][0] = pt_rename[1] - - # Remove Points as per Config file - for pt_rem in remove_list: - for num, pt in enumerate(ptlist): - if pt[0] == pt_rem: - del ptlist[num] - - # Set Points in Config Constrains list to 'CCC' - for num, pt in enumerate(ptlist): - ptlist[num] = ['FFF'] + pt - for pt_constrain in constrain_list: - for num, pt in enumerate(ptlist): - if pt[1] == pt_constrain: - ptlist[num][0] = 'CCC' - - # Remove Duplicate Station Points - cleanlist = [] - deduplist = [] - dedupnum = [] - for num, pt in enumerate(ptlist): - if pt[1] not in deduplist: - deduplist.append(pt[1]) - dedupnum.append(num) - for num in dedupnum: - cleanlist.append(ptlist[num]) - - # Write header line - stn = [] - header = ('!#=DNA 3.01 STN ' - + day + '.' - + month + '.' - + year - + 'GDA94'.rjust(14) - + (str(len(cleanlist))).rjust(25)) - stn.append(header) - - # Write line strings in stn format - for pt in cleanlist: - line = (pt[1].ljust(20) # Pt ID - + pt[0] # Constraint - + ' UTM ' # Projection - + pt[2].rjust(13) # Easting - + pt[3].rjust(18) # Northing - + pt[4].rjust(16) # Elevation - + utmzone.rjust(15) # Hemisphere/Zone input - + ' ' - + pt[5]) # Pt Description - stn.append(line) - # Write line strings to file - fn, ext = os.path.splitext(file) - stn_fn = fn + '.stn' - with open(stn_fn, 'w+') as stn_file: - for line in stn: - stn_file.write(line + '\n') - return stn - - -def stripfile(filedata, listofterms): - """ - Creates a list with lines starting with strings from a list - :param filedata: File Data in list form - :param listofterms: list of strings to use as search terms - :return: list of file lines starting with strings from list of terms - """ - datawithterms = [] - for line in filedata: - if type(line) == str: - for i in listofterms: - if line.startswith(i): - datawithterms.append(line) - elif type(line) == list: - for i in listofterms: - if line[0] == i: - datawithterms.append(line) - return datawithterms - - -def addprismht(fbklist): - prismlist = [] - rowto = [] - numlines = 0 - # Build array with prism height, startline and endline - for num, line in enumerate(fbklist, 1): - numlines += 1 - if line.startswith('PRISM'): - prismlist.append([line[6:11], num]) - prismarray = np.asarray(prismlist) - prismarrayrows = prismarray.shape[0] - for num, row in enumerate(prismarray, 1): - if num > prismarrayrows: - break - elif num == prismarrayrows: - rowto.append(numlines) - else: - rowto.append(prismarray[num, 1]) - rowtoarray = np.asarray(rowto) - prismrange = np.append(prismarray, - rowtoarray.reshape(rowtoarray.size, 1), - axis=1) - # Add Prism Heights to each observation in file - filecontents = [x.strip() for x in fbklist] - for prism in prismrange: - for i in range(int(prism[1]), int(prism[2])): - if not (not filecontents[i].startswith('F1') - and not filecontents[i].startswith('F2')): - filecontents[i] = filecontents[i] + ' ' + prism[0] - filecontents = [x + '\n' for x in filecontents] - return filecontents - - -def readfbk(filepath): - with open(filepath) as f: - # Remove non-obs data - stage1 = stripfile(f, ['PRISM', 'NEZ', 'STN', 'F1', 'F2']) - # Add prism heights to each observation - stage2 = addprismht(stage1) - # Remove Spaces from Obs Descriptions (inside "") - - def wscommstrip(string): - string_list = list(string) - commrange = [pos for pos, char in enumerate(string) if char == '\"'] - if len(commrange) != 2: - return string - else: - for char in range(commrange[0] + 1, commrange[1]): - if string_list[char] == ' ': - string_list[char] = '_' - string_us = ''.join(string_list) - return string_us - - stage3 = [] - for line in stage2: - stage3.append(wscommstrip(line)) - # Split obs - stage4 = [] - for num, i in enumerate(stage3): - stage4.append(stage3[num].split()) - # Add coordinates in file to stations - coordlist = [] - for i in stage4: - if i[0] == 'NEZ': - coordlist.append(i) - stage5 = stripfile(stage4, ['STN', 'F1', 'F2']) - # Add Coord to setup without coord info (broken) - # for coord in coordlist: - # for num, line in enumerate(stage4): - # if line[1] == coord[1]: - # stage5[num] = line + coord[2:] - # Group by Setup - stn_index = [0] - for num, i in enumerate(stage5, 1): - # Create list of line numbers of station records - # (Only stations have 'STN' string) - if 'STN' in i: - lnid = num - stn_index.append(lnid) - stn_index.append(len(stage5)) - fbk_listbystation = [] - # Create lists of fbk data with station records as first element - for i in range(0, len(stn_index) - 1): - fbk_listbystation.append(stage5[stn_index[i] - 1:stn_index[i + 1] - 1]) - del fbk_listbystation[0] - # for i in range(0, (len(stn_index) - 1)): - # fbk_listbystation.append(stage5[(stn_index[i]) - 1:(stn_index[i + 1])]) - # del fbk_listbystation[0] - return fbk_listbystation - - -def fbkdate(filepath): - with open(filepath) as f: - day = None - month = None - year = None - for line in f: - if line.startswith('! DT'): - month = line[4:6] - day = line[7:9] - year = line[10:14] - break - return day, month, year - - -def fbk2class(fbk_list): - - def parse_angle(obs_string): - dms = float(obs_string) - degmin, second = divmod(abs(dms) * 1000, 10) - degree, minute = divmod(degmin, 100) - return DMSAngle(degree, minute, second * 10) - - fbk_project = [] - for setup_list in fbk_list: - obs_list = [] - if setup_list[0][0] == 'STN' and len(setup_list[0]) <= 3: - # This is the station information part - from_id = setup_list[0][1] - inst_height = float(setup_list[0][2]) - coord = Coordinate(from_id, 'utm', 'gda94', 'gda94', - '2018.1', 0, 0, 0) - setup = InstSetup(from_id, coord) - elif setup_list[0][0] == 'STN' and len(setup_list[0]) > 3: - from_id = setup_list[0][1] - inst_height = float(setup_list[0][2]) - east = float(setup_list[0][3]) - north = float(setup_list[0][4]) - elev = float(setup_list[0][5]) - coord = Coordinate(from_id, 'utm', 'gda94', 'gda94', - '2018.1', east, north, elev) - setup = InstSetup(from_id, coord) - for record in setup_list: - if record[0] == 'F1' or record[0] == 'F2': - """ - This is the obs information part - from_id, to_id, inst_height, target_height - face - hz_obs - va_obs - sd_obs - hz_dist - vert_dist - """ - # Read Face - if int(float(record[5])) in range(0, 180): - face = 'FL' - elif int(float(record[5])) in range(180, 360): - face = 'FR' - else: - ValueError('Invalid Vertical Angle in ' + record) - to_id = record[2] # Read To ID - rounds = 0.5 - hz_obs = parse_angle(record[3]) # 3 is Hz Ob (HP) - hz_stdev = DMSAngle(0) - sd_obs = float(record[4]) - sd_stdev = 0.0 - va_obs = parse_angle(record[5]) # 5 is Vert Ob (HP) - va_stdev = DMSAngle(0) - target_height = float(record[7]) - obs = Observation(from_id, to_id, - inst_height, target_height, - face, rounds, - hz_obs, hz_stdev, - va_obs, va_stdev, - sd_obs, sd_stdev) - obs_list.append(obs) - # else: - # raise ValueError('Unexpected format found') - for i in obs_list: - setup.addobs(i) - fbk_project.append(setup) - return fbk_project diff --git a/geodepy/surveyconvert/gsi.py b/geodepy/surveyconvert/gsi.py deleted file mode 100644 index 206ac9b..0000000 --- a/geodepy/surveyconvert/gsi.py +++ /dev/null @@ -1,358 +0,0 @@ -#!/usr/bin/env python3 - -""" -Geoscience Australia - Python Geodesy Package -Survey Data Converter - Leica GSI Format Import Tools -Note: These tools are designed to work with the Leica GSI Format File xxxxxxxxxxxx.frt -""" - -import os -from datetime import datetime -from geodepy.convert import DMSAngle -from geodepy.survey import first_vel_params -from geodepy.surveyconvert.config import readconfig, renameobs, removeobs, first_vel_cfg, stdev_cfg -from geodepy.surveyconvert.classtools import Coordinate, InstSetup, Observation, reducesetup, first_vel_observations -from geodepy.surveyconvert.dna import dnaout_dirset, dnaout_va, dnaout_sd - - -def gsi2msr(path, cfg_path=None): - """ - Converts .gsi format survey observations to DNA v3 .msr for use with DynAdjust - :param path: .gsi file path - :param cfg_path: .gpy conversion configuration file - :return: DNA v3 .msr file (same directory as source .fbk file) - """ - gsi_project = gsi2class(readgsi(path)) - # Read config file - if cfg_path is not None: - cfg = readconfig(cfg_path) - # Rename obs as per config file - gsi_project = renameobs(cfg, gsi_project) - # Remove obs as per config file - gsi_project = removeobs(cfg, gsi_project) - # Get First Velocity Correction Observations - first_vel_obs = first_vel_cfg(cfg) - # Get Standard Deviation Parameters - stdev_params = stdev_cfg(cfg) - else: - first_vel_obs = None - stdev_params = None - # Reduce observations in setups - for setup in gsi_project: - reduced_obs = reducesetup(setup.observation, strict=False, zerodist=True, meanmulti=True) - setup.observation = reduced_obs - # Perform First Velocity Correction - if first_vel_obs is not None: - # Use wavelength and standard atmospheric parameters to get Parameters C and D - params = first_vel_params(first_vel_obs[0]) - for setup in gsi_project: - corrected_obs = first_vel_observations(setup.observation, - params, - first_vel_obs[1], # Observed Temperature - first_vel_obs[2], # Observed Pressure - first_vel_obs[3]) # Observed Relative Humidity - setup.observation = corrected_obs - # Produce Measurement format data from setups - msr_raw = [] - if stdev_params is None: - stdev_params = (1, 0.001, 0.001, 1) # Default standard deviation parameters - for setup in gsi_project: - dna_dirset = dnaout_dirset(setup.observation, False, stdev_params[0], stdev_params[1]) - dna_va = dnaout_va(setup.observation, False, stdev_params[0], stdev_params[1]) - dna_sd = dnaout_sd(setup.observation, stdev_params[2], stdev_params[3]) - msr_raw.append(dna_dirset + dna_va + dna_sd) - # Build msr header - dircount = 0 - vacount = 0 - sdcount = 0 - for group in msr_raw: - for line in group: - if line.startswith('D'): - dircount = 1 - elif line.startswith('V'): - vacount += 1 - elif line.startswith('S'): - sdcount += 1 - obscount = dircount + vacount + sdcount - now = datetime(2020, 1, 1) - date = (str(now.day).rjust(2, '0') + '.' - + str(now.month).rjust(2, '0') + '.' - + str(now.year)) - header = ('!#=DNA 3.01 MSR'.ljust(19) - + date.ljust(19) - + 'GDA94'.ljust(9) - + date.ljust(18) - + str(obscount)) - msr = [line for sublist in msr_raw for line in sublist] - msr = [header] + msr - # Output MSR File - if cfg_path is not None: - fn, ext = os.path.splitext(path) - msr_fn = fn + '.msr' - else: - fn, ext = os.path.splitext(path) - msr_fn = fn + '.msr' - with open(msr_fn, 'w+') as msr_file: - for line in msr: - msr_file.write(line + '\n') - # output will be dna msr file - return msr - - -def gsi2stn(path, utmzone, cfg_path=None): - """ - Converts coordinate list file (.txt) associated with .fbk file into DNA v3 stn file - :param path: .txt co-ordinate list associated with .fbk file - :param utmzone: UTM Coordinate Zone as string i.e. 'S56' for Southern Hemisphere Zone 56 - :param cfg_path: .gpy DNA conversion config file - :return: DNA v3 .stn file (same directory as source .fbk file) - """ - # Read Data from file - with open(path) as raw: - ptlist = raw.readlines() - # Split comma separated values, replace blanks with zeroes - for num, line in enumerate(ptlist): - ptlist[num] = ptlist[num].strip() - ptlist[num] = ptlist[num].split(',') - for place, item in enumerate(ptlist[num]): - if item == '': - ptlist[num][place] = '0' - # Read Config file contents - if cfg_path is not None: - cfg_list = readconfig(cfg_path) - constrain_list = [] - rename_list = [] - remove_list = [] - for group in cfg_list: - group_header = group[0].lower() - if group_header.startswith('constrain'): - constrain_list = group[1:] - elif group_header.startswith('rename'): - rename_list = group[1:] - elif group_header.startswith('remove'): - remove_list = group[1:] - - # Perform Block Shift of Coordinates as Specified in Config - elif group_header.startswith('blockshift'): - shift_list = group[1:] - delta_east = shift_list[0] - delta_north = shift_list[1] - delta_up = shift_list[2] - for pt in ptlist: - pt[1] = str('{:.4f}'.format(float(pt[1]) + float(delta_east))) - pt[2] = str('{:.4f}'.format(float(pt[2]) + float(delta_north))) - pt[3] = str('{:.4f}'.format(float(pt[3]) + float(delta_up))) - - # Rename Points as per Config file - for num, i in enumerate(rename_list): - rename_list[num] = i.split(',') - for pt_rename in rename_list: - for num, pt in enumerate(ptlist): - if pt[0] == pt_rename[0]: - ptlist[num][0] = pt_rename[1] - - # Remove Points as per Config file - for pt_rem in remove_list: - for num, pt in enumerate(ptlist): - if pt[0] == pt_rem: - del ptlist[num] - - # Set Points in Config Constrains list to 'CCC' - for num, pt in enumerate(ptlist): - ptlist[num] = ['FFF'] + pt - for pt_constrain in constrain_list: - for num, pt in enumerate(ptlist): - if pt[1] == pt_constrain: - ptlist[num][0] = 'CCC' - - #Set all stations to FFF if no config file - else: - pass - - # Remove Duplicate Station Points - cleanlist = [] - deduplist = [] - dedupnum = [] - for num, pt in enumerate(ptlist): - if pt[1] not in deduplist: - deduplist.append(pt[1]) - dedupnum.append(num) - for num in dedupnum: - cleanlist.append(ptlist[num]) - - # Write header line - stn = [] - now = datetime(2020, 1, 1) - header = ('!#=DNA 3.01 STN ' - + str(now.day).rjust(2, '0') + '.' - + str(now.month).rjust(2, '0') + '.' - + str(now.year) - + 'GDA94'.rjust(14) - + (str(len(cleanlist))).rjust(25)) - stn.append(header) - - # Write line strings in stn format - for pt in cleanlist: - line = (pt[1].ljust(20) # Pt ID - + pt[0] # Constraint - + ' UTM ' # Projection - + pt[2].rjust(13) # Easting - + pt[3].rjust(18) # Northing - + pt[4].rjust(16) # Elevation - + utmzone.rjust(15)) # Hemisphere/Zone input - stn.append(line) - # Write line strings to file - if cfg_path is not None: - fn, ext = os.path.splitext(cfg_path) - stn_fn = fn + '.stn' - else: - fn, ext = os.path.splitext(path) - stn_fn = fn + '.stn' - with open(stn_fn, 'w+') as stn_file: - for line in stn: - stn_file.write(line + '\n') - return stn - - -def readgsi(filepath): - """ - Takes in a gsi file (GA_Survey2.frt) and returns a list - of stations with their associated observations. - :param filepath: full directory of .gsi file - :return: gsi data in list form - """ - # Check file extension, throw except if not .gsi - ext = os.path.splitext(filepath)[-1].lower() - try: - if ext != '.gsi': - raise ValueError - except ValueError: - print('ValueError: file must have .gsi extension') - return - # Read data from gsi file - with open(filepath, 'r') as file: - gsidata = file.readlines() - stn_index = [] - for num, line in enumerate(gsidata): - # Create list of line numbers of station records - # (Only stations have '84..' string) - if '84..' in line: - stn_index.append(num + 1) - stn_index.append(len(gsidata)) - gsi_listbystation = [] - # Create lists of gsi data with station records as first element - for j in range(0, len(stn_index)): - gsi_listbystation.append(gsidata[(stn_index[j - 1] - 1):(stn_index[j])]) - del gsi_listbystation[0] - return gsi_listbystation - - -def gsi2class(gsi_list): - """ - Takes a list where first entry is station record and - all remaining records are observations and creates - a InstSetup Object with Observation Objects included. - :param gsi_list: - :return: - """ - def readgsiword16(linestring, word_id): - try: - wordstart = str.find(linestring, word_id) - if wordstart == -1: - raise ValueError - except ValueError: - print('ValueError: GSI record type ' + word_id + ' not found\n' - 'Line Data: ' + linestring) - return None - word_val = linestring[(wordstart + 7):(wordstart + 23)] - word_val = word_val.lstrip('0') - if word_val == '': - return 0 - else: - return int(word_val) - - def parse_ptid(gsi_line): - ptid = gsi_line[8:24] - ptid = ptid.lstrip('0') - return ptid - - def parse_easting(gsi_line): - return (readgsiword16(gsi_line, '84..')) / 10000 - - def parse_northing(gsi_line): - return (readgsiword16(gsi_line, '85..')) / 10000 - - def parse_elev(gsi_line): - return (readgsiword16(gsi_line, '86..')) / 10000 - - def parse_hz(gsi_line): - dms = readgsiword16(gsi_line, '21.324') / 100000 - degmin, second = divmod(abs(dms) * 1000, 10) - degree, minute = divmod(degmin, 100) - return DMSAngle(degree, minute, second * 10) - - def parse_slope(gsi_line): - return (readgsiword16(gsi_line, '31..')) / 10000 - - def parse_dist(gsi_line): - return (readgsiword16(gsi_line, '32..')) / 10000 - - def parse_tgtht(gsi_line): - return (readgsiword16(gsi_line, '87..')) / 10000 - - def parse_instht(gsi_line): - return (readgsiword16(gsi_line, '88..')) / 10000 - - def parse_vert(gsi_line): - dms = readgsiword16(gsi_line, '22.324') / 100000 - degmin, seconds = divmod(abs(dms) * 1000, 10) - degrees, minutes = divmod(degmin, 100) - if 0 < degrees <= 180: - face = 'FL' - elif 180 < degrees <= 360: - face = 'FR' - else: - face = 'FL' - return face, DMSAngle(degrees, minutes, seconds * 10) - - gsi_project = [] - for record in gsi_list: - from_stn = parse_ptid(record[0]) - obs_list = [] - for line in record: - if '31..' in line: - to_stn = parse_ptid(line) - hz = parse_hz(line) - hz_stdev = DMSAngle(0) - face, vert = parse_vert(line) - va_stdev = DMSAngle(0) - rounds = 0.5 - slope = parse_slope(line) - sd_stdev = 0.0 - tgtht = parse_tgtht(line) - instht = parse_instht(line) - obs = Observation(from_stn, to_stn, instht, tgtht, - face, rounds, - hz, hz_stdev, - vert, va_stdev, - slope, sd_stdev) - obs_list.append(obs) - if '84..' in record[0]: - pt_id = parse_ptid(record[0]) - easting = parse_easting(record[0]) - northing = parse_northing(record[0]) - elev = parse_elev(record[0]) - coord = Coordinate(pt_id, 'utm', 'gda94', 'gda94', - '2018.1', easting, northing, elev) - setup = InstSetup(pt_id, coord) - for i in range(0, len(obs_list)): - setup.addobs(obs_list[i]) - gsi_project.append(setup) - return gsi_project - - -def readgsiword16(linestring, word_id): - wordstart = str.find(linestring, word_id) - word_val = linestring[(wordstart + 7):(wordstart + 23)] - word_val = 0.0 if word_val.lstrip('0') == '' else int(word_val.lstrip('0')) - return word_val diff --git a/geodepy/tests/resources/fbksample.fbk b/geodepy/tests/resources/fbksample.fbk deleted file mode 100644 index f353a8c..0000000 --- a/geodepy/tests/resources/fbksample.fbk +++ /dev/null @@ -1,147 +0,0 @@ -HORIZ ANGLE RIGHT -VERT ANGLE ZENITH -UNITS FOOT DMS -JOB Site13-134 -UNITS METER DMS -! SurvPC Version 5.08.1 -! CRD: Alphanumeric -! User Defined: AUSTRALIA/GDA94/MGA zone 56 E150-156 -! Equipment: Geomax Robotic, Zoom 90 -! TS Scale: 1.00000000 -! Scale Point not used -! EDM Mode: Standard -NEZ 1302 7001228.5600 293989.1880 397.5280 "Bs" -! P.C. mm Applied: -30.0000 (-30mm:foresight) -NEZ 13 7001264.0430 294137.7230 394.0080 -! P.C. mm Applied: -11.3000 (Leica 360:backsight) -PRISM 2.108 -STN 13 1.652 -BS 1302 256.3353 -F1 VA 1302 256.3353 152.758 88.3029 "Bs" -! Calculated: AR256°33'53", HD152.714, Z397.528 -! Measured: AR256°33'53", HD152.706, Z397.529 -! Delta: AR0°00'00", HD-0.008, Z0.001 -! P.C. mm Applied: -30.0000 (-30mm:foresight) -! P.C. mm Applied: -11.3000 (Leica 360:backsight) -! P.C. mm Applied: -30.0000 (-30mm:foresight) -! P.C. mm Applied: -11.3000 (Leica 360:backsight) -! P.C. mm Applied: -30.0000 (-30mm:foresight) -! P.C. mm Applied: -11.3000 (Leica 360:backsight) -! P.C. mm Applied: -30.0000 (-30mm:foresight) -! P.C. mm Applied: -11.3000 (Leica 360:backsight) -! P.C. mm Applied: -30.0000 (-30mm:foresight) -! P.C. mm Applied: -11.3000 (Leica 360:backsight) -! P.C. mm Applied: -30.0000 (-30mm:foresight) -! P.C. mm Applied: -11.3000 (Leica 360:backsight) -! P.C. mm Applied: -30.0000 (-30mm:foresight) -! P.C. mm Applied: -11.3000 (Leica 360:backsight) -! P.C. mm Applied: -30.0000 (-30mm:foresight) -! P.C. mm Applied: -11.3000 (Leica 360:backsight) -! Set Collection with Obs Order 123...321... -STN 13 1.652 -BS 1302 256.3353 -! DT05-14-2018 -! TM15:37:39 -! DT05-14-2018 -! TM15:37:41 -F1 VA 1302 256.3353 152.758 88.3030 "Bs" -PRISM 1.827 -F1 VA 1304 358.3406 40.973 88.4301 "Fs" -F2 VA 1304 178.3401 40.973 271.1651 "Fs" -PRISM 2.108 -F2 VA 1302 76.3353 152.758 271.2929 "Bs" -F1 VA 1302 256.3353 152.758 88.3030 "Bs" -PRISM 1.767 -F1 VA 1305 357.1807 45.316 88.5033 "Fs" -F2 VA 1305 177.1804 45.317 271.0921 "Fs" -PRISM 2.108 -F2 VA 1302 76.3353 152.758 271.2929 "Bs" -F1 VA 1302 256.3352 152.758 88.3028 "Bs" -PRISM 1.827 -F1 VA 1304 358.3403 40.973 88.4300 "Fs" -F2 VA 1304 178.3405 40.973 271.1651 "Fs" -PRISM 2.108 -F2 VA 1302 76.3351 152.757 271.2929 "Bs" -F1 VA 1302 256.3352 152.758 88.3028 "Bs" -PRISM 1.767 -F1 VA 1305 357.1803 45.317 88.5033 "Fs" -F2 VA 1305 177.1800 45.316 271.0920 "Fs" -PRISM 2.108 -F2 VA 1302 76.3351 152.757 271.2929 "Bs" -F1 VA 1302 256.3352 152.739 88.3027 "Bs" -PRISM 1.827 -F1 VA 1304 358.3407 40.973 88.4300 "Fs" -F2 VA 1304 178.3402 40.973 271.1651 "Fs" -PRISM 2.108 -F2 VA 1302 76.3352 152.758 271.2930 "Bs" -! SS,OP13,FP1302,AR256.3353,ZE88.3029,SD152.754774,--Bs -! LS,HI1.652000,HR1.827000 -! SS,OP13,FP1304,AR358.3404,ZE88.4305,SD40.973038,--Fs -! LS,HI1.652000,HR2.108000 -F1 VA 1302 256.3352 152.739 88.3027 "Bs" -PRISM 1.767 -F1 VA 1305 357.1801 45.316 88.5033 "Fs" -F2 VA 1305 177.1759 45.316 271.0921 "Fs" -PRISM 2.108 -F2 VA 1302 76.3352 152.758 271.2930 "Bs" -! SS,OP13,FP1302,AR256.3353,ZE88.3029,SD152.754774,--Bs -! LS,HI1.652000,HR1.767000 -! SS,OP13,FP1305,AR357.1803,ZE88.5036,SD45.316350,--Fs -! LS,HI1.652000,HR2.108000 -! P.C. mm Applied: -30.0000 (-30mm:foresight) -STN 13 1.652 -BS 1302 256.3352 -F1 VA 1306 256.3353 152.760 88.3019 "chk1302 from 13" -! DT05-14-2018 -! TM15:45:49 -! P.C. mm Applied: -11.3000 (Leica 360:backsight) -PRISM 1.599 -STN 1304 1.827 -BS 13 178.3404 -F1 VA 13 178.3404 40.975 91.2107 "" -! Calculated: AR178°34'04", HD40.963, Z394.008 -! Measured: AR178°34'04", HD40.963, Z394.011 -! Delta: AR0°00'00", HD0.000, Z0.003 -! P.C. mm Applied: -30.0000 (-30mm:foresight) -! P.C. mm Applied: 0.0000 (Reflectorless:foresight) -! P.C. mm Applied: -30.0000 (-30mm:foresight) -PRISM 1.767 -F1 VA 1307 345.3311 4.446 90.0141 "Chk1305" -! DT05-14-2018 -! TM15:57:54 -! P.C. mm Applied: 0.0000 (Reflectorless:foresight) -PRISM 0.000 -F1 VA 1308 7.2824 3.557 99.3411 "Cra" -! DT05-14-2018 -! TM16:00:55 -F1 VA 1309 37.3842 3.598 82.4158 "Crb" -! DT05-14-2018 -! TM16:02:33 -F1 VA 1310 34.4111 1.833 108.5758 "crc" -! DT05-14-2018 -! TM16:04:23 -F1 VA 1311 31.5612 3.320 106.3933 "Crd" -! DT05-14-2018 -! TM16:06:26 -F1 VA 1312 32.2323 3.321 105.0110 "Cre-100 above crd" -! DT05-14-2018 -! TM16:07:37 -F1 VA 1313 8.2821 3.995 110.5909 "Sla" -! DT05-14-2018 -! TM16:08:26 -F1 VA 1314 57.0101 3.337 115.3615 "Slc" -! DT05-14-2018 -! TM16:10:34 -F1 VA 1315 17.1005 2.290 128.5220 "Sld" -! DT05-14-2018 -! TM16:11:25 -F1 VA 1316 30.0228 3.305 111.2112 "Bolt" -! DT05-14-2018 -! TM16:13:01 -! P.C. mm Applied: -11.3000 (Leica 360:backsight) -! Backsight Check: PT 13 -! Calculated: AR178°34'04", HD40.963, Z394.008 -! Measured: AR178°34'04", HD40.963, Z394.010 -! Delta: AR0°00'01", HD0.000, Z0.002 -! P.C. mm Applied: 0.0000 (Reflectorless:foresight) -! P.C. mm Applied: -11.3000 (Leica 360:backsight) diff --git a/geodepy/tests/resources/fbksample.gpy b/geodepy/tests/resources/fbksample.gpy deleted file mode 100644 index 418fd33..0000000 --- a/geodepy/tests/resources/fbksample.gpy +++ /dev/null @@ -1,37 +0,0 @@ -DNA Converter Config File - -Constrain Points -SB13 - -Rename Observations (old id, new id) -13,SB13 -1306,1302 -1307,1305 -1317,1308 -1318,1309 -1319,1310 -1320,1311 -1321,1312 -1326,1316 -1327,1302 -1328,1302 - -Remove Observations (id) -1313 -1314 -1315 -1322 -1323 -1324 -1325 - -Blockshift (east, north, up) -0.6019 -1.4193 --0.1436 - -Standard Deviation Parameters -2 -0.001 -0.005 -5 \ No newline at end of file diff --git a/geodepy/tests/resources/fbksample.msr b/geodepy/tests/resources/fbksample.msr deleted file mode 100644 index 2a27042..0000000 --- a/geodepy/tests/resources/fbksample.msr +++ /dev/null @@ -1,62 +0,0 @@ -!#=DNA 3.01 MSR 14.05.2018 GDA94 14.05.2018 43 -V SB13 1302 88 30 29.000 3.412 1.6520 2.1080 -S SB13 1302 152.7580 0.0052 1.6520 2.1080 -D SB13 1302 11 256 33 51.500 2.413 -D 1302 256 33 51.500 2.413 -D 1302 256 33 52.000 2.413 -D 1302 256 33 52.000 2.413 -D 1302 256 33 53.000 2.413 -D 1302 256 33 53.000 2.413 -D 1305 357 18 00.000 4.971 -D 1305 357 18 01.500 4.971 -D 1305 357 18 05.500 4.971 -D 1304 358 34 03.500 5.416 -D 1304 358 34 04.000 5.416 -D 1304 358 34 04.500 5.416 -V SB13 1302 88 30 29.500 2.413 1.6520 2.1080 -V SB13 1302 88 30 29.500 2.413 1.6520 2.1080 -V SB13 1302 88 30 28.500 2.413 1.6520 2.1080 -V SB13 1302 88 30 28.500 2.413 1.6520 2.1080 -V SB13 1302 88 30 30.500 2.413 1.6520 2.1080 -V SB13 1302 88 30 30.500 2.413 1.6520 2.1080 -V SB13 1305 88 50 36.000 4.971 1.6520 1.7670 -V SB13 1305 88 50 36.500 4.971 1.6520 1.7670 -V SB13 1305 88 50 36.000 4.971 1.6520 1.7670 -V SB13 1304 88 43 05.000 5.416 1.6520 1.8270 -V SB13 1304 88 43 04.500 5.416 1.6520 1.8270 -V SB13 1304 88 43 04.500 5.416 1.6520 1.8270 -S SB13 1302 152.7575 0.0052 1.6520 2.1080 -S SB13 1302 152.7575 0.0052 1.6520 2.1080 -S SB13 1302 152.7485 0.0052 1.6520 2.1080 -S SB13 1302 152.7485 0.0052 1.6520 2.1080 -S SB13 1302 152.7580 0.0052 1.6520 2.1080 -S SB13 1302 152.7580 0.0052 1.6520 2.1080 -S SB13 1305 45.3160 0.0052 1.6520 1.7670 -S SB13 1305 45.3165 0.0052 1.6520 1.7670 -S SB13 1305 45.3165 0.0052 1.6520 1.7670 -S SB13 1304 40.9730 0.0052 1.6520 1.8270 -S SB13 1304 40.9730 0.0052 1.6520 1.8270 -S SB13 1304 40.9730 0.0052 1.6520 1.8270 -V SB13 1302 88 30 19.000 3.412 1.6520 2.1080 -S SB13 1302 152.7600 0.0052 1.6520 2.1080 -D 1304 1308 6 7 28 24.000 82.05 -D 1311 31 56 12.000 87.90 -D 1312 32 23 23.000 87.88 -D 1310 34 41 11.000 159.1 -D 1309 37 38 42.000 81.12 -D SB13 178 34 04.000 7.660 -D 1305 345 33 11.000 65.67 -V 1304 1308 99 34 11.000 82.05 1.8270 0.0000 -V 1304 1311 106 39 33.000 87.90 1.8270 0.0000 -V 1304 1312 105 01 10.000 87.88 1.8270 0.0000 -V 1304 1310 108 57 58.000 159.1 1.8270 0.0000 -V 1304 1309 82 41 58.000 81.12 1.8270 0.0000 -V 1304 SB13 91 21 07.000 7.660 1.8270 1.5990 -V 1304 1305 90 01 41.000 65.67 1.8270 1.7670 -S 1304 1308 3.5570 0.0051 1.8270 0.0000 -S 1304 1311 3.3200 0.0051 1.8270 0.0000 -S 1304 1312 3.3210 0.0051 1.8270 0.0000 -S 1304 1310 1.8330 0.0051 1.8270 0.0000 -S 1304 1309 3.5980 0.0051 1.8270 0.0000 -S 1304 SB13 40.9750 0.0052 1.8270 1.5990 -S 1304 1305 4.4460 0.0051 1.8270 1.7670 diff --git a/geodepy/tests/resources/fbksample.stn b/geodepy/tests/resources/fbksample.stn deleted file mode 100644 index df88e81..0000000 --- a/geodepy/tests/resources/fbksample.stn +++ /dev/null @@ -1,10 +0,0 @@ -!#=DNA 3.01 STN 14.05.2018 GDA94 9 -SB13 CCC UTM 294138.3249 7001265.4623 393.8644 S56 -1302 FFF UTM 293989.7899 7001229.9793 397.3844 S56 Bs -1304 FFF UTM 294137.3009 7001306.4123 394.6064 S56 Fs -1305 FFF UTM 294136.1909 7001310.7193 394.6644 S56 Fs -1308 FFF UTM 294137.7569 7001309.8903 395.8414 S56 Cra -1309 FFF UTM 294139.4809 7001309.2383 396.8904 S56 Crb -1310 FFF UTM 294138.2879 7001307.8383 395.8374 S56 crc -1311 FFF UTM 294138.9839 7001309.1123 395.4814 S56 Crd -1312 FFF UTM 294139.0199 7001309.1213 395.5724 S56 Cre-100 above crd diff --git a/geodepy/tests/resources/fbksample.txt b/geodepy/tests/resources/fbksample.txt deleted file mode 100644 index a73fb1c..0000000 --- a/geodepy/tests/resources/fbksample.txt +++ /dev/null @@ -1,14 +0,0 @@ -13,294137.723,7001264.043,394.008, -1302,293989.188,7001228.560,397.528,Bs -1304,294136.699,7001304.993,394.750,Fs,DATE:05-14-2018,TIME:15:37:39 -1305,294135.589,7001309.300,394.808,Fs,DATE:05-14-2018,TIME:15:37:41 -1306,293989.194,7001228.563,397.534,chk1302 from 13,DATE:05-14-2018,TIME:15:45:49 -1307,294135.590,7001309.299,394.808,Chk1305,DATE:05-14-2018,TIME:15:57:54 -1308,294137.155,7001308.471,395.985,Cra,DATE:05-14-2018,TIME:16:00:55 -1309,294138.879,7001307.819,397.034,Crb,DATE:05-14-2018,TIME:16:02:33 -1310,294137.686,7001306.419,395.981,crc,DATE:05-14-2018,TIME:16:04:23 -1311,294138.382,7001307.693,395.625,Crd,DATE:05-14-2018,TIME:16:06:26 -1312,294138.418,7001307.702,395.716,Cre-100 above crd,DATE:05-14-2018,TIME:16:07:37 -1313,294137.249,7001308.683,395.146,Sla,DATE:05-14-2018,TIME:16:08:26 -1314,294139.224,7001306.631,395.135,Slc,DATE:05-14-2018,TIME:16:10:34 -1315,294137.225,7001306.696,395.140,Sld,DATE:05-14-2018,TIME:16:11:25 diff --git a/geodepy/tests/resources/gsisample.gpy b/geodepy/tests/resources/gsisample.gpy deleted file mode 100644 index 84b9aae..0000000 --- a/geodepy/tests/resources/gsisample.gpy +++ /dev/null @@ -1,21 +0,0 @@ -DNA Converter Config File - -Rename Observations (old id, new id) -6,AU49 -7,AU48 -8,AU45 -9,STR3 -10,AU52 -11,AU54 - -First Velocity Parameters -0.658 -14 -922.8 -49.5 - -Standard Deviation Parameters -3 -0.003 -0.005 -10 diff --git a/geodepy/tests/resources/gsisample.gsi b/geodepy/tests/resources/gsisample.gsi deleted file mode 100644 index 2616a7f..0000000 --- a/geodepy/tests/resources/gsisample.gsi +++ /dev/null @@ -1,147 +0,0 @@ -*110001+0000000000000008 84..16+0000000009999994 85..16+0000000010494655 86..16+0000000001006701 87..16+0000000000000000 88..16+0000000000016450 -*110002+0000000000000009 21.324+0000000035959561 22.324+0000000009325006 31..06+0000000000578473 32..16+0000000000577445 87..16+0000000000014210 88..16+0000000000016450 -*110003+0000000000000010 21.324+0000000001842391 22.324+0000000009213389 31..06+0000000000703127 32..16+0000000000702596 87..16+0000000000000000 88..16+0000000000016450 -*110004+0000000000000007 21.324+0000000017711554 22.324+0000000009031496 31..06+0000000001014434 32..16+0000000001014391 87..16+0000000000000000 88..16+0000000000016450 -*110005+0000000000000007 21.324+0000000035711525 22.324+0000000026928129 31..06+0000000001014434 32..16+0000000001014391 87..16+0000000000000000 88..16+0000000000016450 -*110006+0000000000000010 21.324+0000000019842389 22.324+0000000026746234 31..06+0000000000703128 32..16+0000000000702597 87..16+0000000000000000 88..16+0000000000016450 -*110007+0000000000000009 21.324+0000000017959534 22.324+0000000026635040 31..06+0000000000578472 32..16+0000000000577445 87..16+0000000000014210 88..16+0000000000016450 -*110008+0000000000000009 21.324+0000000035959552 22.324+0000000009324585 31..06+0000000000578474 32..16+0000000000577446 87..16+0000000000014210 88..16+0000000000016450 -*110009+0000000000000010 21.324+0000000001842390 22.324+0000000009213363 31..06+0000000000703129 32..16+0000000000702598 87..16+0000000000000000 88..16+0000000000016450 -*110010+0000000000000007 21.324+0000000017711556 22.324+0000000009031483 31..06+0000000001014433 32..16+0000000001014390 87..16+0000000000000000 88..16+0000000000016450 -*110011+0000000000000007 21.324+0000000035711516 22.324+0000000026928114 31..06+0000000001014434 32..16+0000000001014391 87..16+0000000000000000 88..16+0000000000016450 -*110012+0000000000000010 21.324+0000000019842370 22.324+0000000026746240 31..06+0000000000703126 32..16+0000000000702595 87..16+0000000000000000 88..16+0000000000016450 -*110013+0000000000000009 21.324+0000000017959537 22.324+0000000026635029 31..06+0000000000578474 32..16+0000000000577447 87..16+0000000000014210 88..16+0000000000016450 -*110014+0000000000000009 21.324+0000000035959560 22.324+0000000009324588 31..06+0000000000578474 32..16+0000000000577446 87..16+0000000000014210 88..16+0000000000016450 -*110015+0000000000000010 21.324+0000000001842383 22.324+0000000009213371 31..06+0000000000703129 32..16+0000000000702598 87..16+0000000000000000 88..16+0000000000016450 -*110016+0000000000000007 21.324+0000000017711549 22.324+0000000009031493 31..06+0000000001014434 32..16+0000000001014391 87..16+0000000000000000 88..16+0000000000016450 -*110017+0000000000000007 21.324+0000000035711534 22.324+0000000026928130 31..06+0000000001014433 32..16+0000000001014390 87..16+0000000000000000 88..16+0000000000016450 -*110018+0000000000000010 21.324+0000000019842373 22.324+0000000026746245 31..06+0000000000703126 32..16+0000000000702595 87..16+0000000000000000 88..16+0000000000016450 -*110019+0000000000000009 21.324+0000000017959541 22.324+0000000026635034 31..06+0000000000578471 32..16+0000000000577444 87..16+0000000000014210 88..16+0000000000016450 -*110020+0000000000000009 21.324+0000000035959548 22.324+0000000009324577 31..06+0000000000578471 32..16+0000000000577443 87..16+0000000000014210 88..16+0000000000016450 -*110021+0000000000000010 21.324+0000000001842389 22.324+0000000009213371 31..06+0000000000703127 32..16+0000000000702596 87..16+0000000000000000 88..16+0000000000016450 -*110022+0000000000000007 21.324+0000000017711542 22.324+0000000009031494 31..06+0000000001014431 32..16+0000000001014388 87..16+0000000000000000 88..16+0000000000016450 -*110023+0000000000000007 21.324+0000000035711528 22.324+0000000026928128 31..06+0000000001014430 32..16+0000000001014387 87..16+0000000000000000 88..16+0000000000016450 -*110024+0000000000000010 21.324+0000000019842376 22.324+0000000026746244 31..06+0000000000703128 32..16+0000000000702597 87..16+0000000000000000 88..16+0000000000016450 -*110025+0000000000000009 21.324+0000000017959552 22.324+0000000026635029 31..06+0000000000578472 32..16+0000000000577445 87..16+0000000000014210 88..16+0000000000016450 -*110026+0000000000000009 21.324+0000000035959544 22.324+0000000009324574 31..06+0000000000578471 32..16+0000000000577444 87..16+0000000000014210 88..16+0000000000016450 -*110027+0000000000000010 21.324+0000000001842385 22.324+0000000009213367 31..06+0000000000703128 32..16+0000000000702597 87..16+0000000000000000 88..16+0000000000016450 -*110028+0000000000000007 21.324+0000000017711544 22.324+0000000009031487 31..06+0000000001014431 32..16+0000000001014388 87..16+0000000000000000 88..16+0000000000016450 -*110029+0000000000000007 21.324+0000000035711533 22.324+0000000026928132 31..06+0000000001014433 32..16+0000000001014390 87..16+0000000000000000 88..16+0000000000016450 -*110030+0000000000000010 21.324+0000000019842377 22.324+0000000026746248 31..06+0000000000703128 32..16+0000000000702597 87..16+0000000000000000 88..16+0000000000016450 -*110031+0000000000000009 21.324+0000000017959545 22.324+0000000026635037 31..06+0000000000578473 32..16+0000000000577446 87..16+0000000000014210 88..16+0000000000016450 -*110063+0000000000000010 84..16+0000000009999994 85..16+0000000010494655 86..16+0000000001006701 87..16+0000000000000000 88..16+0000000000000000 -*110064+0000000000000008 21.324+0000000035959550 22.324+0000000008746241 31..06+0000000000703128 32..16+0000000000702597 87..16+0000000000000000 88..16+0000000000000000 -*110065+0000000000000011 21.324+0000000003652082 22.324+0000000009050480 31..06+0000000000699235 32..16+0000000000699159 87..16+0000000000000000 88..16+0000000000000000 -*110066+0000000000000009 21.324+0000000004957266 22.324+0000000009141327 31..06+0000000000242087 32..16+0000000000241981 87..16+0000000000000000 88..16+0000000000000000 -*110067+0000000000000009 21.324+0000000022957263 22.324+0000000026818291 31..06+0000000000242086 32..16+0000000000241980 87..16+0000000000000000 88..16+0000000000000000 -*110068+0000000000000011 21.324+0000000021652070 22.324+0000000026909132 31..06+0000000000699233 32..16+0000000000699157 87..16+0000000000000000 88..16+0000000000000000 -*110069+0000000000000008 21.324+0000000017959531 22.324+0000000027213351 31..06+0000000000703127 32..16+0000000000702596 87..16+0000000000000000 88..16+0000000000000000 -*110070+0000000000000008 21.324+0000000035959560 22.324+0000000008746255 31..06+0000000000703129 32..16+0000000000702598 87..16+0000000000000000 88..16+0000000000000000 -*110071+0000000000000011 21.324+0000000003652079 22.324+0000000009050483 31..06+0000000000699235 32..16+0000000000699159 87..16+0000000000000000 88..16+0000000000000000 -*110072+0000000000000009 21.324+0000000004957267 22.324+0000000009141320 31..06+0000000000242085 32..16+0000000000241979 87..16+0000000000000000 88..16+0000000000000000 -*110073+0000000000000009 21.324+0000000022957267 22.324+0000000026818298 31..06+0000000000242084 32..16+0000000000241979 87..16+0000000000000000 88..16+0000000000000000 -*110074+0000000000000011 21.324+0000000021652075 22.324+0000000026909126 31..06+0000000000699235 32..16+0000000000699159 87..16+0000000000000000 88..16+0000000000000000 -*110075+0000000000000008 21.324+0000000017959543 22.324+0000000027213355 31..06+0000000000703127 32..16+0000000000702596 87..16+0000000000000000 88..16+0000000000000000 -*110076+0000000000000008 21.324+0000000035959558 22.324+0000000008746248 31..06+0000000000703129 32..16+0000000000702598 87..16+0000000000000000 88..16+0000000000000000 -*110077+0000000000000011 21.324+0000000003652081 22.324+0000000009050480 31..06+0000000000699234 32..16+0000000000699158 87..16+0000000000000000 88..16+0000000000000000 -*110078+0000000000000009 21.324+0000000004957270 22.324+0000000009141313 31..06+0000000000242084 32..16+0000000000241978 87..16+0000000000000000 88..16+0000000000000000 -*110079+0000000000000009 21.324+0000000022957266 22.324+0000000026818280 31..06+0000000000242085 32..16+0000000000241979 87..16+0000000000000000 88..16+0000000000000000 -*110080+0000000000000011 21.324+0000000021652070 22.324+0000000026909139 31..06+0000000000699234 32..16+0000000000699158 87..16+0000000000000000 88..16+0000000000000000 -*110081+0000000000000008 21.324+0000000017959543 22.324+0000000027213353 31..06+0000000000703128 32..16+0000000000702597 87..16+0000000000000000 88..16+0000000000000000 -*110082+0000000000000008 21.324+0000000035959550 22.324+0000000008746238 31..06+0000000000703127 32..16+0000000000702596 87..16+0000000000000000 88..16+0000000000000000 -*110083+0000000000000011 21.324+0000000003652077 22.324+0000000009050485 31..06+0000000000699234 32..16+0000000000699158 87..16+0000000000000000 88..16+0000000000000000 -*110084+0000000000000009 21.324+0000000004957267 22.324+0000000009141326 31..06+0000000000242081 32..16+0000000000241975 87..16+0000000000000000 88..16+0000000000000000 -*110085+0000000000000009 21.324+0000000022957270 22.324+0000000026818300 31..06+0000000000242083 32..16+0000000000241978 87..16+0000000000000000 88..16+0000000000000000 -*110086+0000000000000011 21.324+0000000021652063 22.324+0000000026909142 31..06+0000000000699235 32..16+0000000000699159 87..16+0000000000000000 88..16+0000000000000000 -*110087+0000000000000008 21.324+0000000017959530 22.324+0000000027213353 31..06+0000000000703128 32..16+0000000000702597 87..16+0000000000000000 88..16+0000000000000000 -*110088+0000000000000008 21.324+0000000035959544 22.324+0000000008746248 31..06+0000000000703126 32..16+0000000000702595 87..16+0000000000000000 88..16+0000000000000000 -*110089+0000000000000011 21.324+0000000003652071 22.324+0000000009050486 31..06+0000000000699231 32..16+0000000000699155 87..16+0000000000000000 88..16+0000000000000000 -*110090+0000000000000009 21.324+0000000004957266 22.324+0000000009141327 31..06+0000000000242083 32..16+0000000000241977 87..16+0000000000000000 88..16+0000000000000000 -*110091+0000000000000009 21.324+0000000022957276 22.324+0000000026818306 31..06+0000000000242083 32..16+0000000000241978 87..16+0000000000000000 88..16+0000000000000000 -*110092+0000000000000011 21.324+0000000021652071 22.324+0000000026909146 31..06+0000000000699233 32..16+0000000000699157 87..16+0000000000000000 88..16+0000000000000000 -*110093+0000000000000008 21.324+0000000017959540 22.324+0000000027213370 31..06+0000000000703128 32..16+0000000000702597 87..16+0000000000000000 88..16+0000000000000000 -*110094+0000000000000011 84..16+0000000009999994 85..16+0000000010494655 86..16+0000000001006701 87..16+0000000000000000 88..16+0000000000000000 -*110095+0000000000000009 21.324+0000000000000003 22.324+0000000008936367 31..06+0000000000466709 32..16+0000000000466698 87..16+0000000000000000 88..16+0000000000000000 -*110096+0000000000000010 21.324+0000000000644339 22.324+0000000008909152 31..06+0000000000699235 32..16+0000000000699159 87..16+0000000000000000 88..16+0000000000000000 -*110097+0000000000000006 21.324+0000000018914371 22.324+0000000009516517 31..06+0000000000456883 32..16+0000000000454944 87..16+0000000000000000 88..16+0000000000000000 -*110098+0000000000000006 21.324+0000000000914368 22.324+0000000026443102 31..06+0000000000456883 32..16+0000000000454944 87..16+0000000000000000 88..16+0000000000000000 -*110099+0000000000000010 21.324+0000000018644315 22.324+0000000027050475 31..06+0000000000699235 32..16+0000000000699159 87..16+0000000000000000 88..16+0000000000000000 -*110100+0000000000000009 21.324+0000000017959592 22.324+0000000027023256 31..06+0000000000466708 32..16+0000000000466697 87..16+0000000000000000 88..16+0000000000000000 -*110101+0000000000000009 21.324+0000000035959593 22.324+0000000008936367 31..06+0000000000466708 32..16+0000000000466697 87..16+0000000000000000 88..16+0000000000000000 -*110102+0000000000000010 21.324+0000000000644331 22.324+0000000008909152 31..06+0000000000699237 32..16+0000000000699161 87..16+0000000000000000 88..16+0000000000000000 -*110103+0000000000000006 21.324+0000000018914378 22.324+0000000009516515 31..06+0000000000456882 32..16+0000000000454943 87..16+0000000000000000 88..16+0000000000000000 -*110104+0000000000000006 21.324+0000000000914360 22.324+0000000026443104 31..06+0000000000456880 32..16+0000000000454941 87..16+0000000000000000 88..16+0000000000000000 -*110105+0000000000000010 21.324+0000000018644326 22.324+0000000027050479 31..06+0000000000699233 32..16+0000000000699157 87..16+0000000000000000 88..16+0000000000000000 -*110106+0000000000000009 21.324+0000000017959596 22.324+0000000027023223 31..06+0000000000466705 32..16+0000000000466694 87..16+0000000000000000 88..16+0000000000000000 -*110107+0000000000000009 21.324+0000000035959597 22.324+0000000008936370 31..06+0000000000466707 32..16+0000000000466696 87..16+0000000000000000 88..16+0000000000000000 -*110108+0000000000000010 21.324+0000000000644339 22.324+0000000008909144 31..06+0000000000699234 32..16+0000000000699158 87..16+0000000000000000 88..16+0000000000000000 -*110109+0000000000000006 21.324+0000000018914375 22.324+0000000009516511 31..06+0000000000456883 32..16+0000000000454944 87..16+0000000000000000 88..16+0000000000000000 -*110110+0000000000000006 21.324+0000000000914371 22.324+0000000026443097 31..06+0000000000456883 32..16+0000000000454944 87..16+0000000000000000 88..16+0000000000000000 -*110111+0000000000000010 21.324+0000000018644319 22.324+0000000027050478 31..06+0000000000699233 32..16+0000000000699157 87..16+0000000000000000 88..16+0000000000000000 -*110112+0000000000000009 21.324+0000000017959591 22.324+0000000027023246 31..06+0000000000466707 32..16+0000000000466696 87..16+0000000000000000 88..16+0000000000000000 -*110113+0000000000000009 21.324+0000000035959598 22.324+0000000008936360 31..06+0000000000466708 32..16+0000000000466697 87..16+0000000000000000 88..16+0000000000000000 -*110114+0000000000000010 21.324+0000000000644331 22.324+0000000008909141 31..06+0000000000699233 32..16+0000000000699157 87..16+0000000000000000 88..16+0000000000000000 -*110115+0000000000000006 21.324+0000000018914376 22.324+0000000009516503 31..06+0000000000456881 32..16+0000000000454942 87..16+0000000000000000 88..16+0000000000000000 -*110116+0000000000000006 21.324+0000000000914369 22.324+0000000026443098 31..06+0000000000456882 32..16+0000000000454943 87..16+0000000000000000 88..16+0000000000000000 -*110117+0000000000000010 21.324+0000000018644321 22.324+0000000027050481 31..06+0000000000699233 32..16+0000000000699157 87..16+0000000000000000 88..16+0000000000000000 -*110118+0000000000000009 21.324+0000000017959586 22.324+0000000027023254 31..06+0000000000466707 32..16+0000000000466696 87..16+0000000000000000 88..16+0000000000000000 -*110119+0000000000000009 21.324+0000000000000002 22.324+0000000008936359 31..06+0000000000466706 32..16+0000000000466695 87..16+0000000000000000 88..16+0000000000000000 -*110120+0000000000000010 21.324+0000000000644334 22.324+0000000008909139 31..06+0000000000699232 32..16+0000000000699156 87..16+0000000000000000 88..16+0000000000000000 -*110121+0000000000000006 21.324+0000000018914374 22.324+0000000009516505 31..06+0000000000456881 32..16+0000000000454942 87..16+0000000000000000 88..16+0000000000000000 -*110122+0000000000000006 21.324+0000000000914368 22.324+0000000026443102 31..06+0000000000456882 32..16+0000000000454943 87..16+0000000000000000 88..16+0000000000000000 -*110123+0000000000000010 21.324+0000000018644327 22.324+0000000027050483 31..06+0000000000699233 32..16+0000000000699157 87..16+0000000000000000 88..16+0000000000000000 -*110124+0000000000000009 21.324+0000000017959588 22.324+0000000027023251 31..06+0000000000466706 32..16+0000000000466695 87..16+0000000000000000 88..16+0000000000000000 -*110125+0000000000000006 84..16+0000000009999994 85..16+0000000010494655 86..16+0000000001006701 87..16+0000000000000000 88..16+0000000000000000 -*110126+0000000000000007 21.324+0000000035959592 22.324+0000000008655106 31..06+0000000001308488 32..16+0000000001306596 87..16+0000000000000000 88..16+0000000000000000 -*110127+0000000000000011 21.324+0000000027507274 22.324+0000000008443093 31..06+0000000000456883 32..16+0000000000454944 87..16+0000000000000000 88..16+0000000000000000 -*110128+0000000000000011 21.324+0000000009507250 22.324+0000000027516537 31..06+0000000000456882 32..16+0000000000454942 87..16+0000000000000000 88..16+0000000000000000 -*110129+0000000000000007 21.324+0000000017959571 22.324+0000000027304513 31..06+0000000001308489 32..16+0000000001306596 87..16+0000000000000000 88..16+0000000000000000 -*110130+0000000000000007 21.324+0000000035959585 22.324+0000000008655106 31..06+0000000001308487 32..16+0000000001306595 87..16+0000000000000000 88..16+0000000000000000 -*110131+0000000000000011 21.324+0000000027507272 22.324+0000000008443089 31..06+0000000000456882 32..16+0000000000454942 87..16+0000000000000000 88..16+0000000000000000 -*110132+0000000000000011 21.324+0000000009507256 22.324+0000000027516540 31..06+0000000000456882 32..16+0000000000454942 87..16+0000000000000000 88..16+0000000000000000 -*110133+0000000000000007 21.324+0000000017959570 22.324+0000000027304509 31..06+0000000001308488 32..16+0000000001306596 87..16+0000000000000000 88..16+0000000000000000 -*110134+0000000000000007 21.324+0000000035959577 22.324+0000000008655107 31..06+0000000001308485 32..16+0000000001306593 87..16+0000000000000000 88..16+0000000000000000 -*110135+0000000000000011 21.324+0000000027507272 22.324+0000000008443091 31..06+0000000000456882 32..16+0000000000454943 87..16+0000000000000000 88..16+0000000000000000 -*110136+0000000000000011 21.324+0000000009507256 22.324+0000000027516539 31..06+0000000000456882 32..16+0000000000454942 87..16+0000000000000000 88..16+0000000000000000 -*110137+0000000000000007 21.324+0000000017959572 22.324+0000000027304516 31..06+0000000001308490 32..16+0000000001306597 87..16+0000000000000000 88..16+0000000000000000 -*110138+0000000000000007 21.324+0000000035959587 22.324+0000000008655109 31..06+0000000001308485 32..16+0000000001306593 87..16+0000000000000000 88..16+0000000000000000 -*110139+0000000000000011 21.324+0000000027507268 22.324+0000000008443085 31..06+0000000000456881 32..16+0000000000454941 87..16+0000000000000000 88..16+0000000000000000 -*110140+0000000000000011 21.324+0000000009507259 22.324+0000000027516541 31..06+0000000000456883 32..16+0000000000454943 87..16+0000000000000000 88..16+0000000000000000 -*110141+0000000000000007 21.324+0000000017959571 22.324+0000000027304514 31..06+0000000001308487 32..16+0000000001306594 87..16+0000000000000000 88..16+0000000000000000 -*110142+0000000000000007 21.324+0000000035959575 22.324+0000000008655107 31..06+0000000001308489 32..16+0000000001306597 87..16+0000000000000000 88..16+0000000000000000 -*110143+0000000000000011 21.324+0000000027507271 22.324+0000000008443091 31..06+0000000000456882 32..16+0000000000454943 87..16+0000000000000000 88..16+0000000000000000 -*110144+0000000000000011 21.324+0000000009507261 22.324+0000000027516548 31..06+0000000000456883 32..16+0000000000454943 87..16+0000000000000000 88..16+0000000000000000 -*110145+0000000000000007 21.324+0000000017959570 22.324+0000000027304518 31..06+0000000001308489 32..16+0000000001306596 87..16+0000000000000000 88..16+0000000000000000 -*110146+0000000000000007 21.324+0000000035959581 22.324+0000000008655117 31..06+0000000001308485 32..16+0000000001306593 87..16+0000000000000000 88..16+0000000000000000 -*110147+0000000000000011 21.324+0000000027507270 22.324+0000000008443088 31..06+0000000000456882 32..16+0000000000454942 87..16+0000000000000000 88..16+0000000000000000 -*110148+0000000000000011 21.324+0000000009507261 22.324+0000000027516550 31..06+0000000000456883 32..16+0000000000454943 87..16+0000000000000000 88..16+0000000000000000 -*110149+0000000000000007 21.324+0000000017959571 22.324+0000000027304519 31..06+0000000001308489 32..16+0000000001306596 87..16+0000000000000000 88..16+0000000000000000 -*110150+0000000000000007 84..16+0000000009999994 85..16+0000000010494655 86..16+0000000001006701 87..16+0000000000000000 88..16+0000000000000000 -*110151+0000000000000006 21.324+0000000035959554 22.324+0000000009304468 31..06+0000000001308490 32..16+0000000001306602 87..16+0000000000000000 88..16+0000000000000000 -*110152+0000000000000008 21.324+0000000003414228 22.324+0000000008928169 31..06+0000000001014430 32..16+0000000001014387 87..16+0000000000000000 88..16+0000000000000000 -*110153+0000000000000008 21.324+0000000021414212 22.324+0000000027030234 31..06+0000000001014432 32..16+0000000001014392 87..16+0000000000000000 88..16+0000000000000000 -*110154+0000000000000006 21.324+0000000017959544 22.324+0000000026655099 31..06+0000000001308489 32..16+0000000001306600 87..16+0000000000000000 88..16+0000000000000000 -*110155+0000000000000006 21.324+0000000035959555 22.324+0000000009305039 31..06+0000000001308491 32..16+0000000001306597 87..16+0000000000000000 88..16+0000000000000000 -*110156+0000000000000008 21.324+0000000003414232 22.324+0000000008928185 31..06+0000000001014429 32..16+0000000001014386 87..16+0000000000000000 88..16+0000000000000000 -*110157+0000000000000008 21.324+0000000021414210 22.324+0000000027031524 31..06+0000000001014429 32..16+0000000001014385 87..16+0000000000000000 88..16+0000000000000000 -*110158+0000000000000006 21.324+0000000017959543 22.324+0000000026655079 31..06+0000000001308488 32..16+0000000001306598 87..16+0000000000000000 88..16+0000000000000000 -*110159+0000000000000006 21.324+0000000035959556 22.324+0000000009304494 31..06+0000000001308489 32..16+0000000001306600 87..16+0000000000000000 88..16+0000000000000000 -*110160+0000000000000008 21.324+0000000003414229 22.324+0000000008928159 31..06+0000000001014429 32..16+0000000001014386 87..16+0000000000000000 88..16+0000000000000000 -*110161+0000000000000008 21.324+0000000021414211 22.324+0000000027031480 31..06+0000000001014430 32..16+0000000001014386 87..16+0000000000000000 88..16+0000000000000000 -*110162+0000000000000006 21.324+0000000017959547 22.324+0000000026655104 31..06+0000000001308487 32..16+0000000001306598 87..16+0000000000000000 88..16+0000000000000000 -*110163+0000000000000006 21.324+0000000035959554 22.324+0000000009304513 31..06+0000000001308488 32..16+0000000001306598 87..16+0000000000000000 88..16+0000000000000000 -*110164+0000000000000008 21.324+0000000003414226 22.324+0000000008928138 31..06+0000000001014430 32..16+0000000001014387 87..16+0000000000000000 88..16+0000000000000000 -*110165+0000000000000008 21.324+0000000021414211 22.324+0000000027031462 31..06+0000000001014430 32..16+0000000001014387 87..16+0000000000000000 88..16+0000000000000000 -*110166+0000000000000006 21.324+0000000017959546 22.324+0000000026655116 31..06+0000000001308489 32..16+0000000001306600 87..16+0000000000000000 88..16+0000000000000000 -*110167+0000000000000006 21.324+0000000035959557 22.324+0000000009304539 31..06+0000000001308488 32..16+0000000001306597 87..16+0000000000000000 88..16+0000000000000000 -*110168+0000000000000008 21.324+0000000003414234 22.324+0000000008928146 31..06+0000000001014428 32..16+0000000001014385 87..16+0000000000000000 88..16+0000000000000000 -*110169+0000000000000008 21.324+0000000021414213 22.324+0000000027031421 31..06+0000000001014431 32..16+0000000001014388 87..16+0000000000000000 88..16+0000000000000000 -*110170+0000000000000006 21.324+0000000017959551 22.324+0000000026655113 31..06+0000000001308487 32..16+0000000001306598 87..16+0000000000000000 88..16+0000000000000000 -*110171+0000000000000006 21.324+0000000035959553 22.324+0000000009304550 31..06+0000000001308488 32..16+0000000001306597 87..16+0000000000000000 88..16+0000000000000000 -*110172+0000000000000008 21.324+0000000003414228 22.324+0000000008928143 31..06+0000000001014430 32..16+0000000001014387 87..16+0000000000000000 88..16+0000000000000000 -*110173+0000000000000008 21.324+0000000021414214 22.324+0000000027031438 31..06+0000000001014432 32..16+0000000001014389 87..16+0000000000000000 88..16+0000000000000000 -*110174+0000000000000006 21.324+0000000017959550 22.324+0000000026655105 31..06+0000000001308489 32..16+0000000001306600 87..16+0000000000000000 88..16+0000000000000000 -*110175+0000000000000006 21.324+0000000035959557 22.324+0000000009304533 31..06+0000000001308488 32..16+0000000001306597 87..16+0000000000000000 88..16+0000000000000000 -*110176+0000000000000008 21.324+0000000003414230 22.324+0000000008928184 31..06+0000000001014430 32..16+0000000001014387 87..16+0000000000000000 88..16+0000000000000000 -*110177+0000000000000008 21.324+0000000021414212 22.324+0000000027031498 31..06+0000000001014431 32..16+0000000001014387 87..16+0000000000000000 88..16+0000000000000000 -*110178+0000000000000006 21.324+0000000017959554 22.324+0000000026655104 31..06+0000000001308488 32..16+0000000001306599 87..16+0000000000000000 88..16+0000000000000000 diff --git a/geodepy/tests/resources/gsisample.msr b/geodepy/tests/resources/gsisample.msr deleted file mode 100644 index b01500f..0000000 --- a/geodepy/tests/resources/gsisample.msr +++ /dev/null @@ -1,40 +0,0 @@ -!#=DNA 3.01 MSR 01.01.2020 GDA94 01.01.2020 27 -D AU45 AU52 2 18 42 38.230 4.158 -D AU48 177 11 53.810 3.039 -D STR3 359 59 54.740 4.968 -V AU45 AU52 92 13 36.500 4.158 1.6450 0.0000 -V AU45 AU48 90 31 48.200 3.039 1.6450 0.0000 -V AU45 STR3 93 24 57.610 4.968 1.6450 1.4210 -S AU45 AU52 70.3146 0.0052 1.6450 0.0000 -S AU45 AU48 101.4460 0.0052 1.6450 0.0000 -S AU45 STR3 57.8488 0.0052 1.6450 1.4210 -D AU52 AU54 2 36 52 07.390 4.178 -D STR3 49 57 26.780 11.50 -D AU45 359 59 54.490 4.158 -V AU52 AU54 90 50 47.290 4.178 0.0000 0.0000 -V AU52 STR3 91 41 31.380 11.50 0.0000 0.0000 -V AU52 AU45 87 46 24.480 4.158 0.0000 0.0000 -S AU52 AU54 69.9253 0.0052 0.0000 0.0000 -S AU52 STR3 24.2090 0.0052 0.0000 0.0000 -S AU52 AU45 70.3146 0.0052 0.0000 0.0000 -D AU54 AU52 2 6 44 32.820 4.178 -D AU49 189 14 37.100 6.203 -D STR3 359 59 59.460 6.079 -V AU54 AU52 89 09 13.320 4.178 0.0000 0.0000 -V AU54 AU49 95 16 50.480 6.203 0.0000 0.0000 -V AU54 STR3 89 36 35.930 6.079 0.0000 0.0000 -S AU54 AU52 69.9252 0.0052 0.0000 0.0000 -S AU54 AU49 45.6894 0.0052 0.0000 0.0000 -S AU54 STR3 46.6719 0.0052 0.0000 0.0000 -D AU49 AU54 1 275 07 26.417 5.663 -D AU48 359 59 57.683 2.286 -V AU49 AU54 84 43 07.350 5.663 0.0000 0.0000 -V AU49 AU48 86 55 09.692 2.286 0.0000 0.0000 -S AU49 AU54 45.6894 0.0052 0.0000 0.0000 -S AU49 AU48 130.8522 0.0053 0.0000 0.0000 -D AU48 AU45 1 34 14 22.071 2.569 -D AU49 359 59 55.150 2.116 -V AU48 AU45 89 28 20.479 2.569 0.0000 0.0000 -V AU48 AU49 93 04 51.543 2.116 0.0000 0.0000 -S AU48 AU45 101.4457 0.0052 0.0000 0.0000 -S AU48 AU49 130.8523 0.0053 0.0000 0.0000 diff --git a/geodepy/tests/resources/gsisample_noconfig.msr b/geodepy/tests/resources/gsisample_noconfig.msr deleted file mode 100644 index 62bd5e9..0000000 --- a/geodepy/tests/resources/gsisample_noconfig.msr +++ /dev/null @@ -1,40 +0,0 @@ -!#=DNA 3.01 MSR 01.01.2020 GDA94 01.01.2020 27 -D 8 10 2 18 42 38.230 1.386 -D 7 177 11 53.810 1.013 -D 9 359 59 54.740 1.656 -V 8 10 92 13 36.500 1.386 1.6450 0.0000 -V 8 7 90 31 48.200 1.013 1.6450 0.0000 -V 8 9 93 24 57.610 1.656 1.6450 1.4210 -S 8 10 70.3127 0.0017 1.6450 0.0000 -S 8 7 101.4432 0.0017 1.6450 0.0000 -S 8 9 57.8473 0.0017 1.6450 1.4210 -D 10 11 2 36 52 07.390 1.392 -D 9 49 57 26.780 3.836 -D 8 359 59 54.490 1.386 -V 10 11 90 50 47.290 1.392 0.0000 0.0000 -V 10 9 91 41 31.380 3.836 0.0000 0.0000 -V 10 8 87 46 24.480 1.386 0.0000 0.0000 -S 10 11 69.9234 0.0017 0.0000 0.0000 -S 10 9 24.2084 0.0017 0.0000 0.0000 -S 10 8 70.3127 0.0017 0.0000 0.0000 -D 11 10 2 6 44 32.820 1.392 -D 6 189 14 37.100 2.067 -D 9 359 59 59.460 2.026 -V 11 10 89 09 13.320 1.392 0.0000 0.0000 -V 11 6 95 16 50.480 2.067 0.0000 0.0000 -V 11 9 89 36 35.930 2.026 0.0000 0.0000 -S 11 10 69.9234 0.0017 0.0000 0.0000 -S 11 6 45.6882 0.0017 0.0000 0.0000 -S 11 9 46.6707 0.0017 0.0000 0.0000 -D 6 11 1 275 07 26.417 1.887 -D 7 359 59 57.683 0.762 -V 6 11 84 43 07.350 1.887 0.0000 0.0000 -V 6 7 86 55 09.692 0.762 0.0000 0.0000 -S 6 11 45.6882 0.0017 0.0000 0.0000 -S 6 7 130.8487 0.0017 0.0000 0.0000 -D 7 8 1 34 14 22.071 0.856 -D 6 359 59 55.150 0.705 -V 7 8 89 28 20.479 0.856 0.0000 0.0000 -V 7 6 93 04 51.543 0.705 0.0000 0.0000 -S 7 8 101.4430 0.0017 0.0000 0.0000 -S 7 6 130.8488 0.0017 0.0000 0.0000 diff --git a/geodepy/tests/test_surveyconvert.py b/geodepy/tests/test_surveyconvert.py deleted file mode 100644 index ac04b82..0000000 --- a/geodepy/tests/test_surveyconvert.py +++ /dev/null @@ -1,85 +0,0 @@ -import unittest -import tempfile -import shutil -import os.path -from geodepy.surveyconvert.fbk import * -from geodepy.surveyconvert.gsi import * - - -class TestSurveyConvert(unittest.TestCase): - def test_fbk2msr(self): - abs_path = os.path.abspath(os.path.dirname(__file__)) - tempdir = tempfile.TemporaryDirectory() - files = ['fbksample.fbk', 'fbksample.gpy'] - for f in files: - shutil.copy(os.path.join(abs_path, 'resources', f), tempdir.name) - temp_fbk_filepath = os.path.join(tempdir.name, 'fbksample.fbk') - temp_fbkgpy_filepath = os.path.join(tempdir.name, 'fbksample.gpy') - fbk2msr(temp_fbk_filepath, temp_fbkgpy_filepath, strict=False, zerodist=False, same_stdev=False) - original_msr = open(os.path.join(abs_path, 'resources/fbksample.msr')) - temp_msr = open(os.path.join(tempdir.name, 'fbksample.msr')) - assert [row for row in original_msr] == [row for row in temp_msr] - original_msr.close() - temp_msr.close() - tempdir.cleanup() - - def test_writestn(self): - abs_path = os.path.abspath(os.path.dirname(__file__)) - tempdir = tempfile.TemporaryDirectory() - files = ['fbksample.txt', 'fbksample.gpy'] - for f in files: - shutil.copy(os.path.join(abs_path, 'resources', f), tempdir.name) - temp_txt_filepath = os.path.join(tempdir.name, 'fbksample.txt') - writestn(temp_txt_filepath, 'S56') - original_stn = open(os.path.join(abs_path, 'resources/fbksample.stn')) - temp_stn = open(os.path.join(tempdir.name, 'fbksample.stn')) - assert [row for row in original_stn] == [row for row in temp_stn] - original_stn.close() - temp_stn.close() - tempdir.cleanup() - - def test_gsi2msr(self): - abs_path = os.path.abspath(os.path.dirname(__file__)) - tempdir = tempfile.TemporaryDirectory() - files = ['gsisample.gsi', 'gsisample.gpy'] - for f in files: - shutil.copy(os.path.join(abs_path, 'resources', f), tempdir.name) - temp_gsi_filepath = os.path.join(tempdir.name, 'gsisample.gsi') - temp_gsigpy_filepath = os.path.join(tempdir.name, 'gsisample.gpy') - gsi2msr(temp_gsi_filepath, temp_gsigpy_filepath) - original_msr = open(os.path.join(abs_path, 'resources/gsisample.msr')) - temp_msr = open(os.path.join(tempdir.name, 'gsisample.msr')) - assert [row for row in original_msr] == [row for row in temp_msr] - original_msr.close() - temp_msr.close() - tempdir.cleanup() - - def test_gsi2msr_no_config(self): - abs_path = os.path.abspath(os.path.dirname(__file__)) - tempdir = tempfile.TemporaryDirectory() - files = ['gsisample.gsi'] - for f in files: - shutil.copy(os.path.join(abs_path, 'resources', f), tempdir.name) - temp_gsi_filepath = os.path.join(tempdir.name, 'gsisample.gsi') - gsi2msr(temp_gsi_filepath) - original_stn = open(os.path.join(abs_path, 'resources/gsisample_noconfig.msr')) - temp_stn = open(os.path.join(tempdir.name, 'gsisample.msr')) - assert [row for row in original_stn] == [row for row in temp_stn] - original_stn.close() - temp_stn.close() - tempdir.cleanup() - - def test_gsi2stn(self): - abs_path = os.path.abspath(os.path.dirname(__file__)) - tempdir = tempfile.TemporaryDirectory() - files = ['gsisample.gsi'] - for f in files: - shutil.copy(os.path.join(abs_path, 'resources', f), tempdir.name) - temp_gsi_filepath = os.path.join(tempdir.name, 'gsisample.gsi') - #TODO: finish test_gsi2stn testing - tempdir.cleanup() - pass - - -if __name__ == '__main__': - unittest.main()