API Documentation | All Packages | All Classes | Index | Frames No Frames |
Class GMLFormat

Package | org.openscales.core.format
Class | public class GMLFormat
Inheritance | GMLFormat Format
Subclasses | WFSFormat

Read/Write GML. Supports the GML simple features profile.

Public Properties

| Property | Defined by
--- | --- | ---
|  | dim : Number | GMLFormat
|  | externalProj : ProjProjection | GMLFormat
|  | extractAttributes : Boolean | GMLFormat
|  | internalProj : ProjProjection | GMLFormat

Protected Properties
Hide Inherited Protected Properties
Show Inherited Protected Properties

| Property | Defined by
--- | --- | ---
|  | _collectionName : String = "FeatureCollection" | GMLFormat
|  | _externalProj : ProjProjection = null | Format
|  | _featureName : String = "featureMember" | GMLFormat
|  | _featureNS : String = "http://openscales.org/OpenScales" | GMLFormat
|  | _featurePrefix : String = "OpenScales" | GMLFormat
|  | _geometryName : String = "geometry" | GMLFormat
|  | _gmlns : String = "http://www.opengis.net/gml" | GMLFormat
|  | _gmlprefix : String = "gml" | GMLFormat
|  | _internalProj : ProjProjection = null | Format
|  | _layerName : String = "features" | GMLFormat
|  | _wfsns : String = "http://www.opengis.net/wfs" | GMLFormat
|  | _wfsprefix : String = "wfs" | GMLFormat

Public Methods

| Method | Defined by
--- | --- | ---
|  | GMLFormat(extractAttributes:Boolean = true, onFeature:Function = null) GMLFormat constructor | GMLFormat
|  | buildCoordinatesNode(geometry:Object):XML Builds the coordinates XmlNode | GMLFormat
|  | buildGeometryNode(geometry:Object):XML create a GML Object | GMLFormat
|  | createFeatureXML(feature:Feature):XML Accept a Vector feature, and build a GML node for it. | GMLFormat
|  | parseAttributes(xmlNode:XML):Object Parse attributes | GMLFormat
|  | parseCoords(xmlNode:XML):Array Return an array of coords | GMLFormat
|  | parseFeature(xmlNode:XML):Feature It creates the geometries that are then attached to the returned feature, and calls parseAttributes() to get attribute data out. | GMLFormat
|  | parsePolygonNode(polygonNode:Object):Polygon Given a GML node representing a polygon geometry | GMLFormat
|  | read(data:Object):Object Read data | GMLFormat
|  | write(features:Object):Object Generate a GML document object given a list of features. | GMLFormat

Property detail

_collectionName | property

`protected var _collectionName:String = "FeatureCollection"`

dim | property |

`dim:Number` [read-write]Implementation
`public function get dim():Number`
`public function set dim(value:Number):void`

externalProj | property |

`externalProj:ProjProjection` [read-write]Implementation
`public function get externalProj():ProjProjection`
`public function set externalProj(value:ProjProjection):void`

extractAttributes | property |

`extractAttributes:Boolean` [read-write]Implementation
`public function get extractAttributes():Boolean`
`public function set extractAttributes(value:Boolean):void`

_featureName | property |

`protected var _featureName:String = "featureMember"`

_featureNS | property |

`protected var _featureNS:String = "http://openscales.org/OpenScales"`

_featurePrefix | property |

`protected var _featurePrefix:String = "OpenScales"`

_geometryName | property |

`protected var _geometryName:String = "geometry"`

_gmlns | property |

`protected var _gmlns:String = "http://www.opengis.net/gml"`

_gmlprefix | property |

`protected var _gmlprefix:String = "gml"`

internalProj | property |

`internalProj:ProjProjection` [read-write]Implementation
`public function get internalProj():ProjProjection`
`public function set internalProj(value:ProjProjection):void`

_layerName | property |

`protected var _layerName:String = "features"`

_wfsns | property |

`protected var _wfsns:String = "http://www.opengis.net/wfs"`

_wfsprefix | property |

`protected var _wfsprefix:String = "wfs"`
Constructor detail

GMLFormat | () | constructor

`public function GMLFormat(extractAttributes:Boolean = true, onFeature:Function = null)`

GMLFormat constructor

Parameters

| `extractAttributes:Boolean` (default = `true`)``
| `onFeature:Function` (default = `null`)``

Method detail

buildCoordinatesNode | () | method

`public function buildCoordinatesNode(geometry:Object):XML`

Builds the coordinates XmlNode

Parameters

| `geometry:Object`

Returns

| `XML` — created xmlNode

buildGeometryNode | () | method |

`public function buildGeometryNode(geometry:Object):XML`

create a GML Object

Parameters

| `geometry:Object`

Returns

| `XML` — an XML

createFeatureXML | () | method |

`public function createFeatureXML(feature:Feature):XML`

Accept a Vector feature, and build a GML node for it.

Parameters

| `feature:Feature` — The feature to be built as GML.

Returns

| `XML` — A node reprensting the feature in GML.

parseAttributes | () | method |

`public function parseAttributes(xmlNode:XML):Object`

Parse attributes

Parameters

| `xmlNode:XML` — A XML feature node.

Returns

| `Object` — An attributes object.

parseCoords | () | method |

`public function parseCoords(xmlNode:XML):Array`

Return an array of coords

Parameters

| `xmlNode:XML`

Returns

| `Array`

parseFeature | () | method |

`public function parseFeature(xmlNode:XML):Feature`

It creates the geometries that are then attached to the returned feature, and calls parseAttributes() to get attribute data out. Important note: All geom node names 'the_geom.:' have been removed until a config is implemented to be able to parse the geom nodes in a generic way. See Issue 185 for more info.

Parameters

| `xmlNode:XML` — A XML feature node.

Returns

| `Feature` — A vetor of feature

parsePolygonNode | () | method |

`public function parsePolygonNode(polygonNode:Object):Polygon`

Given a GML node representing a polygon geometry

Parameters

| `polygonNode:Object`

Returns

| `Polygon` — A polygon geometry.

read | () | method |

`public override function read(data:Object):Object`

Read data

Parameters

| `data:Object` — data to read/parse.

Returns

| `Object` — features.

write | () | method |

`public override function write(features:Object):Object`

Generate a GML document object given a list of features.

Parameters

| `features:Object` — List of features to serialize into an object.

Returns

| `Object` — An object representing the GML document.