def get_properties(self): """ Return a ceda_di.metadata.product.Properties object populated with the file's metadata. :returns: A ceda_di.metadata.product.Properties object """ filesystem = super(EXIF, self).get_filesystem(self.fname) data_format = { "format": os.path.splitext(self.fname)[1][1:] } try: geospatial = self.get_geospatial() temporal = self.get_temporal() except KeyError: self.logger.warning("Could not extract metadata from EXIF XML: %s" % self.fname) temporal = None geospatial = None props = product.Properties(filesystem=filesystem, spatial=geospatial, temporal=temporal, data_format=data_format) return props
def get_properties(self): """ Returns ceda_di.metadata.properties.Properties object containing geospatial and temporal metadata from file. :returns: Metadata.product.Properties object """ geospatial = self.get_geospatial() temporal = self.get_temporal() # File system metadata filesystem = super(SAFESentinelBase, self).get_filesystem(self.fname) self._update_filesystem_metadata(filesystem) data_format = {"format": "SAFE"} # Gather up extra metadata extra_metadata = {} for key in ("platform", "product_info", "orbit_info"): if self.sections.get(key): extra_metadata[key] = self.sections[key] # Set extra content from existing content and filename self._update_extra_metadata(extra_metadata) props = product.Properties(spatial=geospatial, temporal=temporal, filesystem=filesystem, data_format=data_format, **extra_metadata) return props
def get_properties(self): """ Returns ceda_di.metadata.properties.Properties object containing geospatial and temporal metadata from file. :returns: Metadata.product.Properties object """ geospatial = self.get_geospatial() temporal = self.get_temporal() filesystem = super(HDF4, self).get_filesystem(self.fname) data_format = { "format": "HDF4", } instrument = arsf.Hyperspectral.get_instrument(filesystem["filename"]) flight_info = arsf.Hyperspectral.get_flight_info( filesystem["filename"]) props = product.Properties(spatial=geospatial, temporal=temporal, filesystem=filesystem, data_format=data_format, instrument=instrument, flight_info=flight_info) return props
def get_properties(self): """ :return dict: A dictionary containing the GRIB file's properties. """ properties = product.Properties(filesystem=self.get_filesystem( self.fname), temporal=self.get_temporal(), data_format=self.get_data_format(), spatial=self.get_geospatial(), parameters=self.get_parameters()) return properties
def get_properties(self): """ Return a metadata.product.Properties object populated with metadata. :returns: Properties object populated with metadata """ data_format = {"format": ("NetCDF/%s" % self.convention)} return product.Properties(temporal=self.get_temporal(), filesystem=self.get_filesystem(self.fpath), spatial=self.get_geospatial(), data_format=data_format, parameters=self.get_parameters())
def get_properties(self): """ :return: """ properties = product.Properties( filesystem=self.get_filesystem(self.fname), temporal=self.get_temporal(), data_format=self.get_data_format(), spatial=self.get_geospatial(), parameters=self.get_parameters() ) return properties
def get_properties(self): """ Return a metadata.product.Properties object populated with metadata. :returns: Properties object populated with metadata """ data_format = {"format": ("NetCDF/%s" % self.convention)} filesystem = self.get_filesystem(self.fpath) flight_info = NetCDF_Base.get_flight_info(filesystem["filename"]) return product.Properties(temporal=self.get_temporal(), filesystem=filesystem, spatial=self.get_geospatial(), data_format=data_format, parameters=self.get_parameters(), flight_info=flight_info)
def get_properties(self): """ return product properties :return: products properties """ geospatial = self.get_geospatial() temporal = self.get_temporal() filesystem = self.get_filesystem(self._filenames[0]) parameters = self.get_parameters() data_format = {"format": get_file_format(self._filenames)} indexer = get_product_full_name(self._filenames) index_entry_creation = {"indexer": indexer} props = product.Properties(spatial=geospatial, temporal=temporal, filesystem=filesystem, data_format=data_format, parameters=parameters, index_entry_creation=index_entry_creation) return props