@ -350,8 +350,11 @@ def polygon_wave_runup(xyz_1m, direction, shp_name, set_check_value, distance_ch
#making the cropping shapefile
#print('making the crop polygon')
# Simplify polygon to remove invalid geometry
geom = Polygon(for_shape).simplify(10)
# Export polygon as shapefile
df = gpd.GeoDataFrame(geometry=[Polygon(for_shape)])
df = gpd.GeoDataFrame(geometry=[geom])
df.crs = {'init': 'epsg:283{}'.format(zone), 'no_defs': True}
df.to_file(shp_name, driver='ESRI Shapefile')