arcgis 紧凑瓦片解析
arcgis 10.2 的紧凑型瓦片是bundle和bundlx组成的 v1格式arcgis 10.3的的紧凑瓦片是bundle一个文件 v2格式
网上版本大多是c#的,写了个c++的。直接上代码
bool pie_datasource_bundle_readTile(const std::string &bundleFilePath, long long offset, std::unique_ptr &byteArray, int &arrayCount) { std::ifstream in_stream; in_stream.open(bundleFilePath, std::ios::in | std::ios::binary); if (in_stream.is_open()) { //切片长度 数据 char data_buffer{0}; //从文件头,跳过offset字节 in_stream.seekg(offset, std::ios_base::beg); //读取块长度 if (in_stream.read(data_buffer, sizeof(char) * 4).eof())//如果包含到结尾则返回失败 { in_stream.close(); return false; } //数据块长度 int blobSize = 0; blobSize=(int)(data_buffer&0xff) +(int)(data_buffer&0xff)*256 +(int)(data_buffer&0xff)*65536 +(int)(data_buffer&0xff)*16777216; if (blobSize
页:
[1]