public BytesWritable evaluate(BytesWritable geomref) {
    if (geomref == null || geomref.getLength() == 0) {
      LogUtils.Log_ArgumentsNull(LOG);
      return null;
    }

    OGCGeometry ogcGeometry = GeometryUtils.geometryFromEsriShape(geomref);
    if (ogcGeometry == null) {
      LogUtils.Log_ArgumentsNull(LOG);
      return null;
    }

    if (GeometryUtils.getType(geomref) == GeometryUtils.OGCType.ST_LINESTRING) {
      MultiPath lines = (MultiPath) (ogcGeometry.getEsriGeometry());
      int wkid = GeometryUtils.getWKID(geomref);
      SpatialReference spatialReference = null;
      if (wkid != GeometryUtils.WKID_UNKNOWN) {
        spatialReference = SpatialReference.create(wkid);
      }
      return GeometryUtils
          .geometryToEsriShapeBytesWritable(OGCGeometry.createFromEsriGeometry(lines.getPoint(0), spatialReference));
    } else {
      LogUtils.Log_InvalidType(LOG, GeometryUtils.OGCType.ST_LINESTRING, GeometryUtils.getType(geomref));
      return null;
    }
  }
Return the first point of the ST_Linestring.
@param geomref hive geometry bytes
@return byte-reference of the first ST_Point
ql/src/java/org/apache/hadoop/hive/ql/udf/esri/ST_StartPoint.java