Skip to content

Commit 48a92ec

Browse files
[SAFE.geo_grid] added "swath" attribute
1 parent cbcbc63 commit 48a92ec

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

pyroSAR/drivers.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1740,6 +1740,7 @@ def geo_grid(self, outname=None, driver=None, overwrite=True):
17401740
vec = Vector(driver='Memory')
17411741
vec.addlayer('geogrid', 4326, ogr.wkbPoint25D)
17421742
field_defs = [
1743+
("swath", ogr.OFTString),
17431744
("azimuthTime", ogr.OFTDateTime),
17441745
("slantRangeTime", ogr.OFTReal),
17451746
("line", ogr.OFTInteger),
@@ -1754,9 +1755,11 @@ def geo_grid(self, outname=None, driver=None, overwrite=True):
17541755
for ann in annotations:
17551756
with self.getFileObj(ann) as ann_xml:
17561757
tree = ET.fromstring(ann_xml.read())
1758+
swath = tree.find(".//adsHeader/swath").text
17571759
points = tree.findall(".//geolocationGridPoint")
17581760
for point in points:
17591761
meta = {child.tag: child.text for child in point}
1762+
meta["swath"] = swath
17601763
x = float(meta.pop("longitude"))
17611764
y = float(meta.pop("latitude"))
17621765
z = float(meta.pop("height"))

0 commit comments

Comments
 (0)