shapefile空间索引文件(*.sbn、*.sbx)文件格式介绍

本文参考自 sharpSbn 与 hasBeen 项目。

1. Sbn 文件格式

1.1 Header 部分(100 Byte)
起始位置名称类型位序
Byte0FileCode9994Int32Big
Byte4未知-400Int32Big
Byte8未使用0Int32Big
Byte12未使用0Int32Big
Byte16未使用0Int32Big
Byte20未使用0Int32Big
Byte24文件长度FileLengthInt32Big
Byte28记录总数NumRecordsInt32Big
Byte32X 最小值xminDoubleBig
Byte40Y 最小值yminDoubleBig
Byte48X 最大值xmaxDoubleBig
Byte56Y 最大值ymaxDoubleBig
Byte64Z 最小值zminDoubleBig
Byte72Z 最大值zmaxDoubleBig
Byte80M 最小值mminDoubleBig
Byte88M 最大值mmaxDoubleBig
Byte96未知0Int32Big?
1.2 Tree 部分
1.2.1 TreeNode 部分
起始位置名称类型位序
Byte100记录号1Int32Big
Byte104记录长度Record_LengthInt32Big
-----
循环 Begin1
Bin 序号Bin_NumberInt32Big
Shape 数量Bin 内部的图形数量Int32Big
End
1.2.2 TreeFeature 部分
起始位置名称类型位序
Byte108 + 记录长度 * 4Bin 序号Bin_NumberInt32Big
Byte112 + 记录长度 * 4要素组长度Bin 内部的图形对应二进制信息的长度Int32Big
-----
循环 Begin2
X 最小值XMinbyteBig
Y 最小值YMinbyteBig
X 最大值XMaxbyteBig
Y 最大值YMaxbyteBig
Shape 序号图形序号IntegerBig
End

2. Sbx格式

Sbx文件是Sbx的索引文件,作用类似与Shx。

起始位置名称类型位序
Byte0FileCode9994Int32Big
Byte4未知-400Int32Big
Byte8未使用0Int32Big
Byte12未使用0Int32Big
Byte16未使用0Int32Big
Byte20未使用0Int32Big
Byte24文件长度FileLengthInt32Big
Byte28记录总数NumRecordsInt32Big
Byte32X 最小值xminDoubleBig
Byte40Y 最小值yminDoubleBig
Byte48X 最大值xmaxDoubleBig
Byte56Y 最大值ymaxDoubleBig
Byte64Z 最小值zminDoubleBig
Byte72Z 最大值zmaxDoubleBig
Byte80M 最小值mminDoubleBig
Byte88M 最大值mmaxDoubleBig
Byte96未使用0Int32Big
循环 Begin:
记录起始位置OffsetInt32Big
记录长度LengthInt32Big
End

  1. 次数:记录长度 / 4 ;长度:Byte108 ~ Byte108 + 记录长度 * 2 ↩︎

  2. 次数:要素组长度 / 4 ;长度:Byte116 + 记录长度 * 2 ~ Byte116 + 记录长度 * 2 + 要素组长度 * 2 ↩︎

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值