TINMAN 3D / REALTIME TERRAIN
Software Development Kit - User Manual

class UrlPatternPyramid in Tinman.Terrain.Pyramids

An IPixelPyramid implementation that can be used to access various web-based tile provider services (e.g. WMTS).

sealed class UrlPatternPyramid extends HttpPyramid

Configuration

ToConfig

Returns the configuration value that describes this object.

public override method ToConfig ()
type ConfigValue
returns [not-null] The configuration value.
implements Pyramid.ToConfig

Remarks:

All configurable objects need to implement this interface. For simple types, it is preferable to delegate to ToValue.

The returned value may be of type Invalid, which means that this object in its current state cannot be described with the configuration API.

Before returning the resulting configuration value, Cache must be called on it, passing this IConfigurable object as parameter.

Public / Attributes

Bounds

The bounding box for geo-coordinates (only applies for Contiguous).

public property Bounds { get set }
type Box2D
value The bounding box.

Remarks:

Getting a pyramid tilea that is fully outside of the bounding box will return Void.

Defaults to the bounds of the whole pixel pyramid.

CanUpdate

Does this map allow updates to its content (i.e. sample data and/or metadata)?

public override property CanUpdate { get }
type bool
value true if the map content can be updated, false if not.
inherited PixelPyramid.CanUpdate

Flags

Additional behaviour flags of the pyramid.

public override sealed property Flags { get }
type PyramidFlags
value The pyramid flags.
inherited HttpPyramid.Flags

FullSize

The size of the bottom-most pyramid level.

public property FullSize { get }
type int32
value [pow2] The pyramid size (width and height), in samples.
inherited Pyramid.FullSize

Georef

Returns georeferencing information.

public override property Georef { get }
type Raster
value The georeferencing object or null if no georeferencing is available.
inherited HttpPyramid.Georef

Http

The ISimpleHttp object that is used to make HTTP requests.

public property Http { get }
type ISimpleHttp
value [not-null] The ISimpleHttp object.
inherited HttpPyramid.Http

Remarks:

The default value is a SimpleHttp instance.

Levels

The number of pyramid levels.

public property Levels { get }
type int32
value [>=1] The number of pyramid levels.
inherited Pyramid.Levels

LifecycleState

Returns the lifecycle state of this object.

public virtual property LifecycleState { get }
type LifecycleState
value The lifecycle state.
inherited Disposable.LifecycleState

Map

Returns a MapInfo value that describes the used map raster.

public property Map { get }
type MapInfo
value The map info value.
inherited Pyramid.Map

OnUpdated

Event for listening to updates made to this pixel pyramid.

public property OnUpdated { get }
type IEventGeneric<PyramidEventArgs>
value [not-null] The event object.
inherited Pyramid.OnUpdated

Remarks:

This event will be fired by the thread that performs the map update.

Solid

Is this pixel pyramid solid?

public property Solid { get set }
type bool
value true if the pyramid is solid, false if not.
inherited HttpPyramid.Solid

Remarks:

The HasTileData method of a solid pyramid will always return true, and HEAD requests will not be performed (see Head).

The default value is false.

TileMatrixCount

Returns the number of tile matrices.

public property TileMatrixCount { get }
type int32
value [>=1] The number of tile matrices.

Remarks:

If the zero-th tile matrix has a size of 1x1, the tile matrix level count is equal to the pyramid level count (see Levels).

TilePad

The pad width of this cube pyramid.

public property TilePad { get }
type int32
value [>=0] The pad width.
inherited Pyramid.TilePad

Remarks:

Tile padding is used to avoid color bleeding that will occur when texture samples are filtered at the edge of a pyramid tile (assuming tiles are stored in some kind of texture atlas). The tile pad width gives the number of safety pixels at the that are borrowed from neighbouring pyramid tiles:

      8x8 tile, with a pad of 2:

    0   1   2   3   4   5   6   7
  +---+---+---+---+---+---+---+---+
0 |###|###|###|###|###|###|###|###|
  +---+---+---+---+---+---+---+---+
