Skip to content
Snippets Groups Projects
Commit c4f1ea0c authored by Lionel GUEZ's avatar Lionel GUEZ
Browse files

Read position of extremum from shapefile

Instead of asking the user to define it.
parent cd843903
No related branches found
No related tags found
No related merge requests found
......@@ -51,9 +51,10 @@ values_x = interpolate.interpn((lat_rad, lon_rad), values, xi)
ui = values_x[:, 0]
vi = values_x[:, 1]
lon_0 = float(input("longitude extremum = ? "))
lat_0 = float(input("latitude extremum = ? "))
with shapefile.Reader("SHPC/extremum") as sf:
p = sf.shape(0)
lon_0, lat_0 = p.points[0]
lon_0_rad = lon_0 * np.pi/180
lat_0_rad = lat_0 * np.pi/180
......
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