Skip to content

CkanItemReference

Creates a calalog item that references a ckan item.

Note:

  • The property resourceId in the example below is a Ckan resource Id that references a geospatial type (wms) data.
  • Example usage

    {
      "url": "https://discover.data.vic.gov.au",
      "type": "ckan-item",
      "resourceId": "22b8cf52-4583-4609-a3da-a6e1805829d9",
      "name": "A Ckan Item (WMS)",
      "id": "some id"
    }
    

    CkanCatalogItemTraits

    Trait Type Default Description
    datasetId string

    The CKAN ID of the dataset.

    resourceId string

    The Resource ID of the dataset to use

    AttributionTraits
    attribution string

    The attribution to display with the data.

    CatalogMemberReferenceTraits
    name string

    The name to use for this catalog member before the reference is loaded.

    description string

    The description to use for this catalog member before the reference is loaded. Markdown and HTML may be used.

    dataCustodian string

    Gets or sets a description of the custodian of this data item.

    isGroup boolean

    Is the target of this reference expected to be a catalog group?

    isFunction boolean

    Is the target of this reference expected to be a catalog function?

    isMappable boolean

    Is the target of this reference expected to have map items?

    isChartable boolean

    Is the target of this reference expected to have chart items?

    CkanSharedTraits
    useResourceName boolean

    True to use the name of the resource for the name of the catalog item; false to use the name of the dataset.

    useDatasetNameAndFormatWhereMultipleResources boolean true

    Use a combination of the name and the resource format and dataset where there are multiple resources for a single dataset.

    useCombinationNameWhereMultipleResources boolean

    Use a combination of the name and the resource and dataset name where there are multiple resources for a single dataset.

    supportedResourceFormats CkanResourceFormatTraits[]

    The supported distribution formats and their mapping to Terria types. These are listed in order of preference.

    useSingleResource boolean

    Only use a single resource for each dataset. If multiple resources exist, the highest match from supportedResourceFormats will be used. If this is true, then useDatasetNameAndFormatWhereMultipleResources and useCombinationNameWhereMultipleResources will be ignored

    ItemPropertiesTraits
    itemProperties any

    Sets traits on group member items (note - will not set traits to sub-groups). This applies to all nested group members (eg members in sub-groups). Also see itemPropertiesByType and itemPropertiesByIds.

    Item properties will be set in the following order (highest to lowest priority) itemPropertiesByIds, itemPropertiesByType, itemProperties.

    itemPropertiesByType ItemPropertiesByTypeTraits[]

    Sets traits on group member items by model type (eg csv or geojson). This applies to all nested group members (eg members in sub-groups). Only one itemProperties can be specified per type.

    Item properties will be set in the following order (highest to lowest priority) itemPropertiesByIds, itemPropertiesByType, itemProperties.

    itemPropertiesByIds ItemPropertiesByIdTraits[]

    Sets traits on group member items by model ID. This applies to all nested group members (eg members in sub-groups). Only one itemProperties can be specified per id.

    Item properties will be set in the following order (highest to lowest priority) itemPropertiesByIds, itemPropertiesByType, itemProperties.

    MappableTraits
    rectangle RectangleTraits

    The bounding box rectangle that contains all the data in this catalog item.

    idealZoom IdealZoomTraits

    Override default ideal zoom if the given values are valid.

    disablePreview boolean

    Disables the preview on the Add Data panel. This is useful when the preview will be very slow to load.

    disableZoomTo boolean

    Disables the zoom to (aka 'Ideal Zoom') button in the workbench.

    zoomOnAddToWorkbench boolean

    Zoom to dataset when added to workbench. Doesn't work if disableZoomTo is true.

    show boolean true

    Show or hide a workbench item. When show is false, a mappable item is removed from the map and a chartable item is removed from the chart panel.

    initialMessage InitialMessageTraits

    A message to show when the user adds the catalog item to the workbench. Useful for showing disclaimers.

    featureInfoTemplate FeatureInfoTemplateTraits

    A template object for formatting content in feature info panel

    showStringIfPropertyValueIsNull string

    If the value of a property is null or undefined, show the specified string as the value of the property. Otherwise, the property name will not be listed at all.

    maximumShownFeatureInfos number

    The maximum number of "feature infos" that can be displayed in feature info panel.

    ReferenceTraits
    isOpenInWorkbench boolean true

    Whether the item in the workbench open or collapsed.

    UrlTraits
    url string

    The base URL of the file or service.

    forceProxy boolean

    Force the default proxy to be used for all network requests.

    cacheDuration string 1d

    The cache duration to use for proxied URLs for this catalog member. If undefined, proxied URLs are effectively cachable forever. The duration is expressed as a Varnish-like duration string, such as '1d' (one day) or '10000s' (ten thousand seconds).

    CkanResourceFormatTraits

    Trait Type Default Description
    id string

    The ID of this distribution format.

    formatRegex string

    A regular expression that is matched against the distribution's format. This must be defined for this format to be used

    urlRegex string

    A regular expression that is matched against the url, this will only be used if formatRegex matches.

    maxFileSize number

    The maximum allowed file size for this format (in megabytes).

    onlyUseIfSoleResource boolean

    This resource will only match if no other resource types match for a given dataset. Like a "last-resort" resource. This will be ignored if useSingleResource is used

    removeDuplicates boolean true

    Remove resources if they have the same name. If duplicates are found, then the newest resource will be used (according to created property). This is applied per format

    definition any

    The catalog member definition to use when the URL and Format regular expressions match. The URL property will also be set.

    ItemPropertiesByTypeTraits

    Trait Type Default Description
    type string

    The type of model to apply itemProperties to. This must be defined.

    itemProperties any

    Sets traits on group member items of specified type. This applies to all nested group members (eg members in sub-groups)

    ItemPropertiesByIdTraits

    Trait Type Default Description
    ids string[]

    The IDs of models to apply itemProperties to.

    itemProperties any

    Sets traits on group member items of specified id. This applies to all nested group members (eg members in sub-groups)

    RectangleTraits

    Trait Type Default Description
    west number

    The westernmost longitude in degrees.

    south number

    The southernmost longitude in degrees.

    east number

    The easternmost longitude in degrees.

    north number

    The northernmost longitude in degrees.

    CameraTraits
    position VectorTraits

    Position of the camera in the Earth-centered Fixed frame in meters.

    direction VectorTraits

    The look direction of the camera in the Earth-centered Fixed frame.

    up VectorTraits

    The up vector direction of the camera in the Earth-centered Fixed frame.

    VectorTraits

    Trait Type Default Description
    x number

    X component of vector in the Earth-centered Fixed frame.

    y number

    Y component of vector in the Earth-centered Fixed frame.

    z number

    Z component of vector in the Earth-centered Fixed frame.

    IdealZoomTraits

    Trait Type Default Description
    lookAt LookAtTraits

    Parameters for camera to look at a target.

    camera CameraTraits

    Use camera position, direction and up if fully defined. Otherwise use rectangle if fully defined.

    LookAtTraits

    Trait Type Default Description
    targetLongitude number

    Target longitude on the WGS84 ellipsoid in degrees

    targetLatitude number

    Target latitude on the WGS84 ellipsoid in degrees

    targetHeight number 100

    Target height in meters. Treat it as camera height. A positive value is above the WGS84 ellipsoid. Default to 100 meters.

    heading number

    Heading in degrees. Treat it as camera bearing. North is 0. A positive value rotates clockwise, negative anti-clockwise. Default to 0.

    pitch number 45

    Pitch in degrees. Treat it as camera pitch. A positive value is to look down, negative up. Default to 45.

    range number 500

    The range in meters. It is the distance between the target position and camera position projected onto the local plane. Not negative and default to 500.

    CameraTraits

    Trait Type Default Description
    position VectorTraits

    Position of the camera in the Earth-centered Fixed frame in meters.

    direction VectorTraits

    The look direction of the camera in the Earth-centered Fixed frame.

    up VectorTraits

    The up vector direction of the camera in the Earth-centered Fixed frame.

    RectangleTraits
    west number

    The westernmost longitude in degrees.

    south number

    The southernmost longitude in degrees.

    east number

    The easternmost longitude in degrees.

    north number

    The northernmost longitude in degrees.

    InitialMessageTraits

    Trait Type Default Description
    title string

    The title of the message.

    content string

    The content of the message.

    key string

    Identifier. If multiple messages with the same key are triggered, only the first will be displayed.

    confirmation boolean

    Whether the message requires confirmation.

    confirmText string

    If confirmation is true, the text to put on the confirmation button.

    width number

    Width of the message.

    height number

    Height of the message.

    FeatureInfoTemplateTraits

    Trait Type Default Description
    name string

    A mustache template string for formatting name

    template string

    A Mustache template string for formatting description

    showFeatureInfoDownloadWithTemplate boolean

    Show feature info download if a template has been provided. If no template is provided, then download will always show.

    partials any

    An object, mapping partial names to a template string. Defines the partials used in Template.

    formats any

    An object, mapping field names to formatting options.