yatsm.mapping.classification module

Functions relevant for mapping categorical classification labels

yatsm.mapping.classification.get_classification(date, result_location, image_ds, after=False, before=False, qa=False, pred_proba=False, ndv=0, pattern='yatsm_r*', warn_on_empty=False)[source]

Output raster with classification results

Parameters:
  • date – ordinal date for prediction image
  • result_location – Location of the results
  • image_ds – Example dataset
  • after – If date intersects a disturbed period, use next available time segment
  • before – If date does not intersect a model, use previous non-disturbed time segment
  • qa – Add QA flag specifying segment type (intersect, after, or before)
  • pred_proba – Include additional band with classification value probabilities
  • ndv – NoDataValue
  • pattern – filename pattern of saved record results
  • warn_on_empty – Log warning if result contained no result records (default: False)
Returns:

2D numpy array containing the classification map for the

date specified

Return type:

np.ndarray