MCPcopy Index your code
hub / github.com/MapServer/MapServer / getSubNodeOffset

Function getSubNodeOffset

maptree.c:596–618  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

594}
595
596static ms_int32 getSubNodeOffset(treeNodeObj *node)
597{
598 int i;
599 ms_int32 offset=0;
600
601 for(i=0; i<node->numsubnodes; i++ ) {
602 if(node->subnode[i]) {
603 offset += sizeof(rectObj) + (node->subnode[i]->numshapes+3)*sizeof(int);
604 offset += getSubNodeOffset(node->subnode[i]);
605 }
606 }
607
608 /* offset is the disk offset in the index file on disk */
609 /* that format is (per node) */
610 /* int offset 4 bytes */
611 /* rectObj rect 4 * 8 bytes */
612 /* int numShapes 4 bytes */
613 /* int ids[numShapes] 4 * numShapes bytes */
614 /* int numSubNodes 4 bytes */
615 /* */
616
617 return(offset);
618}
619
620
621static void writeTreeNode(SHPTreeHandle disktree, treeNodeObj *node)

Callers 1

writeTreeNodeFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected