From 86932365e8bfbfc738564632f8533b287db4aa02 Mon Sep 17 00:00:00 2001 From: Aashish Chaudhary Date: Thu, 24 Sep 2015 01:50:07 -0400 Subject: [PATCH] Added check of lat lon presence --- Packages/vcs/Lib/vcsvtk/vectorpipeline.py | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/Packages/vcs/Lib/vcsvtk/vectorpipeline.py b/Packages/vcs/Lib/vcsvtk/vectorpipeline.py index a04c2c2947..cc9723581b 100644 --- a/Packages/vcs/Lib/vcsvtk/vectorpipeline.py +++ b/Packages/vcs/Lib/vcsvtk/vectorpipeline.py @@ -31,11 +31,17 @@ def plot(self, data1, data2, tmpl, grid, transform): data2 = self._context().trimData2D(data2) scale = 1.0 + lat = None + lon = None - lat = data1.getLatitude()[:] - lon = data1.getLongitude()[:] + latAccessor = data1.getLatitude() + latAccessor = data1.getLongitude() + if latAccessor: + lat = latAccessor[:] + if latAccessor: + lon = lonAccesrsor[:] - if projection is not None: + if not None in(projection, lat, lon): scale = (lat.max() - lat.min()) * (lon.max() - lon.min()) gridGenDict = vcs2vtk.genGridOnPoints(data1, self._gm, deep=False, grid=grid,