I am using geoscript to reproject a layer in my geoserver.
I can use geoserver/catalog to access a layer's projection with no issue.
However, I can't change it. My code is like this:
var catalog = require("geoserver/catalog");
var Process = require("geoscript/process").Process;
var Layer = require("geoscript/layer").Layer;
var Projection = require("geoscript/proj").Projection;
exports.process = new Process({
inputs: {
sentence: {
type: "String"
}
},
outputs: {
old: {
type: "String"
},
neo: {
type: "String"
},
temp: {
type: "Boolean"
}
},
run: function() {
var namespace = catalog.namespaces[0].alias;
var myPrj = Projection("EPSG:2008");
var myLayer = catalog.getVectorLayer("test:counties");
//catalog.getVectorLayer("test:counties").projection = myPrj;
return {
old: myLayer.projection,
neo: myPrj,
temp: myLayer.temporary
};
}
});
The code I commented line never works however wps doesn't tell me any error.
Do you know how can I fix this?
Thanks in advance.