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.
Optional
options: GMLCodecConstructorOptionsan object literal that contains configuration settings for the codec.
Decodes the server response, which is valid GML, to a Feature instances.
The ID of decoded feature is retrieved from the gml:id
attribute.
If the attribute does not exist, the ID is auto-generated using
GMLCodecConstructorOptions.idProvider.
A Store.query invocation,
passing the options
parameter containing the data to decode.
If CodecDecodeOptions.reference option is present, the decoded features' shapes are encoded with this reference.
the decoding options
featureCursor a Feature instances corresponding to the server response.
Encoding is currently not supported. Calling this method will throw an error.
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 LuciadRIA shapes as follows:
A GMLCodec can be used in combination with a WFSFeatureStore to decode GML data directly from a WFS service.
A GMLCodec can also be used to decode a file directly from a url, using a UrlStore:
Spatial reference
The reference for shape decoding process is determined in the following way and order:
crs
field. This reference is used if you don't specify it in step 1 or 2.
Supported versions
LuciadRIA supports the GML 3.1 and GML 3.2 specifications, with the following limitations:
LuciadRIA supports the GML Circle (a circle defined by 3 points) and GML CircleByCenterPoint geometries, described in GML 3.2.1 specification. Circle geometries are interpolated to Polyline instances.