Skip to main content

Class: GeoJSONShapesDataProvider

Defined in: @tissuumaps-storage/src/geojson/GeoJSONShapesDataProvider.ts:14

Data provider for shape (polygon) collections

Implements

Constructors

Constructor

new GeoJSONShapesDataProvider(): GeoJSONShapesDataProvider

Returns

GeoJSONShapesDataProvider

Properties

name

readonly name: "GeoJSON" = "GeoJSON"

Defined in: @tissuumaps-storage/src/geojson/GeoJSONShapesDataProvider.ts:19

The name of the data provider

Implementation of

ShapesDataProvider.name


schema

readonly schema: object

Defined in: @tissuumaps-storage/src/geojson/GeoJSONShapesDataProvider.ts:21

The JSON schema for the data source

properties

properties: object

properties.idProperty

idProperty: object

properties.idProperty.type

type: string = "string"

properties.nameProperty

nameProperty: object

properties.nameProperty.type

type: string = "string"

properties.table

table: object

properties.table.type

type: string = "string"

properties.url

url: object

properties.url.type

type: string = "string"

required

required: string[]

type

type: string = "object"

Implementation of

ShapesDataProvider.schema


uischema

readonly uischema: object

Defined in: @tissuumaps-storage/src/geojson/GeoJSONShapesDataProvider.ts:41

The JSON Forms UI schema for the data source

elements

elements: object[]

type

type: string = "VerticalLayout"

Implementation of

ShapesDataProvider.uischema

Methods

load()

load(normalizedDataSource, options?): Promise<GeoJSONShapesData>

Defined in: @tissuumaps-storage/src/geojson/GeoJSONShapesDataProvider.ts:79

Opens a data source and returns the loaded data accessor

The data source has to have been normalized by DataProvider.normalize beforehand.

Parameters

normalizedDataSource

NormalizedGeoJSONShapesDataSource

The normalized data source to open

options?

DataProviderLoadOptions

See AnnotatedDataProviderLoadOptions

Returns

Promise<GeoJSONShapesData>

A promise that resolves to the loaded data accessor

Implementation of

ShapesDataProvider.load


normalize()

normalize(dataSource, projectUrl): NormalizedGeoJSONShapesDataSource

Defined in: @tissuumaps-storage/src/geojson/GeoJSONShapesDataProvider.ts:68

Returns the data source with all of this data provider's defaults applied and all of its relative URLs resolved

Data sources that normalize to the same value are considered equal, and their data is loaded only once and shared between all referencing objects. Normalization has to be idempotent: normalizing an already normalized data source must return the same value again.

Relative URLs are resolved against the URL the project was loaded from, and against the document base URL for projects without one.

Parameters

dataSource

GeoJSONShapesDataSource

The data source to normalize

projectUrl

string | null

The absolute URL of the project, or null for projects that were not loaded from a URL

Returns

NormalizedGeoJSONShapesDataSource

The normalized data source

Implementation of

ShapesDataProvider.normalize