首页 > 代码库 > 解析日志工具。

解析日志工具。

#include<string>
#include <iostream>
#include <fstream>
#include <string>


int main(int argc, char *argv[]){

    fstream fs;
    ifstream ifs;
    ofstream ofs;
    string  ss;
    char str[][11] = {"10m",
                    "25m",
                    "50m",
                    "100m",
                    "200m",
                    "500m",
                    "1000m",
                    "2000m",
                    "5000m",
                    "10000m",
                    "20000m",
                    "50000m",
                    "100000m",
                    "200000m",
                    "500000m",
                    "3000000m"};
    char readstr[25][25] = {};
    string readstr[25];
                    
    for(int i=0;i<argc;i++){
        cout<<argv[i]<<‘\n‘;
        ifs.open(argv[i],ios_base::in);//从文件输入
    }
    
    getline(ifs,&ss);
    ss.find( *(str[0])); //查找是否有 25m等字符串
    if(){
        getline(ifs,&readstr[1]);
    }

return 0;
}

 

 

/*******************************************************************/Scale(25m) MapsetNo=0 DisplayNo=1 3D/2D=0 angle1=0 angle2=0 pos.Longitude=1074370008 pos.Latitude=367823123 0 0 route_time 0 all_time=43
0,43,2,0
BkgPercelNum=2, BkgLinelNum=3429, BkgPolygonNum=8450, NameNum=48
--- Contents(CityMap) ---
Road/Field = 0
Name       = 2
MapSymbol  = 5
POIIcon    = 1
Mountain   = 0
VICS       = 8
g_makeTime[] = 0,0,0,0,0,11,5,0,7,0,0,0,0,1,0,0,1,1,1,1,1,0,1,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0***TotalMakeTime:31***
--- alldata/Make draw data/Excel data PSILoader/SQLite ---
ReadSize:0 timeAll:43 AllReadTime:2 AllSQLTime:0,,,,{0,0,0,0,0,0,0,0},{0,0,0,0,0,0,0,0}
--- NULL Driver---
43,11,0,1,1,0,9
--- End All time---
 

Scale(50m) MapsetNo=0 DisplayNo=0 3D/2D=0 angle1=0 angle2=0 pos.Longitude=1074370008 pos.Latitude=367823123 0 0 route_time 0 all_time=127
0,127,4,0
BkgPercelNum=2, BkgLinelNum=3429, BkgPolygonNum=8450, NameNum=48
--- Contents(CityMap) ---
Road/Field = 1
Name       = 73
MapSymbol  = 0
POIIcon    = 0
Mountain   = 0
VICS       = 8
g_makeTime[] = 0,0,1,0,1,27,0,0,7,0,0,0,1,1,0,0,1,1,0,72,1,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1***TotalMakeTime:115***
--- alldata/Make draw data/Excel data PSILoader/SQLite ---
ReadSize:0 timeAll:127 AllReadTime:4 AllSQLTime:0,,,,{0,0,0,0,0,0,0,0},{0,0,0,0,0,0,0,0}
--- NULL Driver---
127,27,0,1,72,0,10
--- End All time---
 
Scale(100m) MapsetNo=0 DisplayNo=1 3D/2D=0 angle1=0 angle2=0 pos.Longitude=1074370008 pos.Latitude=367823123 0 0 route_time 0 all_time=1071
0,1071,19,0
BkgPercelNum=4, BkgLinelNum=6095, BkgPolygonNum=15171, NameNum=99
--- Contents(CityMap) ---
Road/Field = 0
Name       = 126
MapSymbol  = 0
POIIcon    = 12
Mountain   = 0
VICS       = 881
g_makeTime[] = 0,0,0,0,0,18,0,1,0,0,1,0,0,1,0,0,3,0,12,125,1,0,880,0,1,0,1,0,0,0,0,1,0,0,0,0,0,0,1,0***TotalMakeTime:1046***
--- alldata/Make draw data/Excel data PSILoader/SQLite ---
ReadSize:0 timeAll:1071 AllReadTime:19 AllSQLTime:0,,,,{0,0,0,0,0,0,0,0},{0,0,0,0,0,0,0,0}
--- NULL Driver---
1071,18,0,4,125,0,882
--- End All time---


Scale(200m) MapsetNo=0 DisplayNo=0 3D/2D=0 angle1=0 angle2=0 pos.Longitude=1074370008 pos.Latitude=367823123 0 0 route_time 0 all_time=970
0,970,40,0
BkgPercelNum=6, BkgLinelNum=12895, BkgPolygonNum=2086, NameNum=186
--- Contents(RoadMap) ---
Road/Field = 0
Name       = 141
MapSymbol  = 0
POIIcon    = 8
Mountain   = 0
VICS       = 730
g_makeTime[] = 0,1,0,0,0,16,0,0,2,0,17,1,1,1,0,2,0,8,140,0,1,725,0,0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,1***TotalMakeTime:918***
--- alldata/Make draw data/Excel data PSILoader/SQLite ---
ReadSize:0 timeAll:970 AllReadTime:40 AllSQLTime:0,,,,{0,0,0,0,0,0,0,0},{0,0,0,0,0,0,0,0}
--- NULL Driver---
970,16,0,2,140,0,729
--- End All time---

 

Scale(500m) MapsetNo=0 DisplayNo=1 3D/2D=0 angle1=0 angle2=0 pos.Longitude=1074370008 pos.Latitude=367823123 0 0 route_time 0 all_time=191
0,191,16,0
BkgPercelNum=8, BkgLinelNum=93474, BkgPolygonNum=13008, NameNum=12
--- Contents(RoadMap) ---
Road/Field = 0
Name       = 18
MapSymbol  = 1
POIIcon    = 0
Mountain   = 0
VICS       = 40
g_makeTime[] = 0,0,0,0,0,38,0,0,2,0,57,1,2,9,1,1,0,0,9,1,32,3,0,0,0,1,0,0,0,0,1,0,0,0,0,1,0,10,0***TotalMakeTime:169***
--- alldata/Make draw data/Excel data PSILoader/SQLite ---
ReadSize:0 timeAll:191 AllReadTime:16 AllSQLTime:0,,,,{0,0,0,0,0,0,0,0},{0,0,0,0,0,0,0,0}
--- NULL Driver---
191,38,1,1,9,0,16
--- End All time---

解析日志工具。