Skip to content

Element gmlLineString

The element gmlLineString is used to define a series of coordinates that collectively describe a geographical location. The application of gmlLineString can be in the form of a polyline or a polygon. The key assumption is that a line string consists of at least 2 coordinates, and these coordinates are distinct from one another.

The gmlLineString element has 3 attributes:

  1. The “posList” attribute, which contains the ordered list of two-dimensional or three-dimensional point coordinates according to EN ISO 19136 (corresponding GML attribute: gml).
  2. The “srsName” attribute, which specifies the Coordinate Reference System (CRS) used to interpret the corresponding coordinates in this gmlLineString. This attribute is defined according to the same standard. Unlike GML, where it is mandatory, if this attribute is not filled in, the CRS is considered to be "EPSG:4326".
  3. The “srsDimension” attribute, which indicates the number of coordinates for each point in the LineString. This value is 2 or 3. If it is not specified, the default value is "2".

The order of the coordinates is determined by the chosen CRS. Generally, the order is "latitude" followed by "longitude." The order of the points that form the line string determines the direction of the geographic feature.

Explanation of posList and srsDimension Combination

If the “posList” attribute contains a set of six coordinate values, and srsDimension has the value “2”, then a line is defined consisting of 3 points.
If the “posList” attribute contains a set of six coordinate values, and srsDimension has the value “3”, then a line is defined consisting of 2 points.

Elements

Element Type Required Domain Description
posList GmlPosList Yes N/A Textual description of the area
_gmlLineStringExtension _ExtensionType No N/A Optional extension for adding extra information

Attributes

Attribute Type Required Domain Description
srsDimension NonNegativeInteger No >=0 Number of dimensions used in the Spatial Referencing System (SRS)
srsName String No N/A Textual description of the Spatial Referencing System (SRS)

Subelement GmlPosList

The element GmlPosList is derived from the type LongString, which is essentially an xs:string. The content of the element is restricted by a pattern.

The allowed pattern is:

[-+]?[0-9]*\.?[0-9]+(\s[-+]?[0-9]*\.?[0-9]+){3,}
Go back to the previous page