Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function SimpleChain1(conf,inputs,outputs){
- // Create all required ZOO.formats
- var fGJ=new ZOO.Format.GeoJSON();
- var fGML=new ZOO.Format.GML();
- // Read the input GML
- var inputData=fGML.read(inputs["InputData"]["value"]);
- // Compute big Buffer
- var bufferResultAsJSON=Buffer(inputData,0.015);
- // Create the Buffer result BBOX
- var bbox = new ZOO.Bounds();
- var bounds=bufferResultAsJSON[0].geometry.getVertices();
- for(var t in bounds){
- bbox.extend(bounds[t]);
- }
- var finalG=bbox.toGeometry();
- // Compute Buffer standard buffer
- var bufferResultAsJSON=Buffer(inputData,0.0015);
- // Request Difference service using Buffer result and features in the BBOX
- var result=new ZOO.Feature(finalG,{"fid": "1","name": "Result1000"});
- var myProcess2 = new ZOO.Process(zoo_url,'DifferencePy');
- var myInputs2 = {InputEntity1: { type: 'complex', value: fGJ.write(bbox.toGeometry()), mimeType: "application/json" }, InputEntity2: { type: 'complex', value: fGJ.write(bufferResultAsJSON), mimeType: "application/json"} };
- var myOutputs2= {Result: { type: 'RawDataOutput', "mimeType": "application/json" } };
- var myExecuteResult4=myProcess2.Execute(myInputs2,myOutputs2);
- return {result: ZOO.SERVICE_SUCCEEDED, outputs: [ {name:"Result", mimeType: "application/json", value: myExecuteResult4} ] };
- }
Add Comment
Please, Sign In to add comment