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

Error when ordering a single pixel from command line #1

Closed
loicdtx opened this issue Mar 21, 2018 · 2 comments
Closed

Error when ordering a single pixel from command line #1

loicdtx opened this issue Mar 21, 2018 · 2 comments

Comments

@loicdtx
Copy link
Owner

loicdtx commented Mar 21, 2018

Running

gee_extract.py -s LT5 -b 1980-01-01 -lon -89.8107 -lat 20.4159  -db /tmp/gee_db.sqlite -site uxmal_point -table col_1

Returns

Traceback (most recent call last):
  File "/Users/ldutrieux/.virtualenvs/gee/bin/gee_extract.py", line 95, in <module>
    main(**vars(parsed_args))
  File "/Users/ldutrieux/.virtualenvs/gee/bin/gee_extract.py", line 22, in main
    dict_list_1 = relabel(dict_list_0, sensor)
  File "/Users/ldutrieux/git/landsat-extract-gee/geextract/__init__.py", line 241, in relabel
    dl_out = [change_keys(d, BANDS_TO_COLORS[sensor]) for d in dl]
  File "/Users/ldutrieux/git/landsat-extract-gee/geextract/__init__.py", line 241, in <listcomp>
    dl_out = [change_keys(d, BANDS_TO_COLORS[sensor]) for d in dl]
  File "/Users/ldutrieux/git/landsat-extract-gee/geextract/__init__.py", line 240, in change_keys
    return dict((dr[key], value) for (key, value) in d.items())
  File "/Users/ldutrieux/git/landsat-extract-gee/geextract/__init__.py", line 240, in <genexpr>
    return dict((dr[key], value) for (key, value) in d.items())
KeyError: 'longitude'
@albe82
Copy link

albe82 commented Aug 14, 2018

Hi, I got the same error (error extracting site 'longitude') when using batch process to extract multiple pixels.

I override it by incorporating radius of 5 m, but then I got values for two pixels (values are slightly different) for each (buffered) point. For now I just took the average of those two....

Great tool, tnx.

Regards,
Alen

@loicdtx
Copy link
Owner Author

loicdtx commented Aug 14, 2018

Thanks for the report @albe82, I'll try to work on a fix soon.

loicdtx added a commit that referenced this issue Aug 14, 2018
Author: Loïc Dutrieux <loic.dutrieux@gmail.com>

    pop some keys from dictionary list coming out of ts_extract. Should fix #1
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