# Circle radius propblem v8.5.3

**URL:** <https://discuss.elastic.co/t/circle-radius-propblem-v8-5-3/321091>\
**Category:** Elasticsearch\
**Tags:** ingest-pipeline\
**Created:** [December 13, 2022, 6:33am UTC](https://discuss.elastic.co/t/circle-radius-propblem-v8-5-3/321091 "2022-12-13T06:33:26Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Dat\_Le\_Tien](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dat_le_tien/32/46835_2.png) [@Dat\_Le\_Tien](https://discuss.elastic.co/u/Dat_Le_Tien)\
**Post date:** [December 13, 2022, 6:33am UTC](https://discuss.elastic.co/t/circle-radius-propblem-v8-5-3/321091/1 "2022-12-13T06:33:27Z")

</div>

I'm trying to insert a location that is using a circle processor to generate the circle points. Location [30, 10] in the document is generated with the circle points properly.  
docs: [Circle processor | Elasticsearch Guide [8.5] | Elastic](https://www.elastic.co/guide/en/elasticsearch/reference/8.5/ingest-circle-processor.html)

```auto
PUT _ingest/pipeline/polygonize_circles
{
  "description": "translate circle to polygon",
  "processors": [
    {
      "circle": {
        "field": "circle",
        "error_distance": 1,
        "shape_type": "geo_shape"
      }
    }
  ]
}

PUT circles
{
  "mappings": {
    "properties": {
      "circle": {
        "type": "geo_shape"
      }
    }
  }
}
 

PUT circles/_doc/2?pipeline=polygonize_circles
{
  "circle": {
    "type": "circle",
    "radius": "40m",
    "coordinates": [35.539917, -78.472000]
  }
}

GET circles/_doc/2

But if I use another location. The generated coordinate looks like an oval with the wrong radius.

my location [35.54171753710938, -78.472]

created coordinates:
"circle": {
            "coordinates": [
              [
                [
                  35.54171753710938,
                  -78.472
                ],
                [
                  35.54112406581135,
                  -78.47173430472324
                ],
                [
                  35.540630197847186,
                  -78.47167003953963
                ],
                [
                  35.540375564960186,
                  -78.47165140797998
                ],
                [
                  35.54021828908823,
                  -78.47164529506406
                ],
                [
                  35.54010640465818,
                  -78.47164274491611
                ],
                [
                  35.54001650261309,
                  -78.47164162397662
                ],
                [
                  35.53993651647515,
                  -78.47164003979641
                ],
                [
                  35.539858062238046,
                  -78.47164049555624
                ],
                [
                  35.53977439153409,
                  -78.47164207973975
                ],
                [
                  35.5396750942597,
                  -78.47164321572573
                ],
                [
                  35.5395458932956,
                  -78.47164846905713
                ],
                [
                  35.539348254773515,
                  -78.47165779735127
                ],
                [
                  35.53899878746994,
                  -78.47169061817682
                ],
                [
                  35.53833938849573,
                  -78.47182842440924
                ],
                [
                  35.53833938849573,
                  -78.47217157559075
                ],
                [
                  35.53899878746994,
                  -78.47230938182317
                ],
                [
                  35.539348254773515,
                  -78.47234220264872
                ],
                [
                  35.5395458932956,
                  -78.47235153094286
                ],
                [
                  35.5396750942597,
                  -78.47235678427425
                ],
                [
                  35.53977439153409,
                  -78.47235792026024
                ],
                [
                  35.539858062238046,
                  -78.47235950444374
                ],
                [
                  35.53993651647515,
                  -78.47235996020358
                ],
                [
                  35.54001650261309,
                  -78.47235837602337
                ],
                [
                  35.54010640465818,
                  -78.47235725508388
                ],
                [
                  35.54021828908823,
                  -78.47235470493592
                ],
                [
                  35.540375564960186,
                  -78.47234859202001
                ],
                [
                  35.540630197847186,
                  -78.47232996046036
                ],
                [
                  35.54112406581135,
                  -78.47226569527675
                ],
                [
                  35.54171753710938,
                  -78.472
                ]
              ]
            ],
            "type": "Polygon"
          }

```

Is it an issue or It's working as expected? Because the coordinates are not a circle so it's impacting the search result.

---

<div class="post-metadata">

**Author:** ![Ignacio\_Vera](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ignacio_vera/32/36674_2.png) [@Ignacio\_Vera](https://discuss.elastic.co/u/Ignacio_Vera)\
**Post date:** [December 13, 2022, 12:55pm UTC](https://discuss.elastic.co/t/circle-radius-propblem-v8-5-3/321091/2 "2022-12-13T12:55:37Z")

</div>

This is working as expected, the circle processor "polygonize" the circle as the index does not support indexing circles natively.

---

<div class="post-metadata">

**Author:** ![Dat\_Le\_Tien](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dat_le_tien/32/46835_2.png) [@Dat\_Le\_Tien](https://discuss.elastic.co/u/Dat_Le_Tien)\
**Post date:** [December 14, 2022, 3:21am UTC](https://discuss.elastic.co/t/circle-radius-propblem-v8-5-3/321091/3 "2022-12-14T03:21:28Z")

</div>

@Ignacio_Vera

Thanks for your reply. Is there any way to transform a point along with the radius to a circle similar CircleShape in ESS 6.8? We are doing the upgrade from 6.8 to 8.5.3 and got this issue by using the Circle Processor.  
When I map the generated coordinate in Gooogle Maps. It looks like this.

 ![2022-12-12_13h10_40](https://us1.discourse-cdn.com/elastic/original/3X/6/4/643c02ca404d841e1af61f0f65bdbcd66a51a161.png)

---

<div class="post-metadata">

**Author:** ![Ignacio\_Vera](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ignacio_vera/32/36674_2.png) [@Ignacio\_Vera](https://discuss.elastic.co/u/Ignacio_Vera)\
**Post date:** [December 14, 2022, 8:16am UTC](https://discuss.elastic.co/t/circle-radius-propblem-v8-5-3/321091/4 "2022-12-14T08:16:17Z")

</div>

I tried your first example and indeed the generated polygon looks in kibana maps like :

 ![image](https://us1.discourse-cdn.com/elastic/original/3X/d/5/d5c71867d51dff54550e76b23cb351b24112d268.png)

But this is a problem of the precision you are using. If I change the precision to 0.001:

```auto
PUT _ingest/pipeline/polygonize_circles
{
  "description": "translate circle to polygon",
  "processors": [
    {
      "circle": {
        "field": "circle",
        "error_distance": 0.01,
        "shape_type": "geo_shape"
      }
    }
  ]
}

```

Then it looks much better:

 ![image](https://us1.discourse-cdn.com/elastic/original/3X/c/1/c13f1ed6e213dcaf62027aef7eb430e59fcab05c.png)

Could you explain how are you generating the second example? I tried to see if I can reproduce it but I could not. I tried the following:

```auto
PUT _ingest/pipeline/polygonize_circles
{
  "description": "translate circle to polygon",
  "processors": [
    {
      "circle": {
        "field": "circle",
        "error_distance": 100,
        "shape_type": "geo_shape"
      }
    }
  ]
}

PUT circles/_doc/2?pipeline=polygonize_circles
{
  "circle": {
    "type": "circle",
    "radius": "2000m",
    "coordinates": [-122.25, 37.47]
  }
}

```

And it looks like:

 ![image](https://us1.discourse-cdn.com/elastic/original/3X/8/e/8e015f9f4f66524c6a2bea4395c70fe529f1ae4d.jpeg)

---

<div class="post-metadata">

**Author:** ![Dat\_Le\_Tien](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dat_le_tien/32/46835_2.png) [@Dat\_Le\_Tien](https://discuss.elastic.co/u/Dat_Le_Tien)\
**Post date:** [December 15, 2022, 3:08am UTC](https://discuss.elastic.co/t/circle-radius-propblem-v8-5-3/321091/5 "2022-12-15T03:08:52Z")

</div>

Sorry. I missed it. The input coordinate should be lon, lat instead of lat, lon. It's working now.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [January 12, 2023, 3:09am UTC](https://discuss.elastic.co/t/circle-radius-propblem-v8-5-3/321091/6 "2023-01-12T03:09:24Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
