From f4b9db1b9b23c29af4fe72e59c3d41b108cb911f Mon Sep 17 00:00:00 2001 From: M Somerville Date: Sun, 24 Jan 2021 11:35:39 +0000 Subject: [PATCH] Support more Shapefile types. 1x include Z co-ordinates (ignored), 2x include a user-defined measurement (ignored). --- visidata/loaders/shp.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/visidata/loaders/shp.py b/visidata/loaders/shp.py index 47e710783..0931cc2c5 100644 --- a/visidata/loaders/shp.py +++ b/visidata/loaders/shp.py @@ -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: