Class ProjectionStructure
java.lang.Object
com.luciad.models.projectedimagery.ProjectionStructure
- All Implemented Interfaces:
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 Summary
Modifier and TypeMethodDescriptionvoidclose()static ProjectionStructurecubeMap(long levelCount, long tileWidth, long tileHeight, long level0TileCountX, long level0TileCountY) Creates a multi-leveled cubemap structure.booleanstatic ProjectionStructureequirectangular(long levelCount, long tileWidth, long tileHeight, long level0TileCountX, long level0TileCountY, double imageFractionX, double imageFractionY) Creates a multi-leveled equirectangular structure.protected voidfinalize()doubleReturns the horizontal sphere coverage.doubleReturns the vertical sphere coverage.longReturns the number of tiles along the x-axis at the coarsest level.longReturns the number of tiles along the y-axis at the coarsest level.longReturns the number of levels of detail.longReturns the tile height in pixels.longReturns the tile width in pixels.getType()Returns the projection geometry of this structure.inthashCode()static ProjectionStructurepinhole(long width, long height) Creates a single-level, single-tile pinhole structure of the given pixel size.
-
Method Details
-
finalize
protected void finalize() -
close
public void close()- Specified by:
closein interfaceAutoCloseable
-
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
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() -
equals
-