String boundPoints = formattedString.substring(endIndex + 1).trim();
char firstChar = id.charAt(0);
boolean startsWithV = firstChar == 'V';
if (firstChar == 'C' || startsWithV) {
int canopyId = Integer.parseInt(formattedString.substring(1, beginIndex - 3));
Vector canopyCentroid = DenseVector.decodeFormat(new Text(centroid));
List<Vector> canopyBoundPoints = new ArrayList<Vector>();
while (boundPoints.length() > 0) {
int ix = boundPoints.indexOf(']');
Vector v = DenseVector.decodeFormat(new Text(boundPoints.substring(0,
ix + 1)));
canopyBoundPoints.add(v);
boundPoints = boundPoints.substring(ix + 1);
}
return new MeanShiftCanopy(canopyCentroid, canopyId, canopyBoundPoints,