# Postgres geometry to elasticsearch geo\_shape using logstash

**URL:** https://discuss.elastic.co/t/postgres-geometry-to-elasticsearch-geo-shape-using-logstash/235446
**Category:** Logstash
**Created:** [June 3, 2020, 2:37am UTC](https://discuss.elastic.co/t/postgres-geometry-to-elasticsearch-geo-shape-using-logstash/235446 "2020-06-03T02:37:56Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![ohoroyoi](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ohoroyoi/32/46820_2.png) [@ohoroyoi](https://discuss.elastic.co/u/ohoroyoi)
#### Post date: [June 3, 2020, 2:37am UTC](https://discuss.elastic.co/t/postgres-geometry-to-elasticsearch-geo-shape-using-logstash/235446/1 "2020-06-03T02:37:56Z")

</div>

I use the postgis function called `ST_AsText` to get the geometry field of postgres. That way, logstash's input is possible. But there is a problem. Since it is a string type, I want to move it to geo\_shape for elasticsearch. If you have had this problem, I hope you will share it. Thanks for reading.

---

<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: [July 1, 2020, 2:38am UTC](https://discuss.elastic.co/t/postgres-geometry-to-elasticsearch-geo-shape-using-logstash/235446/2 "2020-07-01T02:38:02Z")

</div>

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