Skip to content

Commit 32dd85f

Browse files
committed
change to wkt because of pandas-dev/pandas#28924
1 parent 5981827 commit 32dd85f

File tree

1 file changed

+4
-2
lines changed
  • floodmodeller_api/toolbox/model_conversion/tuflow_to_floodmodeller

1 file changed

+4
-2
lines changed

floodmodeller_api/toolbox/model_conversion/tuflow_to_floodmodeller/tuflow_to_dat.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
from floodmodeller_api.units.conduits import CONDUIT
99
from floodmodeller_api.units.comment import COMMENT
1010
from shapely.geometry import Point
11+
from shapely import wkt
1112

1213

1314
class TuflowToDat:
@@ -228,10 +229,11 @@ def _add_to_xs_data(self):
228229
self._xs_attributes["location"] = ""
229230
for key, values in self._full_flag_dict.items():
230231
mask = self._xs_attributes["intersect"] == key
231-
self._xs_attributes.loc[mask, "location"] = values["start"]
232+
self._xs_attributes.loc[mask, "location"] = values["start"].wkt
232233
for key, values in self._end_dict.items():
233234
mask = self._xs_attributes["end_intersect"] == key
234-
self._xs_attributes.loc[mask, "location"] = values["end"]
235+
self._xs_attributes.loc[mask, "location"] = values["end"].wkt
236+
self._xs_attributes["location"] = self._xs_attributes["location"].apply(wkt.loads)
235237

236238
def _get_coordinates(self, point):
237239
# take xs intersect, map to start point from nwk, set x as east, y as north

0 commit comments

Comments
 (0)