How can I create a polygon using fields in PostgreSQL?

前端 未结 3 1072
心在旅途
心在旅途 2021-01-11 17:40

I have 8 real values in a table that I\'d like to combine into a polygon. I haven\'t been able to figure out how to create a polygon using these values though. I keep trying

3条回答
  •  旧时难觅i
    2021-01-11 18:31

    As mentioned by bvmou - GeomFromText will work fine. I'll just add a small syntax update:

    GeomFromText('POLYGON((long1 lat1, long2 lat2, long3 lat3))')
    

提交回复
热议问题