# Geo\_shape - geo link problems with coordinates

**URL:** https://discuss.elastic.co/t/geo-shape-geo-link-problems-with-coordinates/179924
**Category:** Logstash
**Created:** [May 7, 2019, 8:57am UTC](https://discuss.elastic.co/t/geo-shape-geo-link-problems-with-coordinates/179924 "2019-05-07T08:57:56Z")
**Posts on this page:** 1
**Showing post:** 6

<div class="post-metadata">

### Author: ![Badger](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/badger/32/25190_2.png) [@Badger](https://discuss.elastic.co/u/Badger)
#### Post date: [May 8, 2019, 12:45pm UTC](https://discuss.elastic.co/t/geo-shape-geo-link-problems-with-coordinates/179924/6 "2019-05-08T12:45:58Z")

</div>

I cannot see a way to create an array of arrays of floats using mutate. So use ruby

```
    mutate {
        add_field => {
            "[geo_link][type]" => "linestring"
        }
    }
    ruby {
        code => '
            event.set("[geo_link][coordinates]", [[-87.623171, 41.881832], [-87.623177, 41.881833]])
        '
    }

```

which results in

```
  "geo_link" => {
           "type" => "linestring",
    "coordinates" => [
        [0] [
            [0] -87.623171,
            [1] 41.881832
        ],
        [1] [
            [0] -87.623177,
            [1] 41.881833
        ]
    ]
},
```

---

_[View the full topic](https://discuss.elastic.co/t/geo-shape-geo-link-problems-with-coordinates/179924)._
