Skip to content
Snippets Groups Projects
Commit 378dcb7e authored by jay's avatar jay
Browse files

Finishing the merge cleanly

parent 932c3591
No related branches found
No related tags found
No related merge requests found
<<<<<<< HEAD
import math
=======
>>>>>>> upstream/master
import numpy as np
import numpy as np
import pandas as pd
def read_gpf(input_data):
......@@ -47,9 +43,7 @@ def read_gpf(input_data):
assert int(cnt) == len(df)
return df
<<<<<<< HEAD
=======
def save_gpf(df, output_file):
"""
Write a socet gpf file from a gpf-defined pandas dataframe
......@@ -61,7 +55,7 @@ def save_gpf(df, output_file):
output_file : str
path to the output data file
Returns
-------
int : success value
......@@ -74,10 +68,10 @@ def save_gpf(df, output_file):
except:
print ('Unable to open output gpf file: {0}'.format(output_file))
return 1
#grab number of rows in pandas dataframe
numpts = len(df)
#Output gpf header
outGPF.write('GROUND POINT FILE\n')
outGPF.write('{0}\n'.format(numpts))
......@@ -89,7 +83,6 @@ def save_gpf(df, output_file):
outGPF.write('{0} {1} {2}\n'.format(row['lat_y_North'], row['long_X_East'], row['ht']))
outGPF.write('{0} {1} {2}\n'.format(row['sigma0'], row['sigma1'], row['sigma2']))
outGPF.write('{0} {1} {2}\n\n'.format(row['res0'], row['res1'], row['res2']))
outGPF.close()
return 0
>>>>>>> upstream/master
return
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment