Skip to content

Commit

Permalink
Fix gdb_to_vector bug
Browse files Browse the repository at this point in the history
  • Loading branch information
giswqs committed Nov 11, 2023
1 parent cd124e1 commit 8974984
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion leafmap/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -11640,6 +11640,7 @@ def gdb_to_vector(
if len(filenames) != len(layers):
raise ValueError("The length of filenames must match the length of layers.")

ii = 0
# Iterate over the layers
for i in range(layer_count):
layer = gdb_dataset.GetLayerByIndex(i)
Expand All @@ -11654,7 +11655,8 @@ def gdb_to_vector(

# Create the output file path
if filenames is not None:
output_file = os.path.join(out_dir, filenames[i] + "." + file_extension)
output_file = os.path.join(out_dir, filenames[ii] + "." + file_extension)
ii += 1
else:
output_file = os.path.join(
out_dir, feature_class_name + "." + file_extension
Expand Down

0 comments on commit 8974984

Please sign in to comment.