function is_inline($point=array(), $poly=array()){
    $point_x = $point['x'];
    $point_y = $point['y'];

    $in_line = false;
    for ($i=0, $L=count($poly),$j=$L - 1; $i < $L; $j = $i, $i++){

        //获取相邻2个点
        $sx = $poly[$i]['x'];
        $sy = $poly[$i]['y'];
        $tx = $poly[$j]['x'];
        $ty = $poly[$j]['y'];

        // 点与多边形顶点重合
        if(($sx === $point_x && $sy === $point_y) || ($tx === $point_x && $ty === $point_y)) {
            return true;
        }

        // 判断线段两端点是否在射线两侧
        if(($sy < $point_y && $ty >= $point_y) || ($sy >= $point_y && $ty < $point_y)) {
            // 线段上与射线 Y 坐标相同的点的 X 坐标
            $x = $sx + ($point_y - $sy) * ($tx - $sx) / ($ty - $sy);

            // 点在多边形的边上
            if($x === $point_x) {
                return true;
            }

            // 射线穿过多边形的边界
            if($x > $point_x) {$in_line = !$in_line; }
        }
    }
    return $in_line;
}