0
添加多邊形?使用gem postgis_adapter
local = Local.new(:geom => **Polygon('-71.1776585052917 42.3902909739571,-71.1776820268866 42.3903701743239,-71.1776063012595 42.3903825660754')**)
錯誤:語法錯誤,意想不到的tFLOAT,期待 '>'
添加多邊形?使用gem postgis_adapter
local = Local.new(:geom => **Polygon('-71.1776585052917 42.3902909739571,-71.1776820268866 42.3903701743239,-71.1776063012595 42.3903825660754')**)
錯誤:語法錯誤,意想不到的tFLOAT,期待 '>'
構建多邊形:
Polygon.from_coordinates([[[-71.1776585052917,42.3902909739571],[-71.1776820268866,42.3903701743239],[-71.1776063012595,42.3903825660754],[-71.1776585052917,42.3902909739571]]], 4326)
確保外部線性環閉合(即三角形有四個點)。我還設置了SRID = 4326,這是您使用WGS 84的猜測。