Git Product home page Git Product logo

eodms-api-client's People

Contributors

m9brady avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

eodms-api-client's Issues

Download stops at size of 1KB

I am running eodms from a conda shell in Win 10 with python 3.10 and after executing eodms -c RCM --order-id myid the download initiates as intended and all the ordered files are created, but their size never exceeds 1kb. Also there is no visible progress in the terminal. It is stuck like this:

2022-10-19 11:21:05 | eodmsapi.cli | INFO | Fast-downloading for 1 order 2022-10-19 11:21:05 | eodmsapi.main | INFO | Checking status of 1 order 2022-10-19 11:21:17 | eodmsapi.main | INFO | 50/50 items ready for download 2022-10-19 11:21:17 | eodmsapi.main | INFO | 0/50 items exist locally 2022-10-19 11:21:17 | eodmsapi.main | INFO | Downloading 50 remote items RCM1_OK1971291_PK2020755_1_SC50MC_20220316_170808_HH_HV_GRD.zip: 0%| | 121/619M [00:00<?, ?B/s] RCM3_OK1971291_PK2021980_1_SC50MD_20220317_051443_HH_HV_GRD.zip: 0%| | 121/156M [00:00<22:50, 119kB/s] RCM2_OK1971292_PK2017968_1_SC50MA_20220315_053123_HH_HV_GRD.zip: 0%| | 121/712M [00:00<?, ?B/s] RCM1_OK1971292_PK2020756_1_SC50MC_20220316_170808_HH_HV_GRD.zip: 0%| | 121/677M [00:00<?, ?B/s] RCM3_OK1971292_PK2028828_1_SC50MA_20220319_053137_HH_HV_GRD.zip: 0%| | 121/785M [00:00<?, ?B/s] RCM3_OK1971292_PK2021981_2_SC50MD_20220317_051443_HH_HV_GRD.zip: 0%| | 121/280M [00:00<?, ?B/s] RCM2_OK1799892_PK2018094_1_QP9_20220315_053153_HH_VV_HV_VH_SLC.zip: 0%| | 121/453M [00:00<?, ?B/s] RCM2_OK1971291_PK2035215_1_SC50MD_20220325_051432_HH_HV_GRD.zip: 0%| | 121/156M [00:00<?, ?B/s] RCM2_OK1955819_PK2052959_1_QP10_20220410_164420_HH_VV_HV_VH_SLC.zip: 0%| | 121/511M [00:00<?, ?B/s] RCM2_OK1971292_PK2027085_1_SC50MA_20220318_165213_HH_HV_GRD.zip: 0%| | 121/1.91G [00:00<?, ?B/s] RCM3_OK1971292_PK2021981_1_SC50MD_20220317_051443_HH_HV_GRD.zip: 0%| | 121/1.96G [00:00<?, ?B/s] RCM2_OK1971291_PK2027082_1_SC50MA_20220318_165213_HH_HV_GRD.zip: 0%| | 121/449M [00:00<?, ?B/s] RCM2_OK1971292_PK2035216_2_SC50MD_20220325_051432_HH_HV_GRD.zip: 0%| | 121/280M [00:00<?, ?B/s] RCM2_OK1971291_PK2029731_1_SC50MC_20220320_170819_HH_HV_GRD.zip: 0%| | 121/619M [00:00<?, ?B/s] RCM3_OK1799892_PK2031123_1_QP11_20220321_164431_HH_VV_HV_VH_SLC.zip: 0%| | 121/557M [00:00<?, ?B/s] RCM1_OK1799892_PK2031900_1_QP22_20220322_052341_HH_VV_HV_VH_SLC.zip: 0%|

There is no error message or an indication that the connection might be affected. Is this a server side issue or do I have to fix something locally?

Thanks and best regards

could not query NAPL

Got a KeyError when I tried to query NAPL.

eodms -c NAPL -g query_aoi.geojson --verbose
2022-09-14 22:45:06 | eodmsapi.cli | DEBUG | Connecting to EODMS
Enter EODMS username: cmancuso
Enter EODMS password:
2022-09-14 22:45:11 | eodmsapi.cli | DEBUG | Connected to EODMS
2022-09-14 22:45:11 | eodmsapi.cli | INFO | Querying EODMS API
2022-09-14 22:45:13 | eodmsapi.main | WARNING | No results found
Traceback (most recent call last):
File "/home/cmancuso/miniconda3/envs/eodms-env/lib/python3.10/site-packages/pandas/core/indexes/base.py", line 3629, in get_loc
return self._engine.get_loc(casted_key)
File "pandas/_libs/index.pyx", line 136, in pandas._libs.index.IndexEngine.get_loc
File "pandas/_libs/index.pyx", line 163, in pandas._libs.index.IndexEngine.get_loc
File "pandas/_libs/hashtable_class_helper.pxi", line 5198, in pandas._libs.hashtable.PyObjectHashTable.get_item
File "pandas/_libs/hashtable_class_helper.pxi", line 5206, in pandas._libs.hashtable.PyObjectHashTable.get_item
KeyError: 'Incidence Angle (Low)'

