gera-richarte commited on
Commit
5511c20
1 Parent(s): 6040861

fix(neon): neon bounds and CSR are not coherent, fixing it in earthview.py

Browse files
Files changed (1) hide show
  1. earthview.py +8 -1
earthview.py CHANGED
@@ -76,7 +76,7 @@ def item_to_images(subset, item):
76
  """
77
  Converts the images within an item (arrays), as retrieved from the dataset to proper PIL.Image
78
 
79
- subset: The name of the Subset, one of "satellogic", "default", "sentinel-1"
80
  item: The item as retrieved from the subset
81
 
82
  returns the item, with arrays converted to PIL.Image
@@ -149,6 +149,13 @@ def item_to_images(subset, item):
149
  for image in item["1m"]
150
  ]
151
  count = len(item["rgb"])
 
 
 
 
 
 
 
152
 
153
  item["metadata"]["count"] = count
154
  return item
 
76
  """
77
  Converts the images within an item (arrays), as retrieved from the dataset to proper PIL.Image
78
 
79
+ subset: The name of the Subset, one of "satellogic", "neon", "sentinel-1"
80
  item: The item as retrieved from the subset
81
 
82
  returns the item, with arrays converted to PIL.Image
 
149
  for image in item["1m"]
150
  ]
151
  count = len(item["rgb"])
152
+ bounds = item["metadata"]["bounds"]
153
+
154
+ # swap pairs
155
+ item["metadata"]["bounds"] = [bounds[i+1-l] for i in range(0, len(bounds), 2) for l in range(2)]
156
+
157
+ # fix CRS
158
+ item["metadata"]["epsg"] = "EPSG:4326"
159
 
160
  item["metadata"]["count"] = count
161
  return item