1 |###|###|###|###|###|###|###|###|
  +---+--(X)--+---+---+--(X)--+---+
2 |###|###|   |   |   |   |###|###|
  +---+---+---+---+---+---+---+---+
3 |###|###|   |   |   |   |###|###|
  +---+---+---+---+---+---+---+---+
4 |###|###|   |   |   |   |###|###|
  +---+---+---+---+---+---+---+---+
5 |###|###|   |   |   |   |###|###|
  +---+--(X)--+---+---+--(X)--+---+
6 |###|###|###|###|###|###|###|###|
  +---+---+---+---+---+---+---+---+
7 |###|###|###|###|###|###|###|###|
  +---+---+---+---+---+---+---+---+
The point coordinates marked with (X) will be mapped to the corner vertices of each terrain mesh sector. Only the effective region of a padded tile (i.e. the square surrounded by (X)) contains actual data. The padded pixels are sampled from neighbouring source tiles and carry redundant information.

TileSize

The size of a single map tile, in pixels.

public property TileSize { get }
type int32
value [pow2] The tile size.
inherited Pyramid.TileSize

Public / Constructors

UrlPatternPyramid

Creates a new instance of UrlPatternPyramid.

public constructor UrlPatternPyramid (Label pattern, int32 tileSize, int32 levels, UrlPatternMode mode, PyramidFlags flags = PyramidFlags.None, Raster georef = null, [Owner] ISimpleHttp http = null)
params pattern [not-null] The URL pattern to use (see remarks).
  tileSize [pow2] The tile size, in pixels.
  levels [>=1] The number of pyramid levels (see Levels), which might not be the same as the number of tile matrices (see TileMatrixCount); see TiledNon1x1 for details).
  mode The URL pattern mode to use.
  flags The pyramid flags. Defaults to None.
  georef The georeference of the pyramid. If null, PopularMercator will be used. Defaults to null.
  http The custom ISimpleHttp object to use. If null, a new instance of SimpleHttp will be used. Defaults to null.

Remarks:

The placeholders of the given URL pattern are interpreted as specified by the chosen UrlPatternMode (see mode parameter):

Public / Methods

AcquireTry

Acquires a strong reference to this disposable object.

[OwnerReturn, ThreadSafe]
public method AcquireTry ()
type IDisposable
returns this if a new strong reference has been acquired, null if this object is already being disposed.
inherited Disposable.AcquireTry

Remarks:

The object will not be actually disposed by calls to Dispose when there is at least one strong reference left. Code that calls the AcquireTry method is responsible for calling the Dispose method accordingly.

This method is not intended to be used in performance-critical code. It should only be used to high-level resource management.

Cache

Wraps this pixel pyramid in a memory cache.

[OwnerReturn, OwnerThis]
public virtual method Cache ()
type IPixelPyramid
returns [not-null] The cached map pyramid.
inherited PixelPyramid.Cache

Remarks:

The built-in pixel pyramid operations already make use of the Cache method where applicable, so client code usually does not need to call it.

If the Cache method has already been called on this object, the method silently returns this.

See also:

PyramidsUtil.CacheMemory

Wraps this pixel pyramid in a file cache.

[OwnerReturn, OwnerThis]
public virtual method Cache (PyramidFileCache cache, int32 pyramidId)
type IPixelPyramid
params cache [not-null] The cache to use.
  pyramidId [0..1023] Persistent unique identifier of the pixel pyramid being cached.
returns [not-null] The cached map pyramid.
inherited PixelPyramid.Cache

Dispose

Releases all resources held by this object if there are no more strong references to it, decrements the reference counter by one otherwise.

[Dispose, OwnerThis, ThreadSafe]
public method Dispose ()
inherited Disposable.Dispose

Remarks:

The Dispose method silently returns if the object has already been disposed.

Flush

Flushes all cached data.

public virtual method Flush ()
inherited Pyramid.Flush

Remarks:

Performing a flush may result in I/O work. Depending on the semantics of the implementing class, this work may need to be wrapped in special Begin / End method calls. See the documentation of the implementing classes for details.

