NOR Service
Created: 2011-07-15 14:11:10
Last updated: 2011-07-15 14:41:29
Automatic orthorectification of raw images, using the NOR service developed by JRC under the GENESI-DEC and GENESI-DR projects. The service supports SPOT4 and SPOT5 image types.
It takes as an input a URL that points to a raw zipped image. The output is a URL to a zip file that contains the ortho-rectified image.
Preview
Run
Run this Workflow in the Taverna Workbench...
Workflow Components
Authors (0)
Titles (0)
Descriptions (0)
Dependencies (0)
Inputs (1)
Name |
Description |
rawImageURL |
|
Processors (7)
Name |
Type |
Description |
REST_Service |
rest |
|
XPath_From_Text |
localworker |
Scriptimport org.dom4j.Document;
import org.dom4j.Node;
import org.dom4j.io.SAXReader;
SAXReader reader = new SAXReader(false);
reader.setIncludeInternalDTDDeclarations(false);
reader.setIncludeExternalDTDDeclarations(false);
Document document = reader.read(new StringReader(xmltext));
List nodelist = document.selectNodes(xpath);
// Process the elements in the nodelist
ArrayList outputList = new ArrayList();
ArrayList outputXmlList = new ArrayList();
String val = null;
String xmlVal = null;
for (Iterator iter = nodelist.iterator(); iter.hasNext();) {
Node element = (Node) iter.next();
xmlVal = element.asXML();
val = element.getStringValue();
if (val != null && !val.equals("")) {
outputList.add(val);
outputXmlList.add(xmlVal);
}
}
List nodelist=outputList;
List nodelistAsXML=outputXmlList; |
xpath_value |
stringconstant |
Value/wps:ExecuteResponse/@statusLocation |
Merge_String_List_to_a_String |
localworker |
ScriptString seperatorString = "\n";
if (seperator != void) {
seperatorString = seperator;
}
StringBuffer sb = new StringBuffer();
for (Iterator i = stringlist.iterator(); i.hasNext();) {
String item = (String) i.next();
sb.append(item);
if (i.hasNext()) {
sb.append(seperatorString);
}
}
concatenated = sb.toString();
|
Get_Service_Status_Result |
localworker |
ScriptURL inputURL = null;
if (base != void) {
inputURL = new URL(new URL(base), url);
}
else {
inputURL = new URL(url);
}
do {
URLConnection con = inputURL.openConnection();
InputStream in = con.getInputStream();
InputStreamReader isr = new InputStreamReader(in);
Reader inReader = new BufferedReader(isr);
StringBuffer buf = new StringBuffer();
int ch;
while ((ch = inReader.read()) > -1) {
buf.append((char)ch);
}
inReader.close();
contents = buf.toString();
// need to parse contents here
if(contents.contains("successfully")) {
state = "FINISHED";
}
else {
state = "RUNNING";
Thread.sleep(10000);
}
}
while(state.equals("RUNNING"));
//String NEWLINE = System.getProperty("line.separator");
//
//URL inputURL = null;
//if (base != void) {
// inputURL = new URL(new URL(base), url);
//} else {
// inputURL = new URL(url);
//}
//StringBuffer result = new StringBuffer();
//BufferedReader reader = new BufferedReader(new InputStreamReader(inputURL.openStream()));
//String line = null;
//while ((line = reader.readLine()) != null) {
// result.append(line);
// result.append(NEWLINE);
//}
//
//contents = result.toString();
|
XPath_From_Text_2 |
localworker |
Scriptimport org.dom4j.Document;
import org.dom4j.Node;
import org.dom4j.io.SAXReader;
SAXReader reader = new SAXReader(false);
reader.setIncludeInternalDTDDeclarations(false);
reader.setIncludeExternalDTDDeclarations(false);
Document document = reader.read(new StringReader(xmltext));
List nodelist = document.selectNodes(xpath);
// Process the elements in the nodelist
ArrayList outputList = new ArrayList();
ArrayList outputXmlList = new ArrayList();
String val = null;
String xmlVal = null;
for (Iterator iter = nodelist.iterator(); iter.hasNext();) {
Node element = (Node) iter.next();
xmlVal = element.asXML();
val = element.getStringValue();
if (val != null && !val.equals("")) {
outputList.add(val);
outputXmlList.add(xmlVal);
}
}
List nodelist=outputList;
List nodelistAsXML=outputXmlList; |
xpath_value_1 |
stringconstant |
Value/wps:ExecuteResponse/wps:ProcessOutputs/wps:Output/wps:Data/wps:LiteralData |
Outputs (1)
Name |
Description |
orthoRectifiedImageURL |
|
Datalinks (8)
Source |
Sink |
rawImageURL |
REST_Service:userID |
REST_Service:responseBody |
XPath_From_Text:xml-text |
xpath_value:value |
XPath_From_Text:xpath |
XPath_From_Text:nodelist |
Merge_String_List_to_a_String:stringlist |
Merge_String_List_to_a_String:concatenated |
Get_Service_Status_Result:url |
Get_Service_Status_Result:contents |
XPath_From_Text_2:xml-text |
xpath_value_1:value |
XPath_From_Text_2:xpath |
XPath_From_Text_2:nodelist |
orthoRectifiedImageURL |
Uploader
License
All versions of this Workflow are
licensed under:
Version 1 (earliest)
(of 2)
Credits (2)
(People/Groups)
Attributions (0)
(Workflows/Files)
None
Shared with Groups (0)
None
Featured In Packs (0)
None
Log in to add to one of your Packs
Attributed By (0)
(Workflows/Files)
None
Favourited By (1)
Statistics
Other workflows that use similar services
(0)
There are no workflows in myExperiment that use similar services to this Workflow.
Comments (0)
No comments yet
Log in to make a comment