Skip to content

Commit

Permalink
Merge pull request #741 from asfadmin/nisar-dataset
Browse files Browse the repository at this point in the history
NISAR Dataset
  • Loading branch information
SpicyGarlicAlbacoreRoll authored Feb 28, 2024
2 parents 8818e24 + 90641cb commit 3a24206
Show file tree
Hide file tree
Showing 2 changed files with 81 additions and 11 deletions.
71 changes: 69 additions & 2 deletions SearchAPI/CMR/Translate/datasets.py
Original file line number Diff line number Diff line change
Expand Up @@ -114,8 +114,8 @@
"OPERA-S1": [
"C2777443834-ASF",
"C2777436413-ASF",
"C2795135174-ASF", # RTC-STATIC
"C2795135668-ASF", # CSLC-STATIC
"C2795135174-ASF", # RTC-STATIC
"C2795135668-ASF", # CSLC-STATIC
"C1258354200-ASF", # maybe extra?
"C1259982010-ASF",
"C1257995185-ASF",
Expand Down Expand Up @@ -368,4 +368,71 @@
"C1206752770-ASF",
"C1206144699-ASF",
],
# TODO: add check for item['umm']['SpatialExtent']['GranuleSpatialRepresentation'] == 'NO_SPATIAL'
"NISAR": [ # TEST ASFDEV
"C1258125097-ASFDEV",
"C1258290319-ASFDEV",
"C1258301530-ASFDEV",
"C1256535568-ASFDEV",
"C1256574227-ASFDEV",
"C1256579794-ASFDEV",
"C1256535570-ASFDEV",
"C1256583888-ASFDEV",
"C1257088418-ASFDEV",
"C1256578011-ASFDEV",
"C1256583659-ASFDEV",
"C1256737727-ASFDEV",
"C1256729502-ASFDEV",
"C1256832018-ASFDEV",
"C1256944038-ASFDEV",
"C1256802323-ASFDEV",
"C1256938783-ASFDEV",
"C1256621478-ASFDEV",
"C1256622937-ASFDEV",
"C1256983900-ASFDEV",
"C1256984645-ASFDEV",
"C1261630276-ASFDEV",
"C1258290319-ASFDEV",
# TEST
"C1258836794-ASF",
"C1258836797-ASF",
"C1258836800-ASF",
"C1257349089-ASF",
"C1257349088-ASF",
"C1257349083-ASF",
"C1257349082-ASF",
"C1257349081-ASF",
"C1257349079-ASF",
"C1257349074-ASF",
"C1257349073-ASF",
"C1257349072-ASF",
"C1257349067-ASF",
"C1257349066-ASF",
"C1257349065-ASF",
"C1257349063-ASF",
"C1257349059-ASF",
"C1257349054-ASF",
"C1257349053-ASF",
"C1257349048-ASF",
"C1257349023-ASF",
# PROD
"C2727913056-ASF",
"C2727908375-ASF",
"C2727912431-ASF",
"C2727904608-ASF",
"C2727903976-ASF",
"C2727904134-ASF",
"C2727911748-ASF",
"C2727913362-ASF",
"C2727907155-ASF",
"C2727907520-ASF",
"C2727908129-ASF",
"C2727912739-ASF",
"C2727913160-ASF",
"C2727904769-ASF",
"C2727905298-ASF",
"C2727905020-ASF",
"C2727904288-ASF",
"C2727907902-ASF",
],
}
21 changes: 12 additions & 9 deletions SearchAPI/CMR/Translate/parse_cmr_response.py
Original file line number Diff line number Diff line change
Expand Up @@ -238,16 +238,19 @@ def wkt_from_gpolygon(gpoly):
# Close the shape if needed
shapes[-1].append(shapes[-1][0])

longest = shapes[0]
for shape in shapes:
if len(shape) > len(longest):
longest = shape

wkt_shape = 'POLYGON(({0}))'.format(
','.join(['{0} {1}'.format(x['lon'], x['lat']) for x in longest])
)
if len(shapes):
longest = shapes[0]
for shape in shapes:
if len(shape) > len(longest):
longest = shape

wkt_shape = 'POLYGON(({0}))'.format(
','.join(['{0} {1}'.format(x['lon'], x['lat']) for x in longest])
)

return longest, wkt_shape
return longest, wkt_shape

return '', ''


def shape_not_closed(shapes):
Expand Down

0 comments on commit 3a24206

Please sign in to comment.