Skip to content

Commit

Permalink
fixes kml output failure on non-spatial results
Browse files Browse the repository at this point in the history
  • Loading branch information
kim committed Mar 22, 2024
1 parent ad70e8b commit bd5acc3
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion asf_search/export/kml.py
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,9 @@ def getItem(self, p):
outerBondaryIs.append(linearRing)

coordinates = ETree.Element('coordinates')
coordinates.text = '\n' + (14 * ' ') + ('\n' + (14 * ' ')).join([f"{c['Longitude']},{c['Latitude']},2000" for c in p['shape']]) + '\n' + (14 * ' ')

if p.get('shape') is not None:
coordinates.text = '\n' + (14 * ' ') + ('\n' + (14 * ' ')).join([f"{c['Longitude']},{c['Latitude']},2000" for c in p.get('shape')]) + '\n' + (14 * ' ')
linearRing.append(coordinates)

self.indent(placemark, 3)
Expand Down

0 comments on commit bd5acc3

Please sign in to comment.