double left;
double right;
double top;
double bottom;
int zoom;
Bound newBound = null;
String origin = null;
boolean remove;
remove = getBooleanArgument(taskConfig, ARG_REMOVE, DEFAULT_REMOVE);
if (!remove) {
origin = getStringArgument(taskConfig, ARG_ORIGIN, DEFAULT_ORIGIN);
left = getDoubleArgument(taskConfig, ARG_LEFT, DEFAULT_LEFT);
right = getDoubleArgument(taskConfig, ARG_RIGHT, DEFAULT_RIGHT);
top = getDoubleArgument(taskConfig, ARG_TOP, DEFAULT_TOP);
bottom = getDoubleArgument(taskConfig, ARG_BOTTOM, DEFAULT_BOTTOM);
zoom = getIntegerArgument(taskConfig, ARG_ZOOM, DEFAULT_ZOOM);
if (doesArgumentExist(taskConfig, ARG_X1)) {
int x1 = getIntegerArgument(taskConfig, ARG_X1);
left = xToLon(zoom, x1);
right = xToLon(zoom, getIntegerArgument(taskConfig, ARG_X2, x1) + 1);
}
if (doesArgumentExist(taskConfig, ARG_Y1)) {
int y1 = getIntegerArgument(taskConfig, ARG_Y1);
top = yToLat(zoom, y1);
bottom = yToLat(zoom, getIntegerArgument(taskConfig, ARG_Y2, y1) + 1);
}
newBound = new Bound(right, left, top, bottom, origin);
}
return new SinkSourceManager(taskConfig.getId(),
new BoundSetter(newBound), taskConfig.getPipeArgs());
}