Skip to content

Commit

Permalink
Gplately save shp (#205)
Browse files Browse the repository at this point in the history
* added saving to shapefile as an option for gpts

added .shp as a save option for gpts, so that data can go straight into qgis rather than through gplates first

* added shp to error message as well
  • Loading branch information
amer7632 authored Jun 30, 2024
1 parent d86842e commit 2798165
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions gplately/reconstruction.py
Original file line number Diff line number Diff line change
Expand Up @@ -1884,12 +1884,12 @@ def save(self, filename):
df = self._get_dataframe()
df.to_xml(filename, index=False)

elif filename.endswith(".gpml") or filename.endswith(".gpmlz"):
elif filename.endswith(".gpml") or filename.endswith(".gpmlz") or filename.endswith(".shp"):
self.FeatureCollection.write(filename)

else:
raise ValueError(
"Cannot save to specified file type. Use csv, gpml, or xls file extension."
"Cannot save to specified file type. Use csv, gpml, shp or xls file extension."
)

def rotate_reference_frames(
Expand Down

0 comments on commit 2798165

Please sign in to comment.