-- Variables for testing \set resolution 10 \set hexagon '\'8a63a9a99047fff\'' SELECT h3_geo_to_h3(h3_h3_to_geo(:hexagon), :resolution); h3_geo_to_h3 ----------------- 8a63a9a99047fff (1 row) SELECT h3_h3_to_geo_boundary(:hexagon); h3_h3_to_geo_boundary --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- ((55.6675104208598,12.5926363927131),(55.6671647139638,12.5921138130542),(55.6673742176306,12.5916086849498),(55.6679294210098,12.5916261357095),(55.6682751250888,12.5921487089117),(55.6680656286056,12.5926538378107)) (1 row) SELECT ST_AsEWKT( h3_h3_to_geo_boundary_geometry(:hexagon)); st_asewkt -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- SRID=4326;POLYGON((55.6675104208598 12.5926363927131,55.6671647139638 12.5921138130542,55.6673742176306 12.5916086849498,55.6679294210098 12.5916261357095,55.6682751250888 12.5921487089117,55.6680656286056 12.5926538378107,55.6675104208598 12.5926363927131)) (1 row)