Skip to content

Commit

Permalink
Fix GFS file writing
Browse files Browse the repository at this point in the history
  • Loading branch information
pathmapper committed Oct 5, 2023
1 parent f70e8d6 commit 18c95ca
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion xplan_reader.py
Original file line number Diff line number Diff line change
Expand Up @@ -303,14 +303,17 @@ def importXplanGml(self):

self.group_extent = QgsRectangle()

my_gfs = os.path.splitext(my_gml)[0] + ".gfs"
if os.path.isfile(my_gfs):
os.remove(my_gfs)

ds_one = gdal.OpenEx(
my_gml,
allowed_drivers=["GML"],
open_options=["GML_ATTRIBUTES_TO_OGR_FIELDS=YES", "WRITE_GFS=YES"],
)

if self.use_gfs_workaround_one or self.use_gfs_workaround_two:
my_gfs = os.path.splitext(my_gml)[0] + ".gfs"
write_gfs = False
if os.path.isfile(my_gfs):
gfs_tree = etree.parse(my_gfs)
Expand Down

0 comments on commit 18c95ca

Please sign in to comment.