Skip to content

API / geotoolkit / ivaapbackend / well / RasterLogProvider / RasterLogProvider

Class: RasterLogProvider

well.RasterLogProvider.RasterLogProvider

Raster log image data provider for IVAAP backends.

Wraps the IVAAP rasterlogimages tile service, applying image transformation (morphing correction) via WebGL before delivering each tile.

Hierarchy

Table of contents

Constructors
  • [new RasterLogProvider(baseUrl, httpService, sourceInfo, contentType, segmentId, metadataUrl)](/solutions/geotoolkit/GeoToolkit_JS/apis/classes/geotoolkit.ivaapbackend.well.rasterlogprovider.rasterlogprovider.md#new rasterlogprovider(baseurl, httpservice, sourceinfo, contenttype, segmentid, metadataurl))
Methods

Contents

Constructors

new RasterLogProvider(baseUrl, httpService, sourceInfo, contentType, segmentId, metadataUrl)

• new RasterLogProvider(baseUrl, httpService, sourceInfo, contentType?, segmentId?, metadataUrl?)

Creates a new RasterLogProvider.

Parameters

Name Type Description
baseUrlstringbase server URL (typically the IVAAP host)
httpServiceAbstractHttpServiceauthenticated HTTP service
sourceInfoSourceInfosource info from the rasterlogimages metadata endpoint
Optional contentTypestringimage content type; defaults to 'body'
Optional segmentIdstringoptional segment id; if omitted, the first matching section is used
Optional metadataUrlstringfull metadata URL used to load sourceInfo; when provided, enables loadImageByType to fetch image types not present in sourceInfo by substituting the content-type value in the URL and appending /content

Overrides

EventDispatcher.constructor

Methods

dispose

▸ dispose(): void

Dispose.

Returns

void

Inherited from

EventDispatcher.dispose


getClassName

▸ getClassName(): string

Returns

string

Inherited from

EventDispatcher.getClassName


getImageInfo

▸ getImageInfo(): ImageInfo

Returns metadata for the currently selected image section.

Throws

if the provider was not successfully initialized

Returns

ImageInfo


getImageLoader

▸ getImageLoader(): ImageCallback<TileRequest&gt;

Returns an image loader callback for tiled image rendering. Each tile is fetched from the IVAAP tile endpoint as JSON and the embedded image bytes are morphed using WebGL before being returned as a data URL.

Returns

ImageCallback<TileRequest&gt;

image loader callback for use with tiled image visuals


getImagesInfo

▸ getImagesInfo(): ImageSection[]

Returns metadata for all available image sections in the source.

Returns

ImageSection[]


getSegmentId

▸ getSegmentId(): string

Returns the segment id of the currently opened image section, or null when the provider is not opened.

Returns

string


getTileURLFormatter

▸ getTileURLFormatter(): Formatter<TileRequest&gt;

Returns a formatter function for tiled image rendering. The formatter maps tile device coordinates to original image pixel coordinates and builds the IVAAP tile service URL.

Returns

Formatter<TileRequest&gt;

formatter callback for use with tiled image visuals


hasEventListener

▸ hasEventListener(type, callback?): boolean

Check if a list of event listeners for this type contains this listener

Parameters

Name Type Description
typestringtype of event or property
Optional callbackFunctionto be called, if null, check if any callback is registered

Returns

boolean

Inherited from

EventDispatcher.hasEventListener


isDisposed

▸ isDisposed(): boolean

Returns whether this object has been disposed

Returns

boolean

Inherited from

EventDispatcher.isDisposed


isOpened

▸ isOpened(): boolean

Returns true if the provider has successfully opened a data section.

Returns

boolean


isSilent

▸ isSilent(): boolean

Return true if the event dispatcher doesn't notify any events

Returns

boolean

Inherited from

EventDispatcher.isSilent


loadImageByType

▸ loadImageByType(type, segmentId?): Promise<string&gt;

Loads a full (non-tiled) image of the given content type from the IVAAP rasterlogimages endpoint and returns a blob object URL suitable for use as an &lt;img&gt; src.

The method looks up an image section whose type matches the supplied argument, retrieves the Content HATEOAS link from that section, fetches the image as a binary blob, and wraps it in a blob object URL. The caller is responsible for revoking the URL when it is no longer needed.

Throws

if the provider is not opened

Parameters

Name Type Description
typestringcontent type identifier, e.g. 'TopScale' or 'Header'
Optional segmentIdstringoptional segment id; falls back to the first matching section when omitted

Returns

Promise<string&gt;

a promise that resolves to a blob object URL string, or null when no section with the requested type exists in the source info


notify

▸ notify(type, source, args?): RasterLogProvider

Notify listeners

Parameters

Name Type Description
typestringevent types
sourceanyof the event
Optional argsanyarguments of the event

Returns

RasterLogProvider

this

Inherited from

EventDispatcher.notify


off

▸ off(type?, callback?): RasterLogProvider

Detach listener on event. Calling .off() with no arguments removes all attached listeners. Calling .off(type) with no callback removes all attached listeners for specific type.

Parameters

Name Type Description
Optional typestringtype of the event
Optional callbackEventListenerfunction to be called

Returns

RasterLogProvider

this

Inherited from

EventDispatcher.off

▸ off<E&gt;(type, callback): RasterLogProvider

Type parameters

NameType
Eextends string

Parameters

Name Type
typeE
callback(eventType: E, sender: RasterLogProvider, args: EventMap[E]) => void

Returns

RasterLogProvider

Inherited from

EventDispatcher.off


on

▸ on(type, callback, options?): RasterLogProvider

Attach listener on event that will be called whenever the specified event is delivered to the target <p> If the callback function is already in the list of event listeners for this target, the function is not added a second time. </p> <p> If a particular anonymous function is in the list of event listeners registered for a certain target, and then later in the code, an identical anonymous function is given in an "on" call, the second function will also be added to the list of event listeners for that target. </p>

Parameters

Name Type Description
typestringtype of event or property
callbackEventListenerto be called
Optional optionsOptionsoptions of subscription

Returns

RasterLogProvider

this

Inherited from

EventDispatcher.on

▸ on<E&gt;(type, callback, options?): RasterLogProvider

Type parameters

NameType
Eextends string

Parameters

Name Type
typeE
callback(eventType: E, sender: RasterLogProvider, args: EventMap[E]) => void
Optional optionsOptions

Returns

RasterLogProvider

Inherited from

EventDispatcher.on


setSilent

▸ setSilent(bool): RasterLogProvider

Set silent mode

Parameters

Name Type Description
boolbooleanflag to enable silent mode

Returns

RasterLogProvider

this

Inherited from

EventDispatcher.setSilent


updateSegment

▸ updateSegment(segmentId?): Promise<never&gt; | RasterLogProvider

Re-initializes the provider for a different segment. Call this when the user switches between log segments (e.g. different depth intervals).

Parameters

Name Type Description
Optional segmentIdstringthe new segment id; if omitted, first matching section is used

Returns

Promise<never&gt; | RasterLogProvider

this, or a rejected Promise if no matching section is found


getClassName

▸ Static getClassName(): string

Returns

string

Inherited from

EventDispatcher.getClassName