Skip to content

Commit

Permalink
#472 adding filename into init_empty
Browse files Browse the repository at this point in the history
  • Loading branch information
aanersc committed Jun 29, 2020
1 parent 74ecaf5 commit 54e6df1
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions nansat/mappers/mapper_sentinel1_l1.py
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ def __init__(self, filename, gdalDataset, gdalMetadata, fast=False, fixgcp=True,
manifest_data = self.read_manifest_data(manifest_files[0])

# very fast constructor without any bands only with some metadata and geolocation
self._init_empty(manifest_data, self.annotation_data)
self._init_empty(manifest_data, self.annotation_data,filename)

# skip adding bands in the fast mode and RETURN
if fast:
Expand Down Expand Up @@ -463,7 +463,7 @@ def read_annotation(self, annotation_files):

return data

def _init_empty(self, manifest_data, annotation_data):
def _init_empty(self, manifest_data, annotation_data,filename):
""" Fast initialization from minimum of information
Parameters
Expand Down Expand Up @@ -496,6 +496,8 @@ def _init_empty(self, manifest_data, annotation_data):
self.dataset.SetMetadataItem('data_center', json.dumps(pti.get_gcmd_provider('ESA/EO')))
self.dataset.SetMetadataItem('iso_topic_category', json.dumps(pti.get_iso19115_topic_category('Oceans')))
self.dataset.SetMetadataItem('summary', platform_name + ' SAR data')

self.dataset.SetMetadataItem('entry_id', filename.split(".", -1)[0].split("/",-1)[-1])
self.dataset.FlushCache()

def correct_geolocation_data(self):
Expand Down

0 comments on commit 54e6df1

Please sign in to comment.