In case this object represents a read-only resource, calling the Flush method has no effect.

GetTileData

Returns the data content of the given map tile.

[ThreadSafe]
public method GetTileData (PyramidCoords coords, TData data, int32 dataX = 0, int32 dataY = 0)
type TileDataResult
params coords The pyramid tile coords.
  data [not-null] The output buffer to use.
  dataX [>=0] X-coordinate of top-left corner of output rectangle.
  dataY [>=0] Y-coordinate of top-left corner of output rectangle.
returns The result code.
inherited Pyramid.GetTileData

Returns the image pixels of the given map tile.

[ThreadSafe]
public method GetTileData (CubemapFace face, int32 level, int32 x, int32 y, TData data, int32 dataX = 0, int32 dataY = 0)
type TileDataResult
params face Cubemap face of map tile. Set to NegZ for unprojected map pyramids. Defaults to NegZ.
  level [>=0] The pyramid level.
  x Cubemap face X-coordinate of map tile in level.
  y Cubemap face Y-coordinate of map tile in level.
  data [not-null] The output buffer to use.
  dataX [>=0] X-coordinate of top-left corner of output rectangle.
  dataY [>=0] Y-coordinate of top-left corner of output rectangle.
returns The result code.
inherited Pyramid.GetTileData

HasTileData

Returns if there is any data content for the given map tile.

[ThreadSafe]
public method HasTileData (PyramidCoords coords)
type bool
params coords The pyramid tile coords.
returns true if data for the given map tile exists, false if not.
inherited Pyramid.HasTileData

Returns if there is any data content for the given map tile (i.e. Ok or Empty).

[ThreadSafe]
public method HasTileData (CubemapFace face, int32 level, int32 x, int32 y)
type bool
params face Cubemap face of map tile. Set to NegZ for unprojected map pyramids. Defaults to NegZ.
  level [>=0] The pyramid level.
  x Cubemap face X-coordinate of map tile in level.
  y Cubemap face Y-coordinate of map tile in level.
returns true if data for the given map tile exists, false if not.
inherited Pyramid.HasTileData

TileMatrixId

Returns the ID of the given tile matrix, i.e. the value for the {0} placeholder in URL pattern.

public method TileMatrixId (int32 index)
type string
params index [0..TileMatrixCount-1] The tile matrix index.
returns [not-empty] The tile matrix ID

Sets the ID of the given tile matrix, i.e. the value for the {0} placeholder in URL pattern.

public method TileMatrixId (int32 index, string name)
params index [0..TileMatrixCount-1] The tile matrix index.
  name [not-empty] The tile matrix ID.

ToFullSize

Changes the level count resp. full size of this pixel pyramid.

[OwnerReturn, OwnerThis]
public virtual method ToFullSize (int32 fullSize)
type IPixelPyramid
params fullSize [pow2] The new full size (i.e. size of bottommost level).
returns [not-null] The resulting pixel pyramid.
inherited PixelPyramid.ToFullSize

See also:

IPyramidBase.FullSize

ToTilePad

Changes the tile padding of this pixel pyramid.

[OwnerReturn, OwnerThis]
public virtual method ToTilePad (int32 tilePad)
type IPixelPyramid
params tilePad [>=0] The new tile padding value.
returns [not-null] The resulting pixel pyramid.
inherited PixelPyramid.ToTilePad

See also:

IPyramidBase.TilePad

ToTileSize

Changes the tile size of this pixel pyramid.

[OwnerReturn, OwnerThis]
public virtual method ToTileSize (int32 tileSize)
type IPixelPyramid
params tileSize [pow2] The new tile size.
returns [not-null] The resulting pixel pyramid.
inherited PixelPyramid.ToTileSize

See also:

IPyramidBase.TileSize

UpdateGeoref

Updates georeferencing data of this heightmap.

[ThreadSafe]
public override method UpdateGeoref (Raster georef)
params georef The new georeferencing data or null.
inherited PixelPyramid.UpdateGeoref

See also:

IMapEntity.CanUpdate