Example #1
0
        /// <summary>
        /// 获取单条数据记录的纬度信息
        /// </summary>
        private double[] ExtractLatInfo(byte[] geoInfo)
        {
            byte[]   lat  = new byte[4];
            double[] lats = new double[51];
            int      pt   = 0;

            for (int j = 0; j < 51; j++)
            {
                for (int i = 0; i < 4; i++)
                {
                    lat[pt++] = geoInfo[i + 8 * j];
                }
                pt      = 0;
                lats[j] = ToLocalEndian.ToFloatFromBig(lat);
            }
            return(lats);
        }
Example #2
0
        /// <summary>
        /// 获取单条数据记录的经度信息
        /// </summary>
        private double[] ExtractLonInfo(byte[] geoInfo)
        {
            byte[]   lon  = new byte[4];
            double[] lons = new double[51];
            int      pt   = 0;

            for (int j = 0; j < 51; j++)
            {
                for (int i = 4; i < 8; i++)
                {
                    lon[pt++] = geoInfo[i + 8 * j];
                }
                pt      = 0;
                lons[j] = ToLocalEndian.ToFloatFromBig(lon);
            }
            return(lons);
        }