Skip to content

Commit c9ece14

Browse files
committed
Sort keys to create deterministic output
1 parent ec079db commit c9ece14

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

geojsoncontour/contour.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,6 @@ def contour_to_geojson(contour, filename, contour_labels, min_angle=2, ndigits=5
7272
print('no points found')
7373

7474
feature_collection = FeatureCollection(line_features)
75-
dump = geojson.dumps(feature_collection)
76-
with open(filename + '.geojson', 'w') as fileout:
75+
dump = geojson.dumps(feature_collection, sort_keys=True)
76+
with open(filename, 'w') as fileout:
7777
fileout.write(dump)

0 commit comments

Comments
 (0)