Changeset 713
- Timestamp:
- 01/20/11 18:11:24 (2 years ago)
- Location:
- MGET/Branches/Jason/PythonPackage/src/GeoEco
- Files:
-
- 5 modified
-
AggregatedModules/pydap/parsers/das.py (modified) (1 diff)
-
DataManagement/ArcGISRasters.py (modified) (1 diff)
-
DataProducts/NOAA/NODC.py (modified) (4 diffs)
-
Datasets/Virtual.py (modified) (1 diff)
-
__init__.py (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
MGET/Branches/Jason/PythonPackage/src/GeoEco/AggregatedModules/pydap/parsers/das.py
r602 r713 104 104 value = self.consume(r'".*?[^\\]"|[^;,]+') 105 105 else: 106 try: 107 value = self.consume('"') 108 except: 109 value = self.consume('[^; "]+') 106 if self.buffer[0] == '"': 107 value = self.buffer[0] # It is a strong enclosed by double quotes. First consume the leading double-quote. 108 self.buffer = self.buffer[1:] 109 110 while not self.buffer.startswith('";\n'): # Consume all characters leading up to a sequence of double-quote, semicolon, newline. 111 value += self.buffer[0] 112 self.buffer = self.buffer[1:] 113 114 value += self.buffer[0] # Consume trailing double-quote. 115 self.buffer = self.buffer[1:] 110 116 else: 111 value += self.consume('[^"]*') 112 value += self.consume('"') 117 value = self.consume('[^;"]+') # It is a strong not enclosed by double quotes. Consume it all up to a semicolon. 113 118 114 119 if type_.lower() in ['string', 'url']: -
MGET/Branches/Jason/PythonPackage/src/GeoEco/DataManagement/ArcGISRasters.py
r558 r713 3462 3462 outputParamExpressionDescriptions=[_OutputFeatureClassParamExpressionDescription], 3463 3463 outputParamDefaultExpressions=[u'os.path.join(outputWorkspace, inputRaster[len(workspaceToSearch)+1:])'], 3464 constantParamNames=[u' simplify', u'field', u'projectedCoordinateSystem', u'geographicTransformation', u'resamplingTechnique', u'projectedCellSize', u'registrationPoint', u'clippingDataset', u'clippingRectangle', u'mapAlgebraExpression'],3464 constantParamNames=[u'backgroundValue', u'minDangleLength', u'simplify', u'field', u'projectedCoordinateSystem', u'geographicTransformation', u'resamplingTechnique', u'projectedCellSize', u'registrationPoint', u'clippingDataset', u'clippingRectangle', u'mapAlgebraExpression'], 3465 3465 processListMethodName=u'ToLinesList', 3466 3466 processListMethodShortDescription=_(u'Converts a list of ArcGIS rasters to lines that outline groups of adjacent raster cells having the same value.'), -
MGET/Branches/Jason/PythonPackage/src/GeoEco/DataProducts/NOAA/NODC.py
r707 r713 152 152 # Otherwise, get the oldest dataset from each catalog. 153 153 154 if expression is None: 155 version50InterimExpression = 'Year IN (' + ', '.join(self._Version50InterimYears) + ')' 156 else: 157 version50InterimExpression = '(' + expression + ') AND Year IN (' + ', '.join(self._Version50InterimYears) + ')' 154 version50InterimExpression = '(' + expression + ') AND Year IN (' + ', '.join(self._Version50InterimYears) + ') AND (TemporalResolution <> \'yearly\' OR Year <> 2005)' # NODC says there is no yearly data available for 2005, but they nonethless have an interim NOAA-17 file available on their server. We want to ignore it. 158 155 159 156 datasets = [] … … 256 253 # Otherwise, get the newest dataset from each catalog. 257 254 258 if expression is None: 259 version50InterimExpression = 'Year IN (' + ', '.join(self._Version50InterimYears) + ')' 260 else: 261 version50InterimExpression = '(' + expression + ') AND Year IN (' + ', '.join(self._Version50InterimYears) + ')' 255 version50InterimExpression = '(' + expression + ') AND Year IN (' + ', '.join(self._Version50InterimYears) + ') AND (TemporalResolution <> \'yearly\' OR Year <> 2005)' # NODC says there is no yearly data available for 2005, but they nonethless have an interim NOAA-17 file available on their server. We want to ignore it. 262 256 263 257 datasets = [] … … 460 454 self._TemporalResolution == u'5day' and (version == u'5.0' and d.month == 1 and d.day <= 6 or version == u'5.1' and (d.month > 1 or d.month == 1 and d.day > 6)) or \ 461 455 self._TemporalResolution == u'8day' and (version == u'5.0' and d.month == 1 and d.day == 1 or version == u'5.1' and (d.month > 1 or d.month == 1 and d.day > 1)) or\ 462 self._TemporalResolution == u'monthly' and version == u'5.1': 456 self._TemporalResolution == u'monthly' and version == u'5.1': # TODO: Check this logic for nighttime 463 457 464 458 dataset.Close() … … 473 467 # NOAA-17 is in an opposite orbit unlike all the other 474 468 # data in the Pathfinder V5 time series." 475 476 elif d.year == 2005 and self._TemporalResolution == u'yearly': 477 dataset.Close() 478 continue 469 # 470 # Note that, according our definition, NOAA's yearly 471 # nighttime 2005 file actually begins on December 31, 472 # 2004 at 12:00:00. Therefore we have to check that 473 # d.year == 2004 if observationTime == u'nighttime'. 474 475 elif self._TemporalResolution == u'yearly': 476 observationTime = dataset.GetQueryableAttributeValue(u'ObservationTime') 477 if observationTime == u'daytime' and d.year == 2005 or observationTime == u'nighttime' and d.year == 2004: 478 dataset.Close() 479 continue 479 480 480 481 # If we got to here, the dataset is ok. Add it to the -
MGET/Branches/Jason/PythonPackage/src/GeoEco/Datasets/Virtual.py
r696 r713 318 318 data[t] = self._CachedDatasets[i].UnscaledData.__getitem__(tuple(sliceList[1:])) 319 319 elif self._CachedOldestGrid.UnscaledNoDataValue is not None: 320 self._LogWarning(_(u'There is no data in %(dn)s for the time slice %(ts)s.') % {u'dn': self._Collection.DisplayName, u'ts': tCoords[t].strftime('%Y-%m-%d %H:%M:%S')}) 320 if tCornerCoordType == 'min': 321 self._LogWarning(_(u'There is no data in %(dn)s for the time slice that starts on %(ts)s.') % {u'dn': self._Collection.DisplayName, u'ts': tCoords[t].strftime('%Y-%m-%d %H:%M:%S')}) 322 elif tCornerCoordType == 'center': 323 self._LogWarning(_(u'There is no data in %(dn)s for the time slice %(ts)s.') % {u'dn': self._Collection.DisplayName, u'ts': tCoords[t].strftime('%Y-%m-%d %H:%M:%S')}) 324 else: 325 self._LogWarning(_(u'There is no data in %(dn)s for the time slice that ends on %(ts)s.') % {u'dn': self._Collection.DisplayName, u'ts': tCoords[t].strftime('%Y-%m-%d %H:%M:%S')}) 321 326 data[t] += self._CachedOldestGrid.UnscaledNoDataValue 322 327 else: 323 self._LogWarning(_(u'There is no data in %(dn)s for the time slice %(ts)s but the datasets in this collection do not have a NoData value defined. The values of this time slice will be set to 0.') % {u'dn': self._Collection.DisplayName, u'ts': tCoords[t].strftime('%Y-%m-%d %H:%M:%S')}) 328 if tCornerCoordType == 'min': 329 self._LogWarning(_(u'There is no data in %(dn)s for the time slice that starts on %(ts)s but the datasets in this collection do not have a NoData value defined. The values of this time slice will be set to 0.') % {u'dn': self._Collection.DisplayName, u'ts': tCoords[t].strftime('%Y-%m-%d %H:%M:%S')}) 330 elif tCornerCoordType == 'center': 331 self._LogWarning(_(u'There is no data in %(dn)s for the time slice %(ts)s but the datasets in this collection do not have a NoData value defined. The values of this time slice will be set to 0.') % {u'dn': self._Collection.DisplayName, u'ts': tCoords[t].strftime('%Y-%m-%d %H:%M:%S')}) 332 else: 333 self._LogWarning(_(u'There is no data in %(dn)s for the time slice that ends on %(ts)s but the datasets in this collection do not have a NoData value defined. The values of this time slice will be set to 0.') % {u'dn': self._Collection.DisplayName, u'ts': tCoords[t].strftime('%Y-%m-%d %H:%M:%S')}) 324 334 325 335 t += 1 -
MGET/Branches/Jason/PythonPackage/src/GeoEco/__init__.py
r688 r713 1 __version__ = u'0.8a2 1'1 __version__ = u'0.8a22'
