case Point:
case MultiPoint:
resultDouble.set(0.);
break;
default:
MultiPath lines = (MultiPath)(esriGeom);
int nPath = lines.getPathCount();
double length = 0.;
for (int ix = 0; ix < nPath; ix++) {
int curPt = lines.getPathStart(ix);
int pastPt = lines.getPathEnd(ix);
Point fromPt = lines.getPoint(curPt);
Point toPt = null;
for (int vx = curPt+1; vx < pastPt; vx++) {
toPt = lines.getPoint(vx);
length += GeometryEngine.geodesicDistanceOnWGS84(fromPt, toPt);
fromPt = toPt;
}
}
resultDouble.set(length);