> **Documentation Index:** Fetch the complete configuration index at https://yandex.com/dev/maps/ymapsml/doc/en/llms.txt

# Setting geometric and geographical data

The section [Geometric and geographical data](https://yandex.com/dev/maps/ymapsml/doc/en/guide/concepts/geodata.md) lists the elements that are used for defining geometric properties of geographical objects. Each element corresponds to a geometric shape and a geo object that is used for displaying this shape on the map.

The geometric shape is bound to a locality by setting the coordinates of corresponding points. For a geometric point, its coordinates are set; for a polyline, the coordinates of its points; for a polygon, the coordinates of the points of the closed polylines that make up its exterior and interior edges.

The coordinates of points and polyline points are set using the [gml:pos](https://yandex.com/dev/maps/ymapsml/doc/en/ref/reference/gml-pos.md) and [gml:posList](https://yandex.com/dev/maps/ymapsml/doc/en/ref/reference/gml-posList.md) elements. To specify the coordinates that define the viewport or a polygon outline, the [gml:lowerCorner](https://yandex.com/dev/maps/ymapsml/doc/en/ref/reference/gml-lowerCorner.md) and [gml:upperCorner](https://yandex.com/dev/maps/ymapsml/doc/en/ref/reference/gml-upperCorner.md) elements are used.

To set the coordinates of a point, its longitude and latitude are listed in order and separated by a space. For example: `<gml:pos>55.0298 82.9197</gml:pos>`. This is how coordinates are set for points that are described using the [gml:pos](https://yandex.com/dev/maps/ymapsml/doc/en/ref/reference/gml-pos.md), [gml:lowerCorner](https://yandex.com/dev/maps/ymapsml/doc/en/ref/reference/gml-lowerCorner.md), and [gml:upperCorner](https://yandex.com/dev/maps/ymapsml/doc/en/ref/reference/gml-upperCorner.md) elements. When setting coordinates for a sequence of points using the [gml:posList](https://yandex.com/dev/maps/ymapsml/doc/en/ref/reference/gml-posList.md) element, pairs of point coordinates are separated by a space in the same way. For example, `<gml:posList>55.0298 82.9197 55.0496 82.9694</gml:posList>`.

### Geometric point

To define the coordinates of a geometric point, use the [gml: pos](https://yandex.com/dev/maps/ymapsml/doc/en/ref/reference/gml-pos.md) element.

```
<ymaps:GeoObject>    <gml:name>Point on map</gml:name>    <gml:description>Billy was here</gml:description>    <gml:Point>        <gml:pos>-119.755992 34.406958</gml:pos>    </gml:Point></ymaps:GeoObject>
```

[Example in the sandbox](https://tech.yandex.ru/maps/jsbox/2.1/ymapsml_simpleobject)

### Polyline and closed polyline

To set the points of a polyline, either two or more [gml:pos](https://yandex.com/dev/maps/ymapsml/doc/en/ref/reference/gml-pos.md) elements or the [gml:posList](https://yandex.com/dev/maps/ymapsml/doc/en/ref/reference/gml-posList.md) element can be used.

```
<ymaps:GeoObject>
    <gml:name>Polyline</gml:name>
    <gml:description>Polyline point coordinates can be set using two or more  elements gml:pos</gml:description>
    <gml:LineString>
        <gml:pos>32.199411 58.601185</gml:pos>
        <gml:pos>32.189411 58.595185</gml:pos>
    </gml:LineString>
</ymaps:GeoObject>
```

[Example in the sandbox](https://tech.yandex.ru/maps/jsbox/2.1/ymapsml_linestring)

```
<ymaps:GeoObject>
    <gml:name>Closed polyline</gml:name>
    <gml:description>Polyline point coordinates can also be set using the element gml:posList</gml:description>
    <gml:LinearRing>
        <gml:posList>37.178027 55.486953 38.040535 55.486953 38.040535 56.018499 37.178027 56.018499</gml:posList>
    </gml:LinearRing>
</ymaps:GeoObject>
```

[Example in the sandbox](https://tech.yandex.ru/maps/jsbox/2.1/ymapsml_linearring)

### Polygon

The exterior boundary of a polygon consists of a closed polyline, which is described using the [gml:LinearRing](https://yandex.com/dev/maps/ymapsml/doc/en/ref/reference/gml-LinearRing.md) element.

```
<ymaps:GeoObject>
    <gml:name>Polygon</gml:name>
    <gml:description>The exterior boundary of the polygon is a closed polyline</gml:description>
    <gml:Polygon>
        <gml:exterior>
            <gml:LinearRing>
                <gml:posList>37.178027 55.486953 38.040535 55.486953 38.040535 56.018499 37.178027 56.018499</gml:posList>
            </gml:LinearRing>
        </gml:exterior>
    </gml:Polygon>
</ymaps:GeoObject>
```

In this example, the [gml: LinearRing](https://yandex.com/dev/maps/ymapsml/doc/en/ref/reference/gml-LinearRing.md) element is located inside the [gml:exterior](https://yandex.com/dev/maps/ymapsml/doc/en/ref/reference/gml-exterior.md) container. This reflects the fact that a polygon can have not only an exterior edge, but an interior edge as well (a "hole" inside the polygon). In addition, the number of interior holes is unlimited.

The interior boundary of a polygon is also set using a closed polyline. The [gml: LinearRing](https://yandex.com/dev/maps/ymapsml/doc/en/ref/reference/gml-LinearRing.md) element is placed in the [gml: interior](https://yandex.com/dev/maps/ymapsml/doc/en/ref/reference/gml-interior.md) container. In the current version of the Yandex.Maps API, the contents of the [gml:interior](https://yandex.com/dev/maps/ymapsml/doc/en/ref/reference/gml-interior.md) element are not interpreted. A feature for processing interior edges of polygons is planned for one of the upcoming versions of the API.

[Example in the sandbox](https://tech.yandex.ru/maps/jsbox/2.1/ymapsml_polygon)

