Skip to content
Snippets Groups Projects
Commit 3ab9cbc9 authored by Noe Bernabeu's avatar Noe Bernabeu
Browse files

correction adim and geojson reading

parent e1fc4007
No related branches found
No related tags found
No related merge requests found
......@@ -384,7 +384,7 @@ int main (int argc, char **argv) {
field h_plus = L*interpolate(Xh,max(0.,h));
odiststream ovtk ("output-"+itos(k)+".branch");
branch vtk_event ("t","time","h","f", "f+h", "u_parallel");
ovtk << vtk_event (timer*T_carac, time_h, h_plus*L,fh,fh+h,U*u_parallel);
ovtk << vtk_event (timer*T_carac, time_h, h_plus,fh,fh+h,u_parallel);
if (k == k_max) break;
if (timer > tf_adim) break;
//if (norm_L2_dh_dt < epsilon) break;
......
......@@ -109,7 +109,14 @@ class page5():
data = json.load(f)
for feature in data['features']:
my_file = open("final_shape0.tmp", "w") #erase
for vertex in feature['geometry']['coordinates']:
list_of_coordinates = feature['geometry']['coordinates']
try:
float(list_of_coordinates[0][0])
#if len(list_of_coordinates)==1: #from GeoJson,list_of_coordinates=[[coordinate]] 1 hook too much
except:
list_of_coordinates = list_of_coordinates[0]
del list_of_coordinates[-1]
for vertex in list_of_coordinates:
utm_convert = utm.from_latlon(vertex[1],vertex[0])
my_file.write(str(utm_convert[0])+" "+str(utm_convert[1])+"\n")
my_file.close()
......
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