/// <summary> /// GetCoverage initiates the first sequence of the chain which will be taken care progressively by this class. /// </summary> /// <param name="jobName"></param> /// <param name="record"></param> /// <param name="factory"></param> public void GetCoverage(string jobName, DataRecord record, DataFactory factory) { // Register Job with Data Tracker Console.WriteLine(jobName); DataTracker.updateJob(jobName, DataTracker.Status.RUNNING); // This may need to go away at some point.. if (!record.services.ContainsKey("wcs")) { // On Data Error provider.CallDataError(jobName); Console.WriteLine("RETURNING" + record.name); DataTracker.updateJob(jobName, DataTracker.Status.FINISHED); return; } string wcs_url = record.services["wcs"]; // Register Job with Data Tracker List <DataRecord> tempList = new List <DataRecord>(); tempList.Add(record); // Insert to tracker for this observer. InsertJob(wcs_url, wcs_download_state.Describe_Coverage, jobName); // Get WCS Capabilities // Start first download factory.Import("WCS_CAP", tempList, "url://" + wcs_url); // Build DescribeCoverage String. //string dcString = buildDescribeCoverage(record); // Build GetCoverage string //string wcsCoverageString = BuildGetCoverage(record, "EPSG:" + "4326", record.bbox, 100, 100, interpolation: "bilinear"); // GetCoverage //factory.Import("WCS_BIL", tempList, "url://" + wcsCoverageString); //while (DataTracker.CheckStatus(wcsCoverageString) != DataTracker.Status.FINISHED) { }//Console.WriteLine("WAITING"); } DataTracker.updateJob(jobName, DataTracker.Status.FINISHED); Console.WriteLine("FINISHED"); }