Skip to content

Commit

Permalink
Support more Shapefile types.
Browse files Browse the repository at this point in the history
1x include Z co-ordinates (ignored), 2x include a user-defined
measurement (ignored).
  • Loading branch information
dracos committed Jan 24, 2021
1 parent fc3e951 commit f4b9db1
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 f4b9db1

Please sign in to comment.