Skip to content

Commit

Permalink
fix(write_shapefile): fix transform call for exporting (#1608)
Browse files Browse the repository at this point in the history
* fix applies to vertex and unstructured grid pathlines
  • Loading branch information
jlarsen-usgs authored Oct 27, 2022
1 parent 66a28c5 commit 8a4e204
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions flopy/utils/modpathfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -386,12 +386,12 @@ def write_shapefile(
sdata = []
for pid in particles:
ra = series[series.particleid == pid]
if isinstance(mg, StructuredGrid):
if mg is not None:
x, y = geometry.transform(
ra.x, ra.y, mg.xoffset, mg.yoffset, mg.angrot_radians
)
else:
x, y = mg.transform(ra.x, ra.y)
x, y = geometry.transform(ra.x, ra.y, 0, 0, 0)
z = ra.z
geoms += [
LineString(
Expand Down

0 comments on commit 8a4e204

Please sign in to comment.