Geometric and geographical data

The following elements are used for describing geometric properties of objects and their geographical coordinate positioning:

  1. gml:Point — Geometric point. It is used in cases when the shape and size of a geographical object are not important. The position of the point is set using geographical coordinates.
  2. gml:LineString — Polyline (line). Defined by setting the geographical coordinates of its points.
  3. gml:LinearRing — Closed polyline (line). Defined by setting the geographical coordinates of its points. It is automatically closed by connecting the first and last points.
  4. gml:Polygon — Polygon. A shape that has closed polylines for both its interior and exterior edges. It is defined by setting the geographical coordinates of the points on the polylines that make up the polygon boundaries. All polylines are automatically closed by connecting the first and last points.
Note. The GML standard assumes that the first and last points of closed polylines are the same. Automatically closing polylines is a feature of the Yandex.Maps JavaScript API.

All the elements listed can be displayed using built-in tools in the JavaScript API.

Another type of geographical data is a polygon outline. A polygon outline of an object or collection is a polygon that has a geographical object (or all the objects in a collection) inside it.

To create this type of polygon, the gml:boundedBy element is used. If this element is located inside the ymaps:GeoObject and ymaps:GeoObjectCollection elements, it is purely informative and does not directly affect the display of objects on the map. If the gml:boundedBy element is inside the repr:View element, it determines the map viewport.