# Possible malformed shape detected - ES 7.9.3

**URL:** https://discuss.elastic.co/t/possible-malformed-shape-detected-es-7-9-3/253804
**Category:** Elasticsearch
**Created:** [October 30, 2020, 11:25am UTC](https://discuss.elastic.co/t/possible-malformed-shape-detected-es-7-9-3/253804 "2020-10-30T11:25:42Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![oshan](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/oshan/32/61485_2.png) [@oshan](https://discuss.elastic.co/u/oshan)
#### Post date: [October 30, 2020, 11:25am UTC](https://discuss.elastic.co/t/possible-malformed-shape-detected-es-7-9-3/253804/1 "2020-10-30T11:25:43Z")

</div>

ES 7.9.3 throws a exception when I'm indexing this polygon.

`Possible malformed shape detected.type"":""mapper_parsing_exception"",""reason"":""failed to parse field [ranges.geometry] of type [geo_shape]`

polygon and the full error log can be found from this gist.

> <https://gist.github.com/oshanz/a5de454fbbb91c99fe817c1428ba5a61>

---

<div class="post-metadata">

### Author: ![jsanz](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jsanz/32/53734_2.png) [@jsanz](https://discuss.elastic.co/u/jsanz)
#### Post date: [October 30, 2020, 2:49pm UTC](https://discuss.elastic.co/t/possible-malformed-shape-detected-es-7-9-3/253804/2 "2020-10-30T14:49:12Z")

</div>

Try to fix invalid geometries using a tool like mapshaper ([web](https://mapshaper.org/) or from the [command line](https://github.com/mbloch/mapshaper/wiki/Command-Reference))

```bash
mapshaper \
-i test.geojson \
-clean -o format=geojson rfc7946 test.mapshaper.geojson

```

After that I could import the polygon into ES using Elastic Maps GeoJSON Upload without much issue

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

---

<div class="post-metadata">

### Author: ![oshan](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/oshan/32/61485_2.png) [@oshan](https://discuss.elastic.co/u/oshan)
#### Post date: [November 2, 2020, 4:18pm UTC](https://discuss.elastic.co/t/possible-malformed-shape-detected-es-7-9-3/253804/3 "2020-11-02T16:18:31Z")

</div>

It worked. even though there were some missing information from the trimming process. but I think I can manage that. also that tool had options to make adjustments. thanks

---

<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: [November 30, 2020, 4:18pm UTC](https://discuss.elastic.co/t/possible-malformed-shape-detected-es-7-9-3/253804/4 "2020-11-30T16:18:42Z")

</div>

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