Options
All
  • Public
  • Public/Protected
  • All
Menu

A GMLCodec is responsible for decoding a GML document object into a set of LuciadRIA Feature objects containing LuciadRIA geometries and properties.

The codec decodes GML geometries to shapes as follows:

The current implementation of GMLCodec is limited to the decoding of features containing the aforementioned geometry elements. Encoding is currently not supported.

A GMLCodec can be used in combination with a WFSFeatureStore to decode GML data directly from a WFS service:

  const storePromise = WFSFeatureStore.createFromURL("http://sampleservices.luciad.com/wfs", "usrivers", {
    codec: new GMLCodec(),
    outputFormat: "text/xml; subtype=gml/3.1.1"
  });

A GMLCodec can also be used to decode a file directly from a url, using a UrlStore:

  //Create a Store with a GeoJson codec to decode the data
  const store = new UrlStore({
    target: url,
    codec: new GMLCodec()
  });

  //Use the store to create a model
  const model = new FeatureModel(store);

  //Create a layer for the model
  const layer = new FeatureLayer(model);

  //Add the layer to the map
  map.layerTree.addChild(layer);

Supported versions

LuciadRIA supports supports the GML 3.1 and GML 3.2 specifications, with the following limitations:

  • The files must adhere to the Simple Feature Level-0 profile.
  • Only the first CRS reference is decoded. It is assumed that all other geometries use the same reference.
  • Envelopes are not decoded.

Hierarchy

Overview

Constructors

Methods

Constructors

constructor

  • Creates a GML codec. This codec has support for GML 3.1.1 and GML 3.2.1 with a simple feature profile level SF-0.

    Parameters

    Returns GMLCodec

Methods

decode

encode

  • (featureCursor: Cursor): { content: string; contentType: string }
  • Encoding is currently not supported. Calling this method will throw an error.

    Parameters

    Returns { content: string; contentType: string }

    • content: string
    • contentType: string

Legend

  • Module
  • Object literal
  • Variable
  • Function
  • Function with type parameter
  • Index signature
  • Type alias
  • Type alias with type parameter
  • Enumeration
  • Enumeration member
  • Property
  • Method
  • Interface
  • Interface with type parameter
  • Constructor
  • Property
  • Method
  • Index signature
  • Class
  • Class with type parameter
  • Constructor
  • Property
  • Method
  • Accessor
  • Index signature
  • Inherited constructor
  • Inherited property
  • Inherited method
  • Inherited accessor
  • Protected property
  • Protected method
  • Protected accessor
  • Private property
  • Private method
  • Private accessor
  • Static property
  • Static method