Skip to content

Commit 8cae1c2

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 b460c61 commit 8cae1c2

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
@@ -164,23 +164,6 @@ def putMaskOnVTKGrid(data, grid, actorColor=None, cellData=True, deep=True):
164164
return mapper
165165

166166

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

234-
data1 = handleProjectionEdgeCases(projection, data1)
235-
if data2 is not None:
236-
data2 = handleProjectionEdgeCases(projection, data2)
237-
238217
try: # First try to see if we can get a mesh out of this
239218
g = data1.getGrid()
240219
# Ok need unstructured grid

0 commit comments

Comments
 (0)