There is a mistake in make_rectangle_3points geometry: [![enter image description here][1]][1] It should be make_rectangle_3points( make_point(to_real(string_to_array(@lowerleft,',')[0]),to_real(string_to_array(@lowerleft,',')[1])), make_point(to_real(string_to_array(@upperright,',')[0]),to_real(string_to_array(@lowerleft,',')[1])), make_point(to_real(string_to_array(@upperright,',')[1]),to_real(string_to_array(@upperright,',')[1]) **--> Last line !** [![enter image description here][2]][2] [1]: https://i.sstatic.net/HT8CC.png [2]: https://i.sstatic.net/XY8y7.png