Skip to content

Commit

Permalink
add geolocation in ASAR mapper
Browse files Browse the repository at this point in the history
  • Loading branch information
mortenwh committed Jan 29, 2025
1 parent 3cd073a commit 73d137b
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
6 changes: 4 additions & 2 deletions nansat/mappers/mapper_asar.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ class Mapper(VRT, Envisat):
http://envisat.esa.int/handbooks/asar/CNTR6-6-9.htm#eph.asar.asardf.asarrec.ASAR_Geo_Grid_ADSR
'''

def __init__(self, filename, gdalDataset, gdalMetadata, **kwargs):
def __init__(self, filename, gdalDataset, gdalMetadata, step=1, **kwargs):

'''
Parameters
Expand Down Expand Up @@ -235,7 +235,7 @@ def __init__(self, filename, gdalDataset, gdalMetadata, **kwargs):
# add bands with metadata and corresponding values to the empty VRT
self.create_bands(metaDict)

# Add oribit and look information to metadata domain
# Add orbit and look information to metadata domain
# ASAR is always right-looking
self.dataset.SetMetadataItem('ANTENNA_POINTING', 'RIGHT')
self.dataset.SetMetadataItem('ORBIT_DIRECTION',
Expand Down Expand Up @@ -293,6 +293,8 @@ def __init__(self, filename, gdalDataset, gdalMetadata, **kwargs):
self.dataset.SetMetadataItem('instrument', json.dumps(mm))
self.dataset.SetMetadataItem('platform', json.dumps(ee))

self.add_geolocation_from_ads(gdalDataset)

# Set projection
if self.dataset.GetProjection() == "":
self.dataset.SetProjection(NSR().wkt)
2 changes: 1 addition & 1 deletion nansat/nansat.py
Original file line number Diff line number Diff line change
Expand Up @@ -1241,7 +1241,7 @@ def get_transect(self, points, bands,
Parameters
----------
points : 2xN list or array, N (number of points) >= 1
coordinates [[x1, x2, y2], [y1, y2, y3]]
coordinates [[x1, x2, x3], [y1, y2, y3]]
bands : list of int or string
elements of the list are band number or band Name
lonlat : bool
Expand Down

0 comments on commit 73d137b

Please sign in to comment.