Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Landsat_LST.js some problems #1

Closed
csaybar opened this issue Aug 6, 2021 · 4 comments
Closed

Landsat_LST.js some problems #1

csaybar opened this issue Aug 6, 2021 · 4 comments

Comments

@csaybar
Copy link
Member

csaybar commented Aug 6, 2021

@davemlz

x = """
var landsatALL = (landsatSR.combine(landsatTOA.select(tir), true));
"""

x = fix_identation(x)
x = normalize_fn_style(x)
x = variable_definition(x)
x = logical_operators_boolean_null_comments(x)
x = multiline_comments(x)
x = multiline_method_chain(x)
x = function_definition(x)
x = dictionary_keys(x) 
x = dictionary_object_access(x)
x = keyword_arguments_object(x) # ERROR HERE!
x = if_statement(x)
x = array_isArray(x)
x = for_loop(x) # ERROR HERE!
x = extra_work(x)

with open("/home/csaybar/Desktop/test3.py", 'w') as f:
    f.write(x)

Got:

landsatALL = (landsatSR.combine(landsatTOA.select(tir),True)

Expected:

landsatALL = (landsatSR.combine(landsatTOA.select(tir), True))
@csaybar
Copy link
Member Author

csaybar commented Aug 6, 2021

Got:

COLLECTION = ee.Dictionary({
'L4': {
'TOA': ee.ImageCollection('LANDSAT/LT04/C01/T1_TOA'),
'SR': ee.ImageCollection('LANDSAT/LT04/C01/T1_SR'),
'TIR': ['B6',]
  },
  'L5': {
'TOA': ee.ImageCollection('LANDSAT/LT05/C01/T1_TOA'),
'SR': ee.ImageCollection('LANDSAT/LT05/C01/T1_SR'),
'TIR': ['B6',]
  },
  'L7': {
'TOA': ee.ImageCollection('LANDSAT/LE07/C01/T1_TOA'),
'SR': ee.ImageCollection('LANDSAT/LE07/C01/T1_SR'),
'TIR': ['B6_VCID_1','B6_VCID_2'],
  },
  'L8': **{
'TOA': ee.ImageCollection('LANDSAT/LC08/C01/T1_TOA'),
'SR': ee.ImageCollection('LANDSAT/LC08/C01/T1_SR'),
'TIR': ['B10','B11']
  }
})

Expected:

COLLECTION = ee.Dictionary({
'L4': {
'TOA': ee.ImageCollection('LANDSAT/LT04/C01/T1_TOA'),
'SR': ee.ImageCollection('LANDSAT/LT04/C01/T1_SR'),
'TIR': ['B6']
  },
  'L5': {
'TOA': ee.ImageCollection('LANDSAT/LT05/C01/T1_TOA'),
'SR': ee.ImageCollection('LANDSAT/LT05/C01/T1_SR'),
'TIR': ['B6']
  },
  'L7': {
'TOA': ee.ImageCollection('LANDSAT/LE07/C01/T1_TOA'),
'SR': ee.ImageCollection('LANDSAT/LE07/C01/T1_SR'),
'TIR': ['B6_VCID_1','B6_VCID_2'],
  },
  'L8': {
'TOA': ee.ImageCollection('LANDSAT/LC08/C01/T1_TOA'),
'SR': ee.ImageCollection('LANDSAT/LC08/C01/T1_SR'),
'TIR': ['B10','B11']
  }
})

davemlz added a commit that referenced this issue Aug 8, 2021
@davemlz
Copy link
Collaborator

davemlz commented Aug 8, 2021

Fixed! 🚀

The COLLECTION variable is correct since in the original .js file those lists are defined exactly like that :)

@davemlz davemlz closed this as completed Aug 8, 2021
@davemlz davemlz reopened this Aug 8, 2021
@davemlz
Copy link
Collaborator

davemlz commented Aug 8, 2021

Re-opened. I didn't see the "**{". Working on it.

davemlz added a commit that referenced this issue Aug 8, 2021
@davemlz
Copy link
Collaborator

davemlz commented Aug 8, 2021

Fixed! 🚀

@davemlz davemlz closed this as completed Aug 8, 2021
davemlz added a commit that referenced this issue Aug 8, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants