Comments (7)
NB that the download() method now seems to expect order ID, rather than record ID... at least for the RCM product.
from eodms-api-client.
Hi, thanks for the report.
I have a warning in the docs that may pertain to this: https://eodms-api-client.readthedocs.io/en/latest/examples.html#command-line-interface-cli but there may be a case to be made of making this warning a bit more obvious to the user.
It seems that submitting an order to the EODMS API will return a seemingly-valid Order Item ID but in fact, that is not the correct ID value and it is up to the user to check against the delivery email that is sent on order completion for the "real" ID. It isn't immediately clear how these ID values are generated and why the values that get sent as a response to the API do not match what is delivered in the email, but that may be something that has to be solved on NRCan's side.
I wasn't able to figure out a way around this issue programmatically and I don't think it's as easy as just incrementing the API-returned OrderIDs by 1. However, I'd be happy to be proven wrong on this with a reproducible example.
Edit: as for the download
method, it might be better to indicate in the docstrings that it expects Order ID rather than Record ID....
from eodms-api-client.
I just ran a test with 1 RCM scene and what appears to happen is the following:
- EODMS API accepts order given a scene's RecordID (this RecordID was taken from an
EodmsAPI.query()
result geojson) - EODMS API returns an Item ID (hence
ID1
) for the scene when the order is submitted usingEodmsAPI.order()
- EODMS system does its thing
- EODMS finishes its work and generates a new Item ID (hence
ID2
) for the same scene, but in anAVAILABLE FOR DOWNLOAD
state ID1
is still a valid ID but it shows up asEXPANDED
state in the EODMS web interface and does not have any download URLs attached to itID2
is what gets sent in the "your product is ready" email from EODMS and is used by this package for downloading
In this example, ID2
is literally ID1 + 1
but I worry that if we just increment by 1 then the possibility for a collision between our order and someone else's order is possible. I doubt that it would be possible to download another user's order but you still wouldn't get what you want, which is the image(s) you asked for.
I don't fully understand why EODMS generates 2 Item IDs for the same image, and I'm not sure what the best course of action is besides:
- making the ID mismatch warning a lot more obvious to the user
- removing the
EODMS Order Ids for tracking progress
message altogether and telling the user to check their emails or the web interface
from eodms-api-client.
👀 now I understand what you mean re: OrderId instead of RecordID - it seems that the EODMS API finally allows for querying by OrderID to check status of items! For so long that was not the case and it would just return the last 100 ordered images so this is great news.
from eodms-api-client.
Hi @dsjstc I just pushed a new version v1.1.0
that uses the OrderID
instead of each RCM scene's ItemID
. Can you try upgrading and see if it fixes your issue?
CLI:
eodms -c RCM --download-id <orderid>
Python REPL/IPython
from eodms_api_client import EodmsAPI
client = EodmsAPI(collection='RCM')
client.download(order_ids=<orderid>)
from eodms-api-client.
Success confirmed with order_id, this is spectacularly awesome. Thanks so much, and glad my garbled comment was of use to you!
from eodms-api-client.
Awesome 🥳 thanks for reporting and glad that the package is useful to you!
from eodms-api-client.
Related Issues (9)
- Submitting a list of IDs to order HOT 2
- Radarsat2 collection beam mode/ beam mnemonic / product type HOT 3
- API currently broken HOT 2
- Issue with polarization filter -rp HOT 3
- Could not query multiple beam modes HOT 4
- could not query NAPL HOT 4
- Download stops at size of 1KB HOT 6
- Order placed without calling --submit-order HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from eodms-api-client.