spedas / bleeding_edge

IDL-based Space Physics Environment Data Analysis Software (bleeding edge)
http://www.spedas.org
Other
7 stars 0 forks source link

Loading KOMPSAT data in IDL 9.0? #155

Open jameswilburlewis opened 2 months ago

jameswilburlewis commented 2 months ago

From Nick:

IDL 9.0 has a new class, HttpRequest, which may be able to handle the ESA HAPI server complicated authentication. (Or it may not, I am not sure.)

https://www.nv5geospatialsoftware.com/Support/Self-Help-Tools/Help-Articles/Help-Articles-Detail/ArtMID/10220/ArticleID/24387/IDL-90-Release-Notes-Whats-New

https://www.nv5geospatialsoftware.com/docs/httprequest.html

This may work somehow, and from reading the documentation, it does accept some CURL parameters through the OPTIONS keyword. But it is not trivial. The way it has to be done is to send the username/password, receive a cookie, send the cookie with the request to create a session, receive a cookie for the session, and then send the two cookies with the HAPI query, setting some CURL parameters along the way, in order to preserve the session. I am not sure if I'll be able to do all that in IDL, with a new object that does not have many examples and documentation.

Perhaps it can be done. Perhaps they created this new object exactly for these situations, in order to have more extensive access to the underlying CURL library.

nickssl commented 1 month ago

After talking to IDL tech support, it turns out that IDL 9.0 cannot do this because there are a few bugs in the current implementation of HttpRequest. These bugs will be fixed in the upcoming IDL 9.1. So, we have to wait for the next IDL release.