|
|
@ -7,16 +7,20 @@ const MString CopernicusCatalog::caturl = "https://stac.marine.copernicus.eu/met |
|
|
|
|
|
|
|
|
|
|
|
CopernicusCatalog::CopernicusCatalog() |
|
|
|
CopernicusCatalog::CopernicusCatalog() |
|
|
|
{ |
|
|
|
{ |
|
|
|
// Cache
|
|
|
|
|
|
|
|
auto oldprefix = michlib::GPL.UsePrefix("COPERNICUS"); |
|
|
|
auto oldprefix = michlib::GPL.UsePrefix("COPERNICUS"); |
|
|
|
|
|
|
|
// Cache
|
|
|
|
cache.reset(CreateCache(michlib::GPL.ParameterSValue("Cache", ""))); |
|
|
|
cache.reset(CreateCache(michlib::GPL.ParameterSValue("Cache", ""))); |
|
|
|
michlib::GPL.UsePrefix(oldprefix); |
|
|
|
|
|
|
|
if(!cache) |
|
|
|
if(!cache) |
|
|
|
{ |
|
|
|
{ |
|
|
|
michlib::errmessage("Can't init cache"); |
|
|
|
michlib::errmessage("Can't init cache"); |
|
|
|
cache.reset(new FakeCache); |
|
|
|
cache.reset(new FakeCache); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// Proxy
|
|
|
|
|
|
|
|
auto proxyurl = michlib::GPL.ParameterSValue("Proxy", ""); |
|
|
|
|
|
|
|
if(proxyurl.Exist()) curl_easy_setopt(chandle, CURLOPT_PROXY, proxyurl.Buf()); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
michlib::GPL.UsePrefix(oldprefix); |
|
|
|
GetCatalog(); |
|
|
|
GetCatalog(); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|