Submitting a list of IDs to order

Submitted:

eodms -c Radarsat2 --record-ids ListOfIdsToDownload.txt --dump-results

Received this:

2021-02-12 10:47:52 | eodmsapi.cli | INFO | Fast-ordering for 54 record(s)
2021-02-12 10:47:52 | eodmsapi.main | INFO | Submitting order for 1 item
2021-02-12 10:47:52 | eodmsapi.cli | INFO | EODMS Order Ids for tracking progress: ['229386']
Traceback (most recent call last):
  File "c:\users\username\appdata\local\continuum\anaconda3\envs\tf2\lib\runpy.py", line 193, in _run_module_as_main
    "__main__", mod_spec)
  File "c:\users\username\appdata\local\continuum\anaconda3\envs\tf2\lib\runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "C:\Users\username\AppData\Local\Continuum\anaconda3\envs\tf2\Scripts\eodms.exe\__main__.py", line 7, in <module>
  File "c:\users\username\appdata\local\continuum\anaconda3\envs\tf2\lib\site-packages\click\core.py", line 764, in __call__
    return self.main(*args, **kwargs)
  File "c:\users\username\appdata\local\continuum\anaconda3\envs\tf2\lib\site-packages\click\core.py", line 717, in main
    rv = self.invoke(ctx)
  File "c:\users\username\appdata\local\continuum\anaconda3\envs\tf2\lib\site-packages\click\core.py", line 956, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "c:\users\username\appdata\local\continuum\anaconda3\envs\tf2\lib\site-packages\click\core.py", line 555, in invoke
    return callback(*args, **kwargs)
  File "c:\users\username\appdata\local\continuum\anaconda3\envs\tf2\lib\site-packages\eodms_api_client\cli.py", line 257, in cli
    's' if n_results != 1 else '',
UnboundLocalError: local variable 'n_results' referenced before assignment

Still got an email from EODMS saying they are preparing my order for the file ListOfIdsToDownload.txt
ListOfIdsToDownload.txt

Could not query multiple beam modes

Tried to query multiple beam modes in one query but only got one beam mode or all of them.

Tried:

x = EodmsAPI('RCM')
x.query(start='2019-07-01', end='2020-10-20', geometry='Data/CG_EODMS_Query.geojson', polarization='HH HV',
       beam_mode='Low Noise Med Resolution 50m Low Resolution 100m')

Got all beam modes.

And

x = EodmsAPI('RCM')
x.query(start='2019-07-01', end='2020-10-20', geometry='Data/CG_EODMS_Query.geojson', polarization='HH HV',
       beam_mode=['Low Noise, Med Resolution 50m, Low Resolution 100m'])

Only got the first beam mode in the list. Note: if I change the order of the beam modes in the list, I get the first beam mode.

For now, I use all the beam modes and sort the results post query. Thanks!

API currently broken

Describe the bug
EODMS API was updated alongside a server version upgrade and has several changes in behaviour

To Reproduce
Try to order/download using this package

Additional context
Searching:

  • working as expected

Ordering:

  • "works" in that it submits an order that is accepted by EODMS
  • As of 2022-04-06 14:45 Eastern no orders submitted by API get past the SUBMITTED stage
    • this behaviour occurs regardless if using this package or NRCan's
    • my guess is that there is a server-side issue that is blocking processing
  • workaround: use the EODMS web interface until API is patched

Downloading:

  • Unable to query API by OrderId for order statuses
    • supplying the ?orderId=<num> parameter used to provide only the scenes that belong to an order but now it always responds with the last-100-ordered scenes
    • this behaviour is a regression of a previous bug - see context/discussion in #3
    • server-side issue
  • workaround: use the EODMS web interface until API is patched

Order ID appears to be off-by-one

Describe the bug
The request IDs on the website seem to be 1 higher than the one returned by the client.query() method.

To Reproduce
Query and order products from RCM. Navigate to the portal -> My Orders. Compare the Order ID column from the portal to the order ID in the query results.

Expected behavior
Order ids should match.

Additional context
Package version: 1.0.1

Issue with polarization filter -rp

When querying with the polarization filter I get 0 results but if I remove the filter, I get 932 results which most of them have the desired polarization HH+HV.

eodms -c RCM -s 2019-08-01 -e 2020-07-31 -g "G:\Shapefile\CG_EODMS_Query.geojson" -rp "HH+HV" -dr

The geojson polygon file.
https://geojson.io/#map=7/68.094/-111.643

I noticed that in the attribute table the polarization appears as "HH HV". Issue with the "+" in the query input?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.