Class ProjectionStructure

java.lang.Object
com.luciad.models.projectedimagery.ProjectionStructure
All Implemented Interfaces:
AutoCloseable

public final class ProjectionStructure extends Object implements AutoCloseable
Immutable description of the tile layout of a single projection.

A pinhole projection is the trivial single-level, single-tile case. Cubemap and equirectangular panoramas can be multi-leveled, with a pyramid of tiles per level.

Use the static factory methods to create an instance.

Since:
2026.1
  • Method Details

    • finalize

      protected void finalize()
      Overrides:
      finalize in class Object
    • close

      public void close()
      Specified by:
      close in interface AutoCloseable
    • pinhole

      @NotNull public static ProjectionStructure pinhole(long width, long height) throws IllegalStateException
      Creates a single-level, single-tile pinhole structure of the given pixel size.
      Parameters:
      width - the image width in pixels.
      height - the image height in pixels.
      Returns:
      the new structure.
      Throws:
      IllegalStateException - when the width or the height is 0.
    • cubeMap

      @NotNull public static ProjectionStructure cubeMap(long levelCount, long tileWidth, long tileHeight, long level0TileCountX, long level0TileCountY) throws IllegalStateException
      Creates a multi-leveled cubemap structure.
      Parameters:
      levelCount - the number of levels of detail. Must be at least 1.
      tileWidth - the tile width in pixels.
      tileHeight - the tile height in pixels.
      level0TileCountX - the number of tiles along the x-axis at the coarsest level.
      level0TileCountY - the number of tiles along the y-axis at the coarsest level.
      Returns:
      the new structure.
      Throws:
      IllegalStateException - when the level count, a tile dimension or a level 0 tile count is 0.
    • equirectangular

      @NotNull public static ProjectionStructure equirectangular(long levelCount, long tileWidth, long tileHeight, long level0TileCountX, long level0TileCountY, double imageFractionX, double imageFractionY) throws IllegalStateException
      Creates a multi-leveled equirectangular structure.

      The image fractions express how much of the full sphere the imagery actually covers, where 1.0 means a full 360-by-180 degree panorama.

      Parameters:
      levelCount - the number of levels of detail. Must be at least 1.
      tileWidth - the tile width in pixels.
      tileHeight - the tile height in pixels.
      level0TileCountX - the number of tiles along the x-axis at the coarsest level.
      level0TileCountY - the number of tiles along the y-axis at the coarsest level.
      imageFractionX - the horizontal sphere coverage, in the range (0, 1].
      imageFractionY - the vertical sphere coverage, in the range (0, 1].
      Returns:
      the new structure.
      Throws:
      IllegalStateException - when the level count, a tile dimension or a level 0 tile count is 0, or when an image fraction is outside (0, 1].
    • getType

      @NotNull public ProjectionStructureType getType()
      Returns the projection geometry of this structure.
      Returns:
      the projection geometry of this structure.
    • getLevelCount

      public long getLevelCount()
      Returns the number of levels of detail.
      Returns:
      the number of levels of detail.
    • getTileWidth

      public long getTileWidth()
      Returns the tile width in pixels.
      Returns:
      the tile width in pixels.
    • getTileHeight

      public long getTileHeight()
      Returns the tile height in pixels.
      Returns:
      the tile height in pixels.
    • getLevel0TileCountX

      public long getLevel0TileCountX()
      Returns the number of tiles along the x-axis at the coarsest level.
      Returns:
      the number of tiles along the x-axis at the coarsest level.
    • getLevel0TileCountY

      public long getLevel0TileCountY()
      Returns the number of tiles along the y-axis at the coarsest level.
      Returns:
      the number of tiles along the y-axis at the coarsest level.
    • getImageFractionX

      public double getImageFractionX()
      Returns the horizontal sphere coverage.

      Always 1.0 for pinhole and cubemap structures.

      Returns:
      the horizontal sphere coverage.
    • getImageFractionY

      public double getImageFractionY()
      Returns the vertical sphere coverage.

      Always 1.0 for pinhole and cubemap structures.

      Returns:
      the vertical sphere coverage.
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • equals

      public boolean equals(@Nullable Object other)
      Overrides:
      equals in class Object