Open alexander-petkov opened 3 years ago
Modest success!! This is a Javascript-defined process from the tutorials (I can't get Python to work as of yet)
Javascript code:
var Process = require("geoscript/process").Process;
exports.process = new Process({
title: "JavaScript Buffer Process",
description: "Process that buffers a geometry.",
inputs: {
geom: {
type: "Geometry",
title: "Input Geometry",
description: "The target geometry."
},
distance: {
type: "Double",
title: "Buffer Distance",
description: "The distance by which to buffer the geometry."
}
},
outputs: {
result: {
type: "Geometry",
title: "Result",
description: "The buffered geometry."
}
},
run: function(inputs) {
return {result: inputs.geom.buffer(inputs.distance)};
}
});
I've got the Python example to work as well. I still need to find the correct dependencies, because now I need to include the whole app jar to the path. The app jar is ~130MB in size.
Geoscript Groovy reference:
https://jericks.github.io/geoscript-groovy-cookbook/#introduction
Take a look at Geoscript--a platform to deploy Web Processing Services using various scripting languages, without the need to recomplie and redeploy:
Github repo: https://github.com/geoscript
Release announcement based on Geotools 24: https://groups.google.com/g/geoscript/c/_B0Ksr4TCiQ