if (channel instanceof FileOutputChannel) {
String sFilename = ((FileOutputChannel) channel).getFilename();
createBaseDir(sFilename);
sName = sName.replaceAll(" ", "_");
IVectorLayer vectorLayer = new ShpLayerFactory().create(sName,
iShapeType, types, sFields, sFilename, crs);
return vectorLayer;
} else {
throw new UnsupportedOutputChannelException();
}