Skip to content

Commit

Permalink
Merge pull request #875 from dracos/shape-types
Browse files Browse the repository at this point in the history
Support more Shapefile geometry types.
  • Loading branch information
saulpw authored Jan 24, 2021
2 parents fc3e951 + f4b9db1 commit 54e0dea
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions visidata/loaders/shp.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,11 +54,11 @@ def reload(self):
# color according to key
k = tuple(col.getValue(row) for col in self.source.keyCols)

if row.shape.shapeType == 5:
if row.shape.shapeType in (5, 15, 25):
self.polygon(row.shape.points, self.plotColor(k), row)
elif row.shape.shapeType == 3:
elif row.shape.shapeType in (3, 13, 23):
self.polyline(row.shape.points, self.plotColor(k), row)
elif row.shape.shapeType == 1:
elif row.shape.shapeType in (1, 11, 21):
x, y = row.shape.points[0]
self.point(x, y, self.plotColor(k), row)
else:
Expand Down

0 comments on commit 54e0dea

Please sign in to comment.