Merge "Issue #1446 return None in Python if data is not available. Users will need to handle None, but it seems like this is better rather than return them an empty array and risk them searching through the empty array for values that are not there and getting more confused." into development

Former-commit-id: ec5a6b3d1ad551db73f3cd60eafe2b97267a6bdd
This commit is contained in:
Nate Jensen 2013-02-12 12:15:37 -06:00 committed by Gerrit Code Review
commit 207cca1edf

View file

@ -80,6 +80,8 @@ def getLatLonCoords(gridRequest):
@return: a tuple where the first element is a numpy array of lons, and the second element is a numpy array of lats
'''
gridGeometry = JavaDataAccessLayer.getGridGeometry(gridRequest.toJavaObj())
if gridGeometry is None :
return None
latlons = LatLonReprojection.getLatLons(gridGeometry)
nx = gridGeometry.getGridRange().getSpan(0)
ny = gridGeometry.getGridRange().getSpan(1)