HttpPyramid

Description

abstract class Tinman.Terrain.Pyramids.HttpPyramid

Derived from

PixelPyramid abstract

Extended by

BingMapsPyramid
GoogleMapsPyramid sealed
OpenStreetMapPyramid sealed
UrlPatternPyramid sealed

Abstract base class for IPixelPyramids that fetch tiles from a HTTP web server.

Public / Attributes

Http


public attribute Http → (get)

value : ISimpleHttp

[not-null]
The ISimpleHttp object.

The ISimpleHttp object that is used to make HTTP requests.

The default value is a SimpleHttp instance.

Solid


public attribute Solid → (get,set)

value : bool

true if the pyramid is solid, false if not.

Is this pixel pyramid solid?

The IPyramidBase.HasTileData2 method of a solid pyramid will always return true, and HTTP requests will not be performed for IPyramidBase.HasTileData2.

The default value is false.

Protected / Constructors

Http​Pyramid


protected constructor HttpPyramid → (7)

tileSize in : int32

[pow2]
The pyramid tile size, in pixels.

levels in : int32

[>=1]
The number of pyramid levels.

flags in : PyramidFlags

The pyramid flags.

georef in : Raster

[not-null]
The geo-reference of the pyramid.

http opt : ISimpleHttp own = null

The custom ISimpleHttp object to use. If null, a new instance of SimpleHttp will be used.

defaultSrgb opt : bool = true

The default color-space behaviour, see ISimpleHttp.GetImage.

useHttpHead opt : bool = true

true to use ISimpleHttp.Head for IPyramidBase.HasTileData2,
false to use ISimpleHttp.GetBytes instead.

Creates a new instance of HttpPyramid.

Protected / Methods

Get​Tile​Url


protected abstract method GetTileUrl → (3)

level in : int32

The level.

in : int32

The tile X-coordinate.

in : int32

The tile Y-coordinate.

returns → string

The tile URL.

Returns the URL for fetching the given tile.

Is​Existing​Tile


protected virtual method IsExistingTile → (2)

result in : SimpleHttpResult

The request result to inspect.

head in : bool

Does result in refer to a HEAD request

returns → bool

true if the request has delivered a valid tile image, false if the response indicated a missing tile.

After the web request has succeeded, this method is called to determine if the response has delivered a valid tile image.

This default implementation just returns true.

Is​Missing​Tile


protected virtual method IsMissingTile → (1)

result in : SimpleHttpResult

The request result to inspect.

returns → bool

true if the request result indicates a missing tile, false if some unexpected error has occurred.

After a web request has failed because of some reason other than 404 - Not Found, this method is called to determine if the response indicates a missing tile (no error reporting is necessary in this case).

Request​Result


protected virtual method RequestResult → (4)

requestUrl in : string

The URL that has been accessed.

getOrHas in : bool

true if the tile has been loaded with IPyramid.GetTileData1,
false if it has only been tested with IPyramidBase.HasTileData2.

httpResult in : SimpleHttpResult

The result of the HTTP access.

tileDataResult in : TileDataResult

The tile data result.

This method is called for tile that has been requested.

The default implementation logs a warning messages for TileDataResult.Error. Subclasses may override this method in order to perform other logic, for example counting tile accesses to keep track of billing.

Logging

Logger


public static readonly attribute Logger → (ILogger)

The logger object of this class.