Class SVTQuadtreeBuilder

java.lang.Object
gaiasky.util.svt.SVTQuadtreeBuilder

public class SVTQuadtreeBuilder extends Object

Builds a quadtree from a file system path.

The SVT is laid out in a quadtree where each tile is subdivided into four at each level. In the file system, tiles are grouped by level. Each level is in its own directory with the format:

  • level\d+ -> (level3)
  • The files use the format:

  • tx[_|-| ]\d+[_|-| ]\d+\.\w+ -> (tx_0_2.jpg)
  • The tiles can be in any of the supported image formats in Gaia Sky.

    • Constructor Details

      • SVTQuadtreeBuilder

        public SVTQuadtreeBuilder()
    • Method Details

      • build

        public SVTQuadtree<Path> build(String name, Path location, int tileSize)
        Creates a new SVT quadtree and initializes it with the given file system location and the given tile size.
        Parameters:
        name - The name of the tree.
        location - The location where the levels are. A directory for each level is expected within this location, with the name "level[num]". Usually, "level0" is mandatory.
        tileSize - The size (width and height) of each tile in the SVT.
        Returns:
        The SVT quadtree object.