Maison >php教程 >PHP源码 >压缩路线规划中的经纬度点集

压缩路线规划中的经纬度点集

PHP中文网
PHP中文网original
2016-05-25 17:08:442312parcourir

<?php
/**
 * @author      : hanhh
 * @create Date : 2013/1/6
 * @name        : 经纬度点集压缩
 * @Version     : 1.0
 * tags
 */
class lonlatPress {
    private $logs = array();//日志
    /*压缩点的转换*/
    private $lons = array();//简化的经度列表
    private $lats = array();//简化的纬度列表
    private $pressLonlatArr=array();//压缩后的经纬度点 
    /*字符串切割 变量*/
    private $json_start = &#39;&#39;;//api字符的开始 
    private $json_end = &#39;&#39;;//api字符的结束 
    private $json_points = &#39;&#39;;//api字符的点集  
    private $json_press_points = &#39;&#39;;//压缩字符的点集  
    private $base = 360000000;//转换基数360万
 
    private $log_in_count = 0;//输入的点的个数
    private $log_out_count = 0;//输出的点的个数
 
    public  function __construct(){  }
     
    /*接口返回数据的压缩方法*/
    function api2press($str){   
        $ret = $str;
        if($this->api_cut($str) && $this->pressLonLat($this->json_points)){
            $ret = $this->press_points();
        }       
        //log
        $logmsg[&#39;in_count&#39;] = $this->log_in_count;
        $logmsg[&#39;out_count&#39;] = $this->log_out_count;
        $logmsg[&#39;in_json&#39;] = count($this->json_points)>0?$this->json_points:$str;
        $logmsg[&#39;out_json&#39;] = count($this->json_press_points)>0?$this->json_press_points:$ret;
        //zdebug($logmsg);
        $this->__log($logmsg);
        return $ret;
    }
 
    /*压缩后的经纬度点集--array*/
    function lonlats(){
        return array($this->lons,$this->lats,$this->pressLonlatArr);
        return $this->pressLonlatArr;
    }   
    /*压缩后的经纬度点集--json*/
    function press_points(){
        $press = array();
        $press[&#39;lons&#39;] = $this->lons;
        $press[&#39;lats&#39;] = $this->lats;
        $press[&#39;pres&#39;] = $this->pressLonlatArr;
        $this->log_out_count = count($this->pressLonlatArr);
        $this->json_press_points = json_encode($press);
        $ret = $this->json_start.$this->json_press_points.$this->json_end;
        //$ret = $this->json_start.&#39;[&#39;.$this->json_press_points.&#39;]&#39;.$this->json_end;
        return $ret;
    }
    /*接口返回数据的切割方法*/
    function api_cut($txt){ 
        $t[&#39;in&#39;] = $txt;
        $t[] = $start_mark = &#39;"lines":{"unit":2,"lines":[{"points":[&#39;;
        $t[] = $end_mark = &#39;]}],"previewl":&#39;;
        $t[] = $mark_count = strlen($start_mark);
        $t[] = $start_i_pos = strpos($txt,$start_mark);//
        if ($start_i_pos === false) {   return false;       }
        $t[] = $start_i = $start_i_pos+$mark_count-1;//自身长度 + 标志串长度-最前面的"["
 
        $t[] = $end_i_pos = strpos($txt,$end_mark);
        if ($end_i_pos === false) { return false;       }
        $t[] = $end_i = $end_i_pos;
        $t[&#39;s&#39;] = $this->json_start = substr($txt,0,$start_i);
        $t[&#39;e&#39;] = $this->json_end = substr($txt,$end_i+1);//最后的"]"保留
        $t[&#39;p&#39;] = $this->json_points = substr($txt,$start_i,$end_i-$start_i+1);//最后的"]"保留
        //zdebug($t);
        return strlen($this->json_points);
    }
 
    /* 经纬度点压缩算法 */
    function pressLonLat($lonlats){
        $t[] = __FUNCTION__.&#39;-----------------------&#39;;
        $arrpoints = json_decode($lonlats,true);
        $this->log_in_count = count($arrpoints);
        if(is_array($arrpoints)){
            foreach($arrpoints as $val){
                if(is_numeric($val[&#39;lon&#39;]) && is_numeric($val[&#39;lat&#39;]) ) // 这个校验经纬度的正确性
                $t[] = $this->pressLonlatArr[] = $this->splitLonLat_hex_ignoreZero($val[&#39;lon&#39;].&#39;,&#39;.$val[&#39;lat&#39;]);
                //$t[] = $this->pressLonlatArr[] = $this->splitLonLat_value_36g($val[&#39;lon&#39;].&#39;,&#39;.$val[&#39;lat&#39;]);
            }
        }
        $t[] = __FUNCTION__.&#39;--------------------end&#39;;
        return count($this->pressLonlatArr);
    }
    /* 
    * 经纬度点压缩算法,
    * 经纬度对照表中的【值】是经纬度的整数部分【array(&#39;0&#39;=>116)】
    * 经纬度的整数部分是零时忽略掉
    * 输入:
    * 输出:
    */
    function splitLonLat_value_36g($str,$char=&#39;,&#39;){
        $t[] = __FUNCTION__.&#39;-----------------------&#39;;
        $t[] =$sparr = explode($char,$str);
        $t[] =$sparr[0] = $sparr[0] * $this->base;
        $t[] =$sparr[1] = $sparr[1] * $this->base;
         
        $t[] = __FUNCTION__.&#39;--------------------end&#39;;
        //zdebug($t);
        return $sparr[0].&#39;,&#39;.$sparr[1];
    }/* 
    * 经纬度点压缩算法,
    * 经纬度对照表中的【值】是经纬度的整数部分【array(&#39;0&#39;=>116)】
    * 经纬度的整数部分是零时忽略掉
    * 输入:
    * 输出:
    */
    function splitLonLat_hex_ignoreZero($str,$char=&#39;,&#39;){
        $t[] = __FUNCTION__.&#39;-----------------------&#39;;
        $t[] =$sparr = explode($char,$str);
        $t[] =$arrlon = $this->splitDotStr($sparr[0]);
        $t[] =$arrlat = $this->splitDotStr($sparr[1]);
        $hex_lon = $this->dec2x($arrlon[0]);
        if(!in_array($hex_lon,$this->lons)){
            $lonindex = count($this->lons);
            $this->lons[] = $hex_lon;
        }else{
            $lonindex = array_search($hex_lon,$this->lons);
        }
        $hex_lat = $this->dec2x($arrlat[0]);
        if(!in_array($hex_lat,$this->lats)){
            $latindex = count($this->lats);
            $this->lats[] = $hex_lat;
        }else{
            $latindex = array_search($hex_lat,$this->lats);
        }       
        $t[] =$lon_index_hex = $this->dec2x($lonindex,36);
        $t[] =$lat_index_hex = $this->dec2x($latindex,36);
 
        $t[] =$lonindex_str = (empty($lon_index_hex)?&#39;&#39;:$lon_index_hex.&#39;.&#39;);
        $t[] =$latindex_str = (empty($lat_index_hex)?&#39;&#39;:$lat_index_hex.&#39;.&#39;);
        $t[] =$lon_hex = $this->dec2x($arrlon[1],36);
        $t[] =$lat_hex = $this->dec2x($arrlat[1],36);
        $t[] = __FUNCTION__.&#39;--------------------end&#39;;
        //zdebug($t);
        return $lonindex_str.$lon_hex.&#39;,&#39;.$latindex_str.$lat_hex;
//      return $lonindex_str.$arrlon[1].&#39;,&#39;.$latindex_str.$arrlat[1];
    }
    /* 
    * 经纬度点压缩算法,
    * 经纬度对照表中的【值】是经纬度的整数部分【array(&#39;0&#39;=>116)】
    * 经纬度的整数部分是零时忽略掉
    * 输入:
    * 输出:
    */
    function splitLonLat_dec_ignoreZero($str,$char=&#39;,&#39;){
        $t[] = __FUNCTION__.&#39;-----------------------&#39;;
        $t[] =$sparr = explode($char,$str);
        $t[] =$arrlon = $this->splitDotStr($sparr[0]);
        $t[] =$arrlat = $this->splitDotStr($sparr[1]);
        if(!in_array($arrlon[0],$this->lons)){
            $lonindex = count($this->lons);
            $this->lons[] = $arrlon[0];
        }else{
            $lonindex = array_search($arrlon[0],$this->lons);
        }       
        if(!in_array($arrlat[0],$this->lats)){
            $latindex = count($this->lats);
            $this->lats[] = $arrlat[0];
        }else{
            $latindex = array_search($arrlat[0],$this->lats);
        }       
        $t[] =$lon_index_hex = $this->dec2x($lonindex,36);
        $t[] =$lat_index_hex = $this->dec2x($latindex,36);
 
        $t[] =$lonindex_str = (empty($lon_index_hex)?&#39;&#39;:$lon_index_hex.&#39;.&#39;);
        $t[] =$latindex_str = (empty($lat_index_hex)?&#39;&#39;:$lat_index_hex.&#39;.&#39;);
        $t[] =$lon_hex = $this->dec2x($arrlon[1],36);
        $t[] =$lat_hex = $this->dec2x($arrlat[1],36);
        $t[] = __FUNCTION__.&#39;--------------------end&#39;;
        //zdebug($t);
        return $lonindex_str.$lon_hex.&#39;,&#39;.$latindex_str.$lat_hex;
//      return $lonindex_str.$arrlon[1].&#39;,&#39;.$latindex_str.$arrlat[1];
    }
 
    /* 经纬度点压缩算法,经纬度对照表中的【值】是经纬度的整数部分【array(&#39;0&#39;=>116)】
    * 输入:
    * 输出:
    */
    function splitLonLat_value($str,$char=&#39;,&#39;){
        $t[] = __FUNCTION__.&#39;-----------------------&#39;;
        $t[] =$sparr = explode($char,$str);
        $t[] =$arrlon = $this->splitDotStr($sparr[0]);
        $t[] =$arrlat = $this->splitDotStr($sparr[1]);
        if(!in_array($arrlon[0],$this->lons)){
            $lonindex = count($this->lons);
            $this->lons[] = $arrlon[0];
        }else{
            $lonindex = array_search($arrlon[0],$this->lons);
        }       
        if(!in_array($arrlat[0],$this->lats)){
            $latindex = count($this->lats);
            $this->lats[] = $arrlat[0];
        }else{
            $latindex = array_search($arrlat[0],$this->lats);;
        }
        $t[] = __FUNCTION__.&#39;--------------------end&#39;;
        //zdebug($t);
        return $lonindex.&#39;.&#39;.$arrlon[1].&#39;,&#39;.$latindex.&#39;.&#39;.$arrlat[1];
    }
 
    /* 经纬度点压缩算法 ,经纬度对照表中的【键】是经纬度的整数部分【array(&#39;116&#39;=>0)】
    * 输入:
    * 输出:
    */
    function splitLonLat_key($str,$char=&#39;,&#39;){
        $t[] = __FUNCTION__.&#39;-----------------------&#39;;
        $t[] =$lon=$this->lons;
        $t[] =$lat=$this->lats;
        $t[] =$sparr = explode($char,$str);
        $t[] =$arrlon = $this->splitDotStr($sparr[0]);
        $t[] =$arrlat = $this->splitDotStr($sparr[1]);
        if(!array_key_exists($arrlon[0],$this->lons)){
            $lonindex = count($this->lons);
            $this->lons[$arrlon[0]] = $lonindex;
        }else{
            $lonindex = $this->lons[$arrlon[0]];
        }       
        if(!array_key_exists($arrlat[0],$this->lats)){
            $latindex = count($this->lats);
            $this->lats[$arrlat[0]] = $latindex;
        }else{
            $latindex = $this->lats[$arrlat[0]];
        }
//      //忽略 0 
//      $lonindex_str = (empty($lonindex)?&#39;&#39;:$lonindex.&#39;.&#39;);
//      $latindex_str = (empty($latindex)?&#39;&#39;:$latindex.&#39;.&#39;);
        $t[] = __FUNCTION__.&#39;--------------------end&#39;;
        //zdebug($t);
        return $lonindex.&#39;.&#39;.$arrlon[1].&#39;,&#39;.$latindex.&#39;.&#39;.$arrlat[1];
//      return $lonindex_str.$arrlon[1].&#39;,&#39;.$latindex_str.$arrlat[1];
    }
    /*分解一个由dot分开的字符串*/
    function splitDotStr($str,$char=&#39;.&#39;){
        return explode($char,$str);
    }   
/**
 *十进制转36进制 不足位数前面补零*
 *
 * @param $num 传入数据
 * @param int $bin 转换的进制可以是:2,8,16,36
 * @return 返回没有36进制的数据格式
 */
function dec2x($str){
    return base_convert($str,10,36);
}   
/**
 *十进制转36进制 不足位数前面补零*
 *
 * @param $num 传入数据
 * @param int $bin 转换的进制可以是:2,8,16,36
 * @return 返回没有36进制的数据格式
 */
function dec2x_36_end($num,$bin=36)
{
    static $arr=array(0,1,2,3,4,5,6,7,8,9,&#39;A&#39;,&#39;B&#39;,&#39;C&#39;,&#39;D&#39;,&#39;E&#39;,&#39;F&#39;,&#39;G&#39;,&#39;H&#39;,&#39;I&#39;,&#39;J&#39;,&#39;K&#39;,&#39;L&#39;,&#39;M&#39;,&#39;N&#39;,&#39;O&#39;,&#39;P&#39;,&#39;Q&#39;,&#39;R&#39;,&#39;S&#39;,&#39;T&#39;,&#39;U&#39;,&#39;V&#39;,&#39;W&#39;,&#39;X&#39;,&#39;Y&#39;,&#39;Z&#39;);
    $bytelen=ceil(16/$bin); //获得如果是$bin进制,一个字节的长度
    $aOutChar=&#39;&#39;;
    $t="";
    $num=intval($num);
    while($num>0){
        $t=$arr[$num%$bin].$t;
        $num=floor($num/$bin);
    }
    $tlen=strlen($t);
    if($tlen%$bytelen!=0){
        $pad_len=$bytelen-$tlen%$bytelen;
        $t=str_pad("",$pad_len,"0",STR_PAD_LEFT).$t; //不足一个字节长度,自动前面补充0
    }
    $aOutChar=$t;
    return $aOutChar;
} 
 
    /*lines的数据格式*/
    function hanz(){
        return &#39;{"unit":2,"lines":[{"points":[{"lon":"116.4584889","lat":"39.9245522"},{"lon":"116.4595183","lat":"39.9245439"},{"lon":"116.4595247","lat":"39.9248439"},{"lon":"116.4613472","lat":"39.9248308"},{"lon":"116.4613319","lat":"39.9235872"},{"lon":"116.4618747","lat":"39.9235803"},{"lon":"116.4619008","lat":"39.9256725"},{"lon":"116.4617444","lat":"39.9264189"},{"lon":"116.4618406","lat":"39.9379361"},{"lon":"116.4618486","lat":"39.9513561"},{"lon":"116.4617794","lat":"39.9518767"},{"lon":"116.4613456","lat":"39.9528475"},{"lon":"116.4608875","lat":"39.9534075"},{"lon":"116.4600017","lat":"39.9541775"},{"lon":"116.4500842","lat":"39.9607961"},{"lon":"116.4430425","lat":"39.9654405"},{"lon":"116.4381708","lat":"39.9685919"},{"lon":"116.4374217","lat":"39.9690211"},{"lon":"116.4370264","lat":"39.9691944"},{"lon":"116.4359053","lat":"39.9695250"},{"lon":"116.4351839","lat":"39.9696439"},{"lon":"116.4342147","lat":"39.9696764"},{"lon":"116.3989278","lat":"39.9687430"},{"lon":"116.3984086","lat":"39.9688730"},{"lon":"116.3975256","lat":"39.9688364"}]}],"previewl":15}&#39;;
    }
 
    function test_data(){
        return &#39;{"location_lat":"39.952602","isnavigate":"1","meetid":"1245678921356418731911","start_lon":"119.153130","location_lon":"119.153408","type":"2","messages":"","isenabled":"1","timeremaining":"10000","lines":{"unit":2,"lines":[{"points":[{"lon":"119.1550464","lat":"39.9554011"},{"lon":"119.1555708","lat":"39.9552492"},{"lon":"119.1557686","lat":"39.9552469"},{"lon":"119.1559286","lat":"39.9553536"},{"lon":"119.1562950","lat":"39.9559550"},{"lon":"119.1564739","lat":"39.9560372"},{"lon":"119.1600822","lat":"39.9560939"},{"lon":"119.1607506","lat":"39.9561914"},{"lon":"119.1609419","lat":"39.9561003"},{"lon":"119.1626694","lat":"39.9425108"},{"lon":"119.1628214","lat":"39.9420961"},{"lon":"119.1638867","lat":"39.9399911"},{"lon":"119.1641400","lat":"39.9395875"},{"lon":"119.1644725","lat":"39.9392272"},{"lon":"119.1659914","lat":"39.9378883"},{"lon":"119.1660569","lat":"39.9376822"},{"lon":"119.1660022","lat":"39.9355989"},{"lon":"119.1660569","lat":"39.9353186"},{"lon":"119.1661478","lat":"39.9351653"},{"lon":"119.1663931","lat":"39.9350911"},{"lon":"119.1668772","lat":"39.9351430"},{"lon":"119.1680450","lat":"39.9354667"},{"lon":"119.1690386","lat":"39.9356353"},{"lon":"119.1698525","lat":"39.9356964"},{"lon":"119.1698111","lat":"39.9346914"},{"lon":"119.1697267","lat":"39.9342317"},{"lon":"119.1688497","lat":"39.9324003"},{"lon":"119.1688175","lat":"39.9320028"},{"lon":"119.1688947","lat":"39.9315580"},{"lon":"119.1692731","lat":"39.9307794"},{"lon":"119.1708047","lat":"39.9286244"},{"lon":"119.1713625","lat":"39.9275344"},{"lon":"119.1724611","lat":"39.9256897"},{"lon":"119.1727369","lat":"39.9249739"},{"lon":"119.1736397","lat":"39.9220725"},{"lon":"119.1741581","lat":"39.9212175"},{"lon":"119.1754183","lat":"39.9196483"},{"lon":"119.1757228","lat":"39.9191536"},{"lon":"119.1758442","lat":"39.9187455"},{"lon":"119.1759592","lat":"39.9176603"},{"lon":"119.1762717","lat":"39.9168794"},{"lon":"119.1767228","lat":"39.9161544"},{"lon":"119.1780683","lat":"39.9146222"},{"lon":"119.1780772","lat":"39.9143186"},{"lon":"119.1776686","lat":"39.9137042"},{"lon":"119.1776650","lat":"39.9134586"},{"lon":"119.1782183","lat":"39.9126522"},{"lon":"119.1792594","lat":"39.9098719"},{"lon":"119.1819894","lat":"39.9031597"},{"lon":"119.1943683","lat":"39.9009028"},{"lon":"119.1979014","lat":"39.9003361"},{"lon":"119.2040233","lat":"39.8992342"},{"lon":"119.2087000","lat":"39.8983117"},{"lon":"119.2128664","lat":"39.8976019"},{"lon":"119.2144033","lat":"39.8972719"},{"lon":"119.2160178","lat":"39.8969964"},{"lon":"119.2217014","lat":"39.8962997"},{"lon":"119.2250278","lat":"39.8959564"},{"lon":"119.2256989","lat":"39.8959397"},{"lon":"119.2256764","lat":"39.8957794"},{"lon":"119.2257572","lat":"39.8956314"},{"lon":"119.2260194","lat":"39.8955836"},{"lon":"119.2261606","lat":"39.8956333"},{"lon":"119.2262261","lat":"39.8958119"},{"lon":"119.2261758","lat":"39.8959725"},{"lon":"119.2262064","lat":"39.8994097"},{"lon":"119.2260761","lat":"39.9007375"},{"lon":"119.2259808","lat":"39.9010350"},{"lon":"119.2261192","lat":"39.9097958"},{"lon":"119.2260347","lat":"39.9116664"},{"lon":"119.2258400","lat":"39.9132269"},{"lon":"119.2256189","lat":"39.9143642"},{"lon":"119.2253253","lat":"39.9154619"},{"lon":"119.2245400","lat":"39.9179689"},{"lon":"119.2240514","lat":"39.9191475"},{"lon":"119.2231808","lat":"39.9219244"},{"lon":"119.2233183","lat":"39.9223000"},{"lon":"119.2235375","lat":"39.9224847"},{"lon":"119.2264472","lat":"39.9236025"},{"lon":"119.2267858","lat":"39.9237933"},{"lon":"119.2270372","lat":"39.9240017"},{"lon":"119.2273500","lat":"39.9244139"},{"lon":"119.2274586","lat":"39.9246614"},{"lon":"119.2278064","lat":"39.9265953"},{"lon":"119.2279572","lat":"39.9270614"},{"lon":"119.2282203","lat":"39.9273567"},{"lon":"119.2284675","lat":"39.9274630"},{"lon":"119.2287739","lat":"39.9275039"},{"lon":"119.2292014","lat":"39.9274114"},{"lon":"119.2294681","lat":"39.9272094"},{"lon":"119.2296047","lat":"39.9268836"},{"lon":"119.2295481","lat":"39.9266278"},{"lon":"119.2293381","lat":"39.9263628"},{"lon":"119.2290494","lat":"39.9261953"},{"lon":"119.2277578","lat":"39.9258158"},{"lon":"119.2242533","lat":"39.9255183"},{"lon":"119.2207661","lat":"39.9253467"},{"lon":"119.2149497","lat":"39.9254380"},{"lon":"119.1938806","lat":"39.9264950"},{"lon":"119.1910500","lat":"39.9266989"},{"lon":"119.1880208","lat":"39.9268136"},{"lon":"119.1758900","lat":"39.9274194"},{"lon":"119.1712017","lat":"39.9275364"},{"lon":"119.1680664","lat":"39.9274886"},{"lon":"119.1662842","lat":"39.9273953"},{"lon":"119.1646717","lat":"39.9273697"},{"lon":"119.1608792","lat":"39.9271589"},{"lon":"119.1565950","lat":"39.9267769"},{"lon":"119.1489667","lat":"39.9257292"},{"lon":"119.1415778","lat":"39.9244683"},{"lon":"119.1375194","lat":"39.9236758"},{"lon":"119.1323397","lat":"39.9228097"},{"lon":"119.1249194","lat":"39.9214169"},{"lon":"119.1216300","lat":"39.9208572"},{"lon":"119.1174392","lat":"39.9202533"},{"lon":"119.1138003","lat":"39.9198897"},{"lon":"119.1098136","lat":"39.9196614"},{"lon":"119.1070592","lat":"39.9195964"},{"lon":"119.1031058","lat":"39.9196725"},{"lon":"119.0982056","lat":"39.9199739"},{"lon":"119.0885000","lat":"39.9209761"},{"lon":"119.0854511","lat":"39.9213303"},{"lon":"119.0819208","lat":"39.9216297"},{"lon":"119.0795419","lat":"39.9217772"},{"lon":"119.0765211","lat":"39.9218808"},{"lon":"119.0733283","lat":"39.9219161"},{"lon":"119.0709522","lat":"39.9219072"},{"lon":"119.0645897","lat":"39.9217425"},{"lon":"119.0624497","lat":"39.9215947"},{"lon":"119.0491358","lat":"39.9203142"},{"lon":"119.0438153","lat":"39.9198503"},{"lon":"119.0378664","lat":"39.9192422"},{"lon":"119.0239256","lat":"39.9179992"},{"lon":"119.0035158","lat":"39.9161067"},{"lon":"119.0004139","lat":"39.9157830"},{"lon":"118.9966689","lat":"39.9154861"},{"lon":"118.9886694","lat":"39.9147369"},{"lon":"118.9854919","lat":"39.9145183"},{"lon":"118.9833944","lat":"39.9144380"},{"lon":"118.9803078","lat":"39.9144139"},{"lon":"118.9752406","lat":"39.9146464"},{"lon":"118.9713886","lat":"39.9150108"},{"lon":"118.9691139","lat":"39.9153105"},{"lon":"118.9604489","lat":"39.9166664"},{"lon":"118.9550042","lat":"39.9174083"},{"lon":"118.9515294","lat":"39.9176797"},{"lon":"118.9483394","lat":"39.9178208"},{"lon":"118.9451064","lat":"39.9178450"},{"lon":"118.9405467","lat":"39.9176997"},{"lon":"118.9366561","lat":"39.9173961"},{"lon":"118.9294722","lat":"39.9166664"},{"lon":"118.9270961","lat":"39.9162997"},{"lon":"118.9256706","lat":"39.9162000"},{"lon":"118.9207683","lat":"39.9160519"},{"lon":"118.9177186","lat":"39.9160955"},{"lon":"118.9158806","lat":"39.9161717"},{"lon":"118.9119183","lat":"39.9163972"},{"lon":"118.9074456","lat":"39.9168794"},{"lon":"118.8952822","lat":"39.9184003"},{"lon":"118.8815364","lat":"39.9202514"},{"lon":"118.8750003","lat":"39.9207417"},{"lon":"118.8718642","lat":"39.9207508"},{"lon":"118.8680983","lat":"39.9206247"},{"lon":"118.8650189","lat":"39.9203972"},{"lon":"118.8595725","lat":"39.9197528"},{"lon":"118.8562497","lat":"39.9191475"},{"lon":"118.8537325","lat":"39.9186003"},{"lon":"118.8497181","lat":"39.9175475"},{"lon":"118.8469531","lat":"39.9166664"},{"lon":"118.8418028","lat":"39.9146658"},{"lon":"118.8373778","lat":"39.9126950"},{"lon":"118.8267625","lat":"39.9068272"},{"lon":"118.8248158","lat":"39.9058067"},{"lon":"118.8187369","lat":"39.9023828"},{"lon":"118.8066769","lat":"39.8957075"},{"lon":"118.8052836","lat":"39.8948825"},{"lon":"118.7999756","lat":"39.8919944"},{"lon":"118.7947419","lat":"39.8890736"},{"lon":"118.7917164","lat":"39.8875517"},{"lon":"118.7897589","lat":"39.8866342"},{"lon":"118.7879919","lat":"39.8859200"},{"lon":"118.7861694","lat":"39.8852647"},{"lon":"118.7838239","lat":"39.8845594"},{"lon":"118.7820964","lat":"39.8840950"},{"lon":"118.7798678","lat":"39.8836086"},{"lon":"118.7761936","lat":"39.8830008"},{"lon":"118.7728106","lat":"39.8827122"},{"lon":"118.7690689","lat":"39.8826686"},{"lon":"118.7671978","lat":"39.8827164"},{"lon":"118.7644444","lat":"39.8829080"},{"lon":"118.7525131","lat":"39.8839692"},{"lon":"118.7503078","lat":"39.8840972"},{"lon":"118.7462717","lat":"39.8842100"},{"lon":"118.7418508","lat":"39.8840578"},{"lon":"118.7387411","lat":"39.8838105"},{"lon":"118.7351522","lat":"39.8834225"},{"lon":"118.7302492","lat":"39.8825539"},{"lon":"118.7253758","lat":"39.8814167"},{"lon":"118.7235019","lat":"39.8808830"},{"lon":"118.7207506","lat":"39.8802105"},{"lon":"118.7184292","lat":"39.8795205"},{"lon":"118.7148350","lat":"39.8785675"},{"lon":"118.7106381","lat":"39.8775389"},{"lon":"118.7076603","lat":"39.8770053"},{"lon":"118.7053514","lat":"39.8766508"},{"lon":"118.7008544","lat":"39.8761478"},{"lon":"118.6962758","lat":"39.8759414"},{"lon":"118.6769056","lat":"39.8760025"},{"lon":"118.6731181","lat":"39.8759292"},{"lon":"118.6693703","lat":"39.8757442"},{"lon":"118.6640947","lat":"39.8752564"},{"lon":"118.6583919","lat":"39.8745958"},{"lon":"118.6344206","lat":"39.8722544"},{"lon":"118.6206969","lat":"39.8708486"},{"lon":"118.6140019","lat":"39.8702167"},{"lon":"118.6117164","lat":"39.8699430"},{"lon":"118.6053994","lat":"39.8694594"},{"lon":"118.6038428","lat":"39.8694289"},{"lon":"118.6002647","lat":"39.8694683"},{"lon":"118.5973156","lat":"39.8696525"},{"lon":"118.5942103","lat":"39.8700780"},{"lon":"118.5869706","lat":"39.8713953"},{"lon":"118.5844339","lat":"39.8717339"},{"lon":"118.5813992","lat":"39.8720205"},{"lon":"118.5798219","lat":"39.8720805"},{"lon":"118.5776514","lat":"39.8720572"},{"lon":"118.5740033","lat":"39.8718903"},{"lon":"118.5731186","lat":"39.8718244"},{"lon":"118.5710389","lat":"39.8715386"},{"lon":"118.5675392","lat":"39.8709636"},{"lon":"118.5650347","lat":"39.8703730"},{"lon":"118.5595072","lat":"39.8691900"},{"lon":"118.5553625","lat":"39.8682161"},{"lon":"118.5531939","lat":"39.8677972"},{"lon":"118.5455664","lat":"39.8666469"},{"lon":"118.5434283","lat":"39.8664711"},{"lon":"118.5389583","lat":"39.8662819"},{"lon":"118.5339692","lat":"39.8663255"},{"lon":"118.5307181","lat":"39.8664711"},{"lon":"118.5274106","lat":"39.8665300"},{"lon":"118.5254819","lat":"39.8665167"},{"lon":"118.5206794","lat":"39.8662178"},{"lon":"118.5174025","lat":"39.8659028"},{"lon":"118.5096697","lat":"39.8647025"},{"lon":"118.5071661","lat":"39.8644075"},{"lon":"118.5049436","lat":"39.8642205"},{"lon":"118.5016667","lat":"39.8640211"},{"lon":"118.4982792","lat":"39.8639367"},{"lon":"118.4907333","lat":"39.8641300"},{"lon":"118.4887192","lat":"39.8641555"},{"lon":"118.4868031","lat":"39.8641258"},{"lon":"118.4826000","lat":"39.8638697"},{"lon":"118.4787694","lat":"39.8634978"},{"lon":"118.4730489","lat":"39.8625369"},{"lon":"118.4674831","lat":"39.8611911"},{"lon":"118.4660133","lat":"39.8607683"},{"lon":"118.4634261","lat":"39.8599436"},{"lon":"118.4582769","lat":"39.8580683"},{"lon":"118.4570833","lat":"39.8576950"},{"lon":"118.4552300","lat":"39.8569550"},{"lon":"118.4469097","lat":"39.8539233"},{"lon":"118.4438736","lat":"39.8529725"},{"lon":"118.4393181","lat":"39.8517969"},{"lon":"118.4363733","lat":"39.8511586"},{"lon":"118.4338133","lat":"39.8506989"},{"lon":"118.4306403","lat":"39.8502017"},{"lon":"118.4129167","lat":"39.8481550"},{"lon":"118.4083442","lat":"39.8474805"},{"lon":"118.4036353","lat":"39.8464647"},{"lon":"118.4007139","lat":"39.8456900"},{"lon":"118.3964039","lat":"39.8443533"},{"lon":"118.3926561","lat":"39.8428819"},{"lon":"118.3892425","lat":"39.8413739"},{"lon":"118.3807658","lat":"39.8371439"},{"lon":"118.3795767","lat":"39.8366036"},{"lon":"118.3762106","lat":"39.8352236"},{"lon":"118.3712150","lat":"39.8333336"},{"lon":"118.3662717","lat":"39.8318597"},{"lon":"118.3553292","lat":"39.8290492"},{"lon":"118.3508700","lat":"39.8278342"},{"lon":"118.3488514","lat":"39.8272544"},{"lon":"118.3460172","lat":"39.8263672"},{"lon":"118.3436611","lat":"39.8255658"},{"lon":"118.3397156","lat":"39.8241100"},{"lon":"118.3363478","lat":"39.8227428"},{"lon":"118.3342728","lat":"39.8217880"},{"lon":"118.3237786","lat":"39.8171655"},{"lon":"118.3159481","lat":"39.8137608"},{"lon":"118.3142528","lat":"39.8130425"},{"lon":"118.3120575","lat":"39.8122222"},{"lon":"118.3108286","lat":"39.8117817"},{"lon":"118.3091378","lat":"39.8112475"},{"lon":"118.3056658","lat":"39.8102275"},{"lon":"118.3033142","lat":"39.8096525"},{"lon":"118.2994872","lat":"39.8088239"},{"lon":"118.2965533","lat":"39.8082553"},{"lon":"118.2916314","lat":"39.8071703"},{"lon":"118.2887758","lat":"39.8063458"},{"lon":"118.2849344","lat":"39.8051042"},{"lon":"118.2824697","lat":"39.8041555"},{"lon":"118.2731622","lat":"39.8003019"},{"lon":"118.2684614","lat":"39.7984461"},{"lon":"118.2569269","lat":"39.7936261"},{"lon":"118.2506764","lat":"39.7911000"},{"lon":"118.2497197","lat":"39.7906642"},{"lon":"118.2430686","lat":"39.7879530"},{"lon":"118.2393100","lat":"39.7867139"},{"lon":"118.2372117","lat":"39.7861886"},{"lon":"118.2361939","lat":"39.7859850"},{"lon":"118.2343514","lat":"39.7857139"},{"lon":"118.2313347","lat":"39.7853689"},{"lon":"118.2294375","lat":"39.7852772"},{"lon":"118.2279947","lat":"39.7852455"},{"lon":"118.2252192","lat":"39.7853128"},{"lon":"118.2224369","lat":"39.7855358"},{"lon":"118.2199389","lat":"39.7859308"},{"lon":"118.2185158","lat":"39.7862150"},{"lon":"118.2158075","lat":"39.7868511"},{"lon":"118.2142011","lat":"39.7873411"},{"lon":"118.1735067","lat":"39.8006939"},{"lon":"118.1701650","lat":"39.8016314"},{"lon":"118.1674611","lat":"39.8022197"},{"lon":"118.1643556","lat":"39.8027061"},{"lon":"118.1629469","lat":"39.8028730"},{"lon":"118.1588236","lat":"39.8031358"},{"lon":"118.1544183","lat":"39.8030797"},{"lon":"118.1530494","lat":"39.8029769"},{"lon":"118.1474331","lat":"39.8021067"},{"lon":"118.1455142","lat":"39.8016642"},{"lon":"118.1423828","lat":"39.8008117"},{"lon":"118.1389844","lat":"39.7998092"},{"lon":"118.1243536","lat":"39.7952775"},{"lon":"118.1189600","lat":"39.7936586"},{"lon":"118.1053642","lat":"39.7894272"},{"lon":"118.0891664","lat":"39.7845419"},{"lon":"118.0824453","lat":"39.7824372"},{"lon":"118.0770742","lat":"39.7809330"},{"lon":"118.0716278","lat":"39.7798242"},{"lon":"118.0694792","lat":"39.7794769"},{"lon":"118.0670572","lat":"39.7791533"},{"lon":"118.0626625","lat":"39.7787172"},{"lon":"118.0603969","lat":"39.7785675"},{"lon":"118.0135572","lat":"39.7771417"},{"lon":"118.0083333","lat":"39.7769033"},{"lon":"118.0049889","lat":"39.7766511"},{"lon":"118.0013453","lat":"39.7762558"},{"lon":"117.9976300","lat":"39.7757047"},{"lon":"117.9895397","lat":"39.7740800"},{"lon":"117.9830422","lat":"39.7725322"},{"lon":"117.9814819","lat":"39.7722072"},{"lon":"117.9592189","lat":"39.7668861"},{"lon":"117.9557092","lat":"39.7660894"},{"lon":"117.9538819","lat":"39.7657311"},{"lon":"117.9500911","lat":"39.7650372"},{"lon":"117.9456967","lat":"39.7643750"},{"lon":"117.9393903","lat":"39.7635611"},{"lon":"117.9300819","lat":"39.7624455"},{"lon":"117.9260353","lat":"39.7620269"},{"lon":"117.9092169","lat":"39.7599669"},{"lon":"117.9004881","lat":"39.7589867"},{"lon":"117.8920511","lat":"39.7585111"},{"lon":"117.8910933","lat":"39.7585022"},{"lon":"117.8865839","lat":"39.7586047"},{"lon":"117.8849742","lat":"39.7586914"},{"lon":"117.8815711","lat":"39.7589625"},{"lon":"117.8792950","lat":"39.7592100"},{"lon":"117.8630400","lat":"39.7613564"},{"lon":"117.8557033","lat":"39.7619380"},{"lon":"117.8506531","lat":"39.7621808"},{"lon":"117.8163411","lat":"39.7624192"},{"lon":"117.8145461","lat":"39.7624700"},{"lon":"117.8116706","lat":"39.7624589"},{"lon":"117.8021872","lat":"39.7625975"},{"lon":"117.8005467","lat":"39.7625692"},{"lon":"117.7745272","lat":"39.7627430"},{"lon":"117.7685200","lat":"39.7627450"},{"lon":"117.7615753","lat":"39.7628297"},{"lon":"117.7563039","lat":"39.7627369"},{"lon":"117.7524222","lat":"39.7625192"},{"lon":"117.7499994","lat":"39.7623069"},{"lon":"117.7481228","lat":"39.7621197"},{"lon":"117.7405725","lat":"39.7611478"},{"lon":"117.7380403","lat":"39.7607372"},{"lon":"117.7342053","lat":"39.7599761"},{"lon":"117.7318050","lat":"39.7594228"},{"lon":"117.7264322","lat":"39.7580597"},{"lon":"117.7226889","lat":"39.7569705"},{"lon":"117.7177608","lat":"39.7553730"},{"lon":"117.6983633","lat":"39.7488822"},{"lon":"117.6951539","lat":"39.7477664"},{"lon":"117.6866144","lat":"39.7450322"},{"lon":"117.6833283","lat":"39.7438455"},{"lon":"117.6585761","lat":"39.7356114"},{"lon":"117.6557419","lat":"39.7346203"},{"lon":"117.6522933","lat":"39.7336133"},{"lon":"117.6488061","lat":"39.7327539"},{"lon":"117.6452056","lat":"39.7320161"},{"lon":"117.6414867","lat":"39.7313819"},{"lon":"117.6383200","lat":"39.7310844"},{"lon":"117.6350950","lat":"39.7308722"},{"lon":"117.6312017","lat":"39.7307314"},{"lon":"117.6278644","lat":"39.7307592"},{"lon":"117.6249997","lat":"39.7309008"},{"lon":"117.5834114","lat":"39.7335350"},{"lon":"117.5801253","lat":"39.7336958"},{"lon":"117.5773108","lat":"39.7337478"},{"lon":"117.5745119","lat":"39.7337258"},{"lon":"117.5717117","lat":"39.7335808"},{"lon":"117.5677600","lat":"39.7332444"},{"lon":"117.5648478","lat":"39.7328622"},{"lon":"117.5614583","lat":"39.7322678"},{"lon":"117.5541344","lat":"39.7307314"},{"lon":"117.5513453","lat":"39.7302319"},{"lon":"117.5480600","lat":"39.7297700"},{"lon":"117.5446006","lat":"39.7294225"},{"lon":"117.5409569","lat":"39.7292297"},{"lon":"117.5380231","lat":"39.7291861"},{"lon":"117.5351522","lat":"39.7292380"},{"lon":"117.5306336","lat":"39.7294747"},{"lon":"117.5287453","lat":"39.7295286"},{"lon":"117.5249697","lat":"39.7295461"},{"lon":"117.5211933","lat":"39.7293839"},{"lon":"117.5164906","lat":"39.7289842"},{"lon":"117.5131244","lat":"39.7285417"},{"lon":"117.5114231","lat":"39.7282594"},{"lon":"117.5046417","lat":"39.7269289"},{"lon":"117.5005750","lat":"39.7263214"},{"lon":"117.4975108","lat":"39.7259869"},{"lon":"117.4865794","lat":"39.7251497"},{"lon":"117.4830364","lat":"39.7247633"},{"lon":"117.4799911","lat":"39.7243339"},{"lon":"117.4762711","lat":"39.7236717"},{"lon":"117.4721183","lat":"39.7227928"},{"lon":"117.4696336","lat":"39.7221897"},{"lon":"117.4646228","lat":"39.7208461"},{"lon":"117.4618811","lat":"39.7202036"},{"lon":"117.4590558","lat":"39.7196439"},{"lon":"117.4564778","lat":"39.7192319"},{"lon":"117.4536156","lat":"39.7188647"},{"lon":"117.4499389","lat":"39.7185528"},{"lon":"117.4453736","lat":"39.7183264"},{"lon":"117.4415189","lat":"39.7182614"},{"lon":"117.4357094","lat":"39.7184508"},{"lon":"117.4309764","lat":"39.7187864"},{"lon":"117.4288669","lat":"39.7190014"},{"lon":"117.4250733","lat":"39.7194836"},{"lon":"117.4211506","lat":"39.7200933"},{"lon":"117.4171289","lat":"39.7208592"},{"lon":"117.4131078","lat":"39.7217597"},{"lon":"117.4091625","lat":"39.7227967"},{"lon":"117.4055819","lat":"39.7238561"},{"lon":"117.4029336","lat":"39.7247044"},{"lon":"117.4008289","lat":"39.7254555"},{"lon":"117.3980422","lat":"39.7265275"},{"lon":"117.3946933","lat":"39.7279730"},{"lon":"117.3928364","lat":"39.7288455"},{"lon":"117.3901192","lat":"39.7302208"},{"lon":"117.3855836","lat":"39.7328405"},{"lon":"117.3835200","lat":"39.7341711"},{"lon":"117.3808197","lat":"39.7360719"},{"lon":"117.3792792","lat":"39.7372372"},{"lon":"117.3771700","lat":"39.7389536"},{"lon":"117.3712347","lat":"39.7442014"},{"lon":"117.3680342","lat":"39.7468380"},{"lon":"117.3660956","lat":"39.7482922"},{"lon":"117.3629514","lat":"39.7503211"},{"lon":"117.3614494","lat":"39.7513694"},{"lon":"117.3576494","lat":"39.7534197"},{"lon":"117.3557811","lat":"39.7543553"},{"lon":"117.3538650","lat":"39.7552558"},{"lon":"117.3511764","lat":"39.7564000"},{"lon":"117.3462544","lat":"39.7582483"},{"lon":"117.3361547","lat":"39.7618730"},{"lon":"117.3311025","lat":"39.7633872"},{"lon":"117.3297767","lat":"39.7637214"},{"lon":"117.3265167","lat":"39.7643833"},{"lon":"117.3223592","lat":"39.7651236"},{"lon":"117.3204144","lat":"39.7654080"},{"lon":"117.3169397","lat":"39.7658072"},{"lon":"117.3128603","lat":"39.7663972"},{"lon":"117.3092097","lat":"39.7670400"},{"lon":"117.3052383","lat":"39.7678947"},{"lon":"117.3032483","lat":"39.7683786"},{"lon":"117.2989500","lat":"39.7695569"},{"lon":"117.2854644","lat":"39.7738042"},{"lon":"117.2805578","lat":"39.7752883"},{"lon":"117.2759092","lat":"39.7764930"},{"lon":"117.2728144","lat":"39.7771680"},{"lon":"117.2708658","lat":"39.7775153"},{"lon":"117.2679922","lat":"39.7779403"},{"lon":"117.2643989","lat":"39.7783158"},{"lon":"117.2614992","lat":"39.7785025"},{"lon":"117.2587414","lat":"39.7785958"},{"lon":"117.2332878","lat":"39.7783761"},{"lon":"117.2293836","lat":"39.7784350"},{"lon":"117.2254669","lat":"39.7785828"},{"lon":"117.2224261","lat":"39.7787803"},{"lon":"117.2184178","lat":"39.7791600"},{"lon":"117.2142100","lat":"39.7796786"},{"lon":"117.2100672","lat":"39.7803230"},{"lon":"117.2063364","lat":"39.7810328"},{"lon":"117.2040322","lat":"39.7815278"},{"lon":"117.1964297","lat":"39.7833028"},{"lon":"117.1926819","lat":"39.7840969"},{"lon":"117.1893419","lat":"39.7847069"},{"lon":"117.1867622","lat":"39.7851061"},{"lon":"117.1835694","lat":"39.7854403"},{"lon":"117.1804425","lat":"39.7856833"},{"lon":"117.1663039","lat":"39.7865339"},{"lon":"117.1608008","lat":"39.7868033"},{"lon":"117.1559328","lat":"39.7868664"},{"lon":"117.1522650","lat":"39.7867839"},{"lon":"117.1499392","lat":"39.7866753"},{"lon":"117.1468922","lat":"39.7864583"},{"lon":"117.1376522","lat":"39.7857272"},{"lon":"117.1329908","lat":"39.7855033"},{"lon":"117.1300758","lat":"39.7854747"},{"lon":"117.1250003","lat":"39.7855489"},{"lon":"117.1231686","lat":"39.7856244"},{"lon":"117.1193489","lat":"39.7858892"},{"lon":"117.1095178","lat":"39.7867272"},{"lon":"117.1054708","lat":"39.7869622"},{"lon":"117.1007331","lat":"39.7870661"},{"lon":"117.0963125","lat":"39.7869980"},{"lon":"117.0939167","lat":"39.7868942"},{"lon":"117.0908203","lat":"39.7866864"},{"lon":"117.0868947","lat":"39.7862872"},{"lon":"117.0841708","lat":"39.7859442"},{"lon":"117.0671783","lat":"39.7835828"},{"lon":"117.0630900","lat":"39.7831114"},{"lon":"117.0612783","lat":"39.7829750"},{"lon":"117.0574828","lat":"39.7828536"},{"lon":"117.0543775","lat":"39.7829250"},{"lon":"117.0521353","lat":"39.7830900"},{"lon":"117.0508594","lat":"39.7832444"},{"lon":"117.0481817","lat":"39.7836714"},{"lon":"117.0455228","lat":"39.7842730"},{"lon":"117.0423308","lat":"39.7852128"},{"lon":"117.0388258","lat":"39.7865255"},{"lon":"117.0236719","lat":"39.7926150"},{"lon":"117.0202667","lat":"39.7938278"},{"lon":"117.0167075","lat":"39.7949086"},{"lon":"117.0161461","lat":"39.7951950"},{"lon":"117.0137242","lat":"39.7962497"},{"lon":"117.0130225","lat":"39.7964497"},{"lon":"117.0111261","lat":"39.7968461"},{"lon":"117.0108856","lat":"39.7968572"},{"lon":"117.0103150","lat":"39.7968530"},{"lon":"117.0090278","lat":"39.7965994"},{"lon":"117.0065644","lat":"39.7970769"},{"lon":"116.9867056","lat":"39.7990214"},{"lon":"116.9725175","lat":"39.8003275"},{"lon":"116.9659328","lat":"39.8005992"},{"lon":"116.9626756","lat":"39.8005769"},{"lon":"116.9527339","lat":"39.8004730"},{"lon":"116.9497092","lat":"39.8003405"},{"lon":"116.9469031","lat":"39.8003622"},{"lon":"116.9103578","lat":"39.7998236"},{"lon":"116.8951781","lat":"39.7996808"},{"lon":"116.8894422","lat":"39.7998550"},{"lon":"116.8869925","lat":"39.8000758"},{"lon":"116.8772808","lat":"39.8012067"},{"lon":"116.8664686","lat":"39.8026778"},{"lon":"116.8613581","lat":"39.8033269"},{"lon":"116.8568486","lat":"39.8037675"},{"lon":"116.8528233","lat":"39.8040039"},{"lon":"116.8502056","lat":"39.8040994"},{"lon":"116.8477039","lat":"39.8041128"},{"lon":"116.8439083","lat":"39.8040580"},{"lon":"116.8394528","lat":"39.8038825"},{"lon":"116.8333856","lat":"39.8033269"},{"lon":"116.8290214","lat":"39.8028689"},{"lon":"116.8252514","lat":"39.8025605"},{"lon":"116.8219742","lat":"39.8024042"},{"lon":"116.8179167","lat":"39.8024303"},{"lon":"116.8155314","lat":"39.8025322"},{"lon":"116.8136136","lat":"39.8026522"},{"lon":"116.8097222","lat":"39.8030317"},{"lon":"116.8063544","lat":"39.8035389"},{"lon":"116.8022786","lat":"39.8043336"},{"lon":"116.7982156","lat":"39.8053444"},{"lon":"116.7969158","lat":"39.8057200"},{"lon":"116.7939450","lat":"39.8066817"},{"lon":"116.7890886","lat":"39.8085461"},{"lon":"116.7734131","lat":"39.8153728"},{"lon":"116.7674733","lat":"39.8177428"},{"lon":"116.7643725","lat":"39.8187611"},{"lon":"116.7624086","lat":"39.8194592"},{"lon":"116.7597156","lat":"39.8203017"},{"lon":"116.7436286","lat":"39.8248525"},{"lon":"116.7404728","lat":"39.8258417"},{"lon":"116.7363739","lat":"39.8272780"},{"lon":"116.7335197","lat":"39.8283939"},{"lon":"116.7261519","lat":"39.8313867"},{"lon":"116.7244486","lat":"39.8320328"},{"lon":"116.7228300","lat":"39.8326083"},{"lon":"116.7200156","lat":"39.8335128"},{"lon":"116.7169442","lat":"39.8343489"},{"lon":"116.7127147","lat":"39.8353017"},{"lon":"116.7092078","lat":"39.8359000"},{"lon":"116.7068119","lat":"39.8362255"},{"lon":"116.7038825","lat":"39.8365297"},{"lon":"116.6965083","lat":"39.8369833"},{"lon":"116.6932286","lat":"39.8372700"},{"lon":"116.6871847","lat":"39.8380492"},{"lon":"116.6813492","lat":"39.8389819"},{"lon":"116.6660978","lat":"39.8415600"},{"lon":"116.6634136","lat":"39.8420572"},{"lon":"116.6611939","lat":"39.8423675"},{"lon":"116.6589686","lat":"39.8427600"},{"lon":"116.6573175","lat":"39.8430944"},{"lon":"116.6541214","lat":"39.8438411"},{"lon":"116.6518728","lat":"39.8444358"},{"lon":"116.6487153","lat":"39.8453583"},{"lon":"116.6474675","lat":"39.8457569"},{"lon":"116.6433811","lat":"39.8472611"},{"lon":"116.6401822","lat":"39.8486236"},{"lon":"116.6373236","lat":"39.8499842"},{"lon":"116.6344097","lat":"39.8515386"},{"lon":"116.6279444","lat":"39.8552492"},{"lon":"116.6252772","lat":"39.8566794"},{"lon":"116.6216489","lat":"39.8587175"},{"lon":"116.6199369","lat":"39.8597394"},{"lon":"116.6143636","lat":"39.8628319"},{"lon":"116.6125886","lat":"39.8637455"},{"lon":"116.6107553","lat":"39.8645417"},{"lon":"116.6088239","lat":"39.8652561"},{"lon":"116.6070397","lat":"39.8658175"},{"lon":"116.6050822","lat":"39.8662889"},{"lon":"116.6031833","lat":"39.8666255"},{"lon":"116.6012608","lat":"39.8668794"},{"lon":"116.5993906","lat":"39.8670636"},{"lon":"116.5975211","lat":"39.8671653"},{"lon":"116.5811764","lat":"39.8678055"},{"lon":"116.5778103","lat":"39.8680100"},{"lon":"116.5743617","lat":"39.8680708"},{"lon":"116.5660244","lat":"39.8683678"},{"lon":"116.5506506","lat":"39.8689992"},{"lon":"116.5306272","lat":"39.8697500"},{"lon":"116.5194361","lat":"39.8703447"},{"lon":"116.5142231","lat":"39.8705730"},{"lon":"116.4945050","lat":"39.8711739"},{"lon":"116.4922486","lat":"39.8714758"},{"lon":"116.4919269","lat":"39.8715905"},{"lon":"116.4913781","lat":"39.8719005"},{"lon":"116.4910069","lat":"39.8722003"},{"lon":"116.4904231","lat":"39.8728428"},{"lon":"116.4901194","lat":"39.8733133"},{"lon":"116.4898717","lat":"39.8738561"},{"lon":"116.4895769","lat":"39.8750908"},{"lon":"116.4897781","lat":"39.8767269"},{"lon":"116.4898669","lat":"39.8784139"},{"lon":"116.4898894","lat":"39.9045828"},{"lon":"116.4900125","lat":"39.9047525"},{"lon":"116.4900756","lat":"39.9050325"},{"lon":"116.4901869","lat":"39.9059936"},{"lon":"116.4906989","lat":"39.9065014"},{"lon":"116.4917706","lat":"39.9070092"},{"lon":"116.4922486","lat":"39.9073369"},{"lon":"116.4923589","lat":"39.9075128"},{"lon":"116.4924389","lat":"39.9078083"},{"lon":"116.4924308","lat":"39.9080447"},{"lon":"116.4922997","lat":"39.9083333"},{"lon":"116.4920922","lat":"39.9085305"},{"lon":"116.4918353","lat":"39.9086694"},{"lon":"116.4915883","lat":"39.9087367"},{"lon":"116.4911372","lat":"39.9087739"},{"lon":"116.4879186","lat":"39.9084786"},{"lon":"116.4868075","lat":"39.9083283"},{"lon":"116.4754661","lat":"39.9083486"},{"lon":"116.4638581","lat":"39.9084592"},{"lon":"116.4627164","lat":"39.9084764"},{"lon":"116.4625458","lat":"39.9085983"},{"lon":"116.4625197","lat":"39.9097783"},{"lon":"116.4620356","lat":"39.9106183"},{"lon":"116.4619294","lat":"39.9111372"},{"lon":"116.4619008","lat":"39.9146892"},{"lon":"116.4616922","lat":"39.9185872"},{"lon":"116.4618406","lat":"39.9379361"},{"lon":"116.4618486","lat":"39.9513561"},{"lon":"116.4617794","lat":"39.9518767"},{"lon":"116.4615772","lat":"39.9523911"},{"lon":"116.4613456","lat":"39.9528475"},{"lon":"116.4608875","lat":"39.9534075"},{"lon":"116.4600017","lat":"39.9541775"},{"lon":"116.4500842","lat":"39.9607961"},{"lon":"116.4403906","lat":"39.9671722"},{"lon":"116.4381708","lat":"39.9685919"},{"lon":"116.4374217","lat":"39.9690211"},{"lon":"116.4370264","lat":"39.9691944"},{"lon":"116.4359053","lat":"39.9695250"},{"lon":"116.4351839","lat":"39.9696439"},{"lon":"116.4342147","lat":"39.9696764"},{"lon":"116.3989278","lat":"39.9687430"},{"lon":"116.3984086","lat":"39.9688730"},{"lon":"116.3975256","lat":"39.9688364"}]}],"previewl":15},"success":true,"end_lon":"116.397506","start_lat":"39.952324","end_lat":"39.969162"}&#39;;
    }
    function test_not_point(){
        return &#39;{"location_lat":"39.9513561","isnavigate":1,"meetid":"1","start_lon":"116.4595183","location_lon":"116.4618586","messages":"","isenabled":1,"timeremaining":0,"end_lon":"116.4600017","success":"success","start_lat":"39.9245439","end_lat":"39.9534075"}&#39;;
    }
 
    /*lines的数据格式    */
    function test_data_add($len=10){
        $start = 1;
        $end = ($len<1)?1:$len;
        $flon = 110;
        $flat = 22;
        $arrs = array();
        for($i=$start;$i<=$end;$i++){
            if($i%400==0){
                $flon++;
                $flat++;
            }
            $tmp = str_pad($i, 4, "0", STR_PAD_LEFT);
            $arrs[] = &#39;{"n":"&#39;.$flon.&#39;.458&#39;.$tmp.&#39;","t":"&#39;.$flat.&#39;.924&#39;.$tmp.&#39;"}&#39;;
            $arrs_cur[] = &#39;{"lon":"&#39;.$flon.&#39;.458&#39;.$tmp.&#39;","lat":"&#39;.$flat.&#39;.924&#39;.$tmp.&#39;"}&#39;;
        }
        return &#39;{"unit":2,"lines":[{"points":[&#39;.implode(&#39;,&#39;,$arrs_cur).&#39;]}],"previewl":15}&#39;;
    }
    function test_getLocation($len){
        return &#39;{"location_lat":"39.9513561","isnavigate":1,"meetid":"1","start_lon":"116.4595183","location_lon":"116.4618586","messages":"","isenabled":1,"timeremaining":0,"lines":&#39;.$this->test_data_add($len).&#39;,"end_lon":"116.4600017","success":"success","start_lat":"39.9245439","end_lat":"39.9534075"}&#39;;
    }
    function test_slipt_str($len){      
        $t[] =$txt = $this->test_getLocation($len);
        $t[] = $start_mark = &#39;"lines":{"unit":2,"lines":[{"points":[&#39;;
        $t[] = $end_mark = &#39;]}],"previewl":&#39;;
        $t[] = $mark_count = strlen($start_mark);
        $t[] = $start_i = strpos($txt,$start_mark)+$mark_count-1;//自身长度 + 标志串长度-最前面的"["
        $t[] = $end_i = strpos($txt,$end_mark)-$start_i+1;//最后的"]"保留
        $t[] = $jsonpoints = substr($txt,$start_i,$end_i);
        return $jsonpoints;
    }
    function test_(){   }
 
    /**
     * 记录日志.
     * 
     * @param $logmsg unknown_type          
     * @param $type unknown_type        
     */
    protected function __log($logmsg, $type = &#39;debug&#39;) {        
        $logmsg [] = __FILE__;      
        zdebug($logmsg,"press",&#39;weblog/press/&#39;.date(&#39;Ymd_H&#39;).&#39;.press.txt&#39;);     
    }
}

Déclaration:
Le contenu de cet article est volontairement contribué par les internautes et les droits d'auteur appartiennent à l'auteur original. Ce site n'assume aucune responsabilité légale correspondante. Si vous trouvez un contenu suspecté de plagiat ou de contrefaçon, veuillez contacter admin@php.cn