try {
Polyline linestring = new Polyline();
linestring.startPath(xyPairs[0].get(), xyPairs[1].get());
for (int i=2; i<xyPairs.length; i+=2) {
linestring.lineTo(xyPairs[i].get(), xyPairs[i+1].get());
}
return GeometryUtils.geometryToEsriShapeBytesWritable(OGCGeometry.createFromEsriGeometry(linestring, null));
} catch (Exception e) {
LogUtils.Log_InternalError(LOG, "ST_LineString: " + e);