Skip to content

Commit 6d8eba8

Browse files
committed
Remove code that results in non-deterministic behavior for test_vcs_boxfill_mercator
We deal with points set to infinity by setting them to 0 and hidding them. See the following commit: BUG: orthographic projection plot is empty
1 parent e901bc0 commit 6d8eba8

File tree

1 file changed

+0
-21
lines changed

1 file changed

+0
-21
lines changed

Packages/vcs/vcs/vcs2vtk.py

Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -165,23 +165,6 @@ def putMaskOnVTKGrid(data, grid, actorColor=None, cellData=True, deep=True):
165165
return mapper
166166

167167

168-
def handleProjectionEdgeCases(projection, data):
169-
# For mercator projection, latitude values of -90 or 90
170-
# transformation result in infinity values. We chose -85, 85
171-
# as that's the typical limit used by the community.
172-
ptype = projDict.get(projection._type, projection.type)
173-
if (ptype.lower() == "merc"):
174-
lat = data.getLatitude()
175-
if isinstance(lat, cdms2.axis.TransientAxis):
176-
lat = lat[:]
177-
# Reverse the latitudes incase the starting latitude is greater
178-
# than the ending one
179-
if lat[-1] < lat[0]:
180-
lat = lat[::-1]
181-
data = data(latitude=(max(-85, lat.min()), min(85, lat.max())))
182-
return data
183-
184-
185168
def getBoundsList(axis, hasCellData, dualGrid):
186169
'''
187170
Returns the bounds list for 'axis'. If axis has n elements the
@@ -260,10 +243,6 @@ def genGrid(data1, data2, gm, deep=True, grid=None, geo=None, genVectors=False,
260243
xm, xM, ym, yM = None, None, None, None
261244
projection = vcs.elements["projection"][gm.projection]
262245

263-
data1 = handleProjectionEdgeCases(projection, data1)
264-
if data2 is not None:
265-
data2 = handleProjectionEdgeCases(projection, data2)
266-
267246
try: # First try to see if we can get a mesh out of this
268247
g = data1.getGrid()
269248
# Ok need unstructured grid

0 commit comments

Comments
 (0)