public void WktFromRdf() { OpenSearchClient.baseUrlArg.Add("http://eo-virtual-archive4.esa.int/search/ASA_IM__0P/ASA_IM__0CNPDE20120407_061242_000000173113_00250_52850_6352.N1/rdf"); OpenSearchClient.metadataPaths.Add("wkt"); MemoryStream ms = new MemoryStream(); client.ProcessQuery(ms); ms.Seek(0, SeekOrigin.Begin); var wkt = Encoding.UTF8.GetString(ms.ToArray()); Assert.AreEqual("MULTIPOLYGON(((-121.758523 37.489391,-120.940872 37.601472,-121.187833 38.74263,-122.004685 38.630714,-121.758523 37.489391)))\n", wkt); }
public void Issue5() { OpenSearchClient.baseUrlArg.Add("https://data2.terradue.com/eop/s1-cache/dataset/search?format=atom&uid=S1A_IW_SLC__1SDV_20160524T160839_20160524T160906_011403_011568_F048"); OpenSearchClient.metadataPaths.Add("enclosure"); OpenSearchClient.dataModelParameterArgs.Add("enclosure:scheme=http"); MemoryStream ms = new MemoryStream(); client.ProcessQuery(ms); ms.Seek(0, SeekOrigin.Begin); var enclosure = Encoding.UTF8.GetString(ms.ToArray()); Assert.AreEqual("http://download.terradue.com/sentinel-1/2016/05/24/S1A_IW_SLC__1SDV_20160524T160839_20160524T160906_011403_011568_F048.zip\n", enclosure); }
public void Landsat8EOP() { OpenSearchClient.baseUrlArg.Add("http://cwic.wgiss.ceos.org/opensearch/datasets/Landsat_8/osdd.xml?clientId=foo"); OpenSearchClient.metadataPaths.Add("{}"); OpenSearchClient.parameterArgs.Add("count=1"); OpenSearchClient.parameterArgs.Add("timeStart=2016-05-03T00:27:10Z"); OpenSearchClient.parameterArgs.Add("timeEnd=2016-05-03T00:27:40Z"); OpenSearchClient.queryModelArg = "EOP"; MemoryStream ms = new MemoryStream(); client.ProcessQuery(ms); ms.Seek(0, SeekOrigin.Begin); var xr = XmlReader.Create(ms); XDocument doc = XDocument.Load(xr); doc.Save("../../out/landsattest.xml"); }
public void S1EOP() { OpenSearchClient.baseUrlArg.Add("http://scihub.terradue.com/apihub/odata/v1"); OpenSearchClient.metadataPaths.Add("{}"); OpenSearchClient.parameterArgs.Add("count=1"); OpenSearchClient.parameterArgs.Add("profile=eop"); OpenSearchClient.parameterArgs.Add("uid=S1A_IW_GRDH_1SDV_20160510T000021_20160510T000040_011189_010E6C_BFCE"); OpenSearchClient.queryModelArg = "Scihub"; MemoryStream ms = new MemoryStream(); client.ProcessQuery(ms); ms.Seek(0, SeekOrigin.Begin); var xr = XmlReader.Create(ms); XDocument doc = XDocument.Load(xr); doc.Save("../../out/scihubS1eop.xml"); }