We started to expose the DBF (GeoDbf) module and RTree(RTreeSpatialIndex) module only from last public release(4.0.0.0). So maybe some documentation are still missing, sorry for the inconvenience.
The static APIs CreateRectangleSpatialIndex and CreatePointSpatialIndex are used to create an empty RTree file, the second parameter is to specifies the bytes stored for each page, and the third is the value type stored in the file.
Normally, if you do not want to operate the RTree file separately, you do not need to use this module separately, you only need to know and understand the APIs in the ShapeFileFeatureSource and ShapeFileFeatureLayer which will handle all the files together.
The RTreeSpatialIndexPageSize will affect the map performance , while this kind of effects can be ignored. The DataFormat will affect the precision of data stored in the RTree.
Try following code snippet, after it was run, two files(a.idx, a.ids) will be recreated in the folder C:\temp, while it is empty index files up to now.
Thanks for your reply, Yale It works well. And, you said,"The RTreeSpatialIndexPageSize will affect the map performance , while this kind of effects can be ignored."
could you explain why this kind of effects can be ignored?..
I am not sure I can make it clear, hope my following answer can give you some help.
This parameter specifies the content for each page, which is the OS, will read how many kilobytes were stored in each page when stored on disk. If this value is set to too small, more pages need to be read, while other wise, if it is set to too large, each page will cover too much content. We provided four options: 4Kb, 16KB, 32KB, 8KB, our default value is 8 KB. I think these values will have minor effects on current machines which have enough RAM and fast enough CPU.
Try following code to insert only one feature to the index file. One thing I want to point out is that after this, the record number in the shape does not match with the record in the RTree index file.