{"templateId":"markdown","sharedDataIds":{"sidebar":"sidebar-guides/sidebars.yaml"},"props":{"metadata":{"markdoc":{"tagList":[]},"type":"markdown"},"seo":{"title":"GigaGrid","description":"Accelerate E&P application development and protect your innovation by consuming our Data and Domain APIs / Platform APIs.","lang":"en-US","meta":[{"name":"robots","content":"noindex"}],"llmstxt":{"hide":true,"excludeFiles":[]}},"dynamicMarkdocComponents":[],"compilationErrors":[],"ast":{"$$mdtype":"Tag","name":"article","attributes":{},"children":[{"$$mdtype":"Tag","name":"Heading","attributes":{"level":1,"id":"gigagrid","__idx":0},"children":["GigaGrid"]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"introduction","__idx":1},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"#/pages/gigagrid/overview/gigagrid#intro"},"children":["#"]}," Introduction"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["The GigaGrid module is part of the GeotoolkitJS library, and is based on Carnac3D module. Like Carnac3D, GigaGrid uses WebGL 1.0 and extends three.js library."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["If you are already familiar with Carnac3D's ReservoirGrid, you might realize that ReservoirGrid could only render limited number of cells, due to RAM and graphic restraints. Therefore, GigaGrid is designed to overcome the restraints, and to provide the ability to visualize multiple gigabyte data and hundreds of millions of cells."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["In GigaGrid tutorial, we have explained how to load data and create GigaGrid instance, and introduced how to use filters and event system to manipulate grids. Here, we will go deeper and further introduce the architecture behind the scene."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"octree-structure","__idx":2},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"#/pages/gigagrid/overview/gigagrid#OctreeStructure"},"children":["#"]}," Octree Structure"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["An ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"https://en.wikipedia.org/wiki/Octree"},"children":["octree"]}," is a tree data structure in which each internal node has exactly eight children. Octrees are most often used to partition a 3D space by recursively subdividing it into eight octants. In GigaGrid, you can regard ReservoirGrid as one of many octants. This structure not only helps us represent large-scale grids, but also enables level of detail."]},{"$$mdtype":"Tag","name":"img","attributes":{"src":"/assets/octree1.fa7fd2cb4d9d3fce0696df1c8d667698f9bf8a4a0689f7bab6c0d6ded4d08f45.bdc18d8d.png"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Representing GigaGrid as an octree makes us easier to index the subgrids. We can easily and accurately browse any subgrid using a IJK filter."]},{"$$mdtype":"Tag","name":"img","attributes":{"src":"/assets/octree2.2b73bdeb1470c592308bcda9c845ccf60269af37669c1e124f8c6a417414f993.bdc18d8d.png"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"octree-traversal","__idx":3},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"#/pages/gigagrid/overview/gigagrid#OctreeTraversal"},"children":["#"]}," Octree Traversal"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Octree traversal builds a list of subgrids (nodes) that will be displayed to the users. Starting from the root of the the octree, the nodes are to be traversed and only required surfaces are to be viewed, by using a depth-first search algorithm."]},{"$$mdtype":"Tag","name":"img","attributes":{"src":"/assets/renderpass.383e7acb101e1ff5421c3418626a7c51163cb5011828af7f54ff1e222131a2d4.bdc18d8d.png"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["To make sure the right subgrids are added to the display list, multi-pass traversals are needed."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["First, we select nodes based on its size projection on screen. If the size is too small, the cell won't be visible and drawing the cell is unnecessary. The pixel size threshold is defined and can be adjusted by users. Second, we should avoid gaps and nodes collision. That means, at any position in the scene, it should have exactly one drawn node. Hence, the nodes in the display list should satisfy two criteria:"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["If we add a node, we need to also add its siblings"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["If we add a node, we need to remove all its ancestors"]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Third, it's unnecessary to render the nodes that are out of view. So we test frustum and remove the nodes which are not in the field of view."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"data-types","__idx":4},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"#/pages/gigagrid/overview/gigagrid#DataTypes"},"children":["#"]}," Data Types"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["We have learned how the nodes are constructed and selected, then we should have an idea what kind of data we will need in GigaGrid."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["At first, we need a data type called ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["GridResult"]},". It includes general information we need to create a GigaGrid Instance, such as XYZ, IJK ranges, property values, and levels.",{"$$mdtype":"Tag","name":"br","attributes":{},"children":[]},"Second, we need ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Node"]},", which represents an octant in octree. Node contains data like index, parent, children.",{"$$mdtype":"Tag","name":"br","attributes":{},"children":[]},"Third, ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Cell"]}," contains all position data for cells within a node.",{"$$mdtype":"Tag","name":"br","attributes":{},"children":[]},"Last, ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Property"]}," contains color values for cells within a node."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Note that all above data are fetched from server. Then we will show where data query are established and how they interact with each other."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"class-diagram","__idx":5},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"#/pages/gigagrid/overview/gigagrid#ClassDiagram"},"children":["#"]}," Class Diagram"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["The following class diagram shows the data logic in GigaGrid, and how each class is connected."]},{"$$mdtype":"Tag","name":"img","attributes":{"src":"/assets/classdiagram.127e383b2d9bf4c9570c9a2002343c02bc023ba9bf605a41c3e2fb6e49dd5302.bdc18d8d.svg"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Note that the four query types in the diagram return the four data types introduced above."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"performance","__idx":6},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"#/pages/gigagrid/overview/gigagrid#Performance"},"children":["#"]}," Performance"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Resolution Continuity"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Due to the way that octree is traversed, the display list might contain nodes in different resolution, which results a visual discomfort. Pushing all nodes to match the current highest level would be too expensive, since most of time we only focus on the cells that are closest to camera."]},{"$$mdtype":"Tag","name":"img","attributes":{"src":"/assets/resolution.5ec588c669b43e164933d0e9115c839c36abea789a20b45c952ac7a0eb31b264.bdc18d8d.png"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["To mitigate this discomfort, we introduce artificial outline for the nodes with lower resolution. With artificial outline, all subgrids (nodes) are shown with the same resolution."]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["LRU Cache"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["A ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"https://www.geeksforgeeks.org/lru-cache-implementation/"},"children":["LRU caching"]}," schema is used when managing the stored cell data. This helps us always remove the least recently used frame when the cache is full."]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"requirement","__idx":7},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"#/pages/gigagrid/overview/gigagrid#Requirement"},"children":["#"]}," Requirement"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["The secret that GigaGrid can consume multi-gigabyte data at once, is because it splits a large grid into multiple subgrids and reads data for individual grid. However, it still needs a decent amount of memory for caching in order to have a better performance. So we recommend to have at least 4GB RAM to run GigaGrid at full ability."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["In addition, a relative fast internet connection is also recommended, since all data comes from server.",{"$$mdtype":"Tag","name":"br","attributes":{},"children":[]},"However, if either RAM or internet does not meet the requirement, we can adjust ",{"$$mdtype":"Tag","name":"em","attributes":{},"children":["cachelimit"]}," or ",{"$$mdtype":"Tag","name":"em","attributes":{},"children":["maxresolution"]}," in GigaGrid options."]}]},"headings":[{"value":"GigaGrid","id":"gigagrid","depth":1},{"value":"Introduction","id":"introduction","depth":3},{"value":"Octree Structure","id":"octree-structure","depth":3},{"value":"Octree Traversal","id":"octree-traversal","depth":3},{"value":"Data Types","id":"data-types","depth":3},{"value":"Class Diagram","id":"class-diagram","depth":3},{"value":"Performance","id":"performance","depth":3},{"value":"Requirement","id":"requirement","depth":3}],"frontmatter":{"title":"GigaGrid","seo":{"title":"GigaGrid"}},"lastModified":"2026-02-11T19:54:32.000Z","pagePropGetterError":{"message":"","name":""}},"slug":"/solutions/geotoolkit/programmers-guide/architecture-overview/gigagrid","userData":{"isAuthenticated":false,"teams":["anonymous"]},"isPublic":true}