Skip to content

Commit

Permalink
remove crs from ee query output
Browse files Browse the repository at this point in the history
(bugs in Landsat images)
  • Loading branch information
Gonzalo Mateo Garcia committed Nov 14, 2023
1 parent 31b67c8 commit 06b92db
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion georeader/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
__version__ = "1.0.3"
__version__ = "1.0.4"

import math
from typing import Tuple, Any, Union
Expand Down
3 changes: 1 addition & 2 deletions georeader/readers/ee_query.py
Original file line number Diff line number Diff line change
Expand Up @@ -255,13 +255,12 @@ def img_collection_to_feature_collection(img_col:ee.ImageCollection,

properties = ee.List(properties)

def extractFeatures(img):
def extractFeatures(img:ee.Image) -> ee.Feature:
values = properties.map(lambda prop: img.get(prop))
dictio = ee.Dictionary.fromLists(properties, values)
dictio = dictio.set("gee_id", img.id())
if band_crs is not None:
proj = img.select(band_crs).projection()
dictio = dictio.set("crs_product", proj.crs())
dictio = dictio.set("proj", proj)

return ee.Feature(img.geometry(), dictio)
Expand Down
1 change: 1 addition & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ def read(rel_path):
here = os.path.abspath(os.path.dirname(__file__))
with codecs.open(os.path.join(here, rel_path), 'r') as fp:
return fp.read()

def get_version(rel_path):
for line in read(rel_path).splitlines():
if line.startswith('__version__'):
Expand Down

0 comments on commit 06b92db

Please sign in to comment.