Skip to content

Commit 2db9bf9

Browse files
committed
Don't forget to generate the first 2 points in each chain.
1 parent 8adf76b commit 2db9bf9

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

shapefile-to-json.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,10 @@ def segments_in_sequence(segdataa, segdatab):
189189
currentChainData.append(seg.b)
190190
else:
191191
currentChainID = len(chains)
192-
currentChainData = []
192+
if is_reversed:
193+
currentChainData = [ seg.b, seg.a ]
194+
else:
195+
currentChainData = [ seg.a, seg.b ]
193196
chains.append(currentChainData)
194197
polygonChains.append([currentChainID, False])
195198
segdata.chain = currentChainID

0 commit comments

Comments
 (0)