轉換爲PostGIS的二進制您可以結合ST_DUMP
和ST_INTERSECTS
功能陣列幾何(MULTIGEOMETRY TYPE)
St_astext(包裹。的geom);
MULTIPOLYGON(((398140.945672642 4542263.06495453,398140.410405475 4542262.72839343,398140.513367039 4542263.18287079,398140.945672642 4542263.06495453)),
((398147.309882976 4542261.32904395,398146.58758329 4542258.33481488,398144.165643562 4542262.18667092,398147.309882976 4542261.32904395)),
((398141.915568335 4542238.96883738,398135.522133265 4542241.15138888,398138.811826236 4542255.67218681,398140.343422935 4542253.23633343,398146.254207604 4542256.95287011,398141.915568335 4542238.96883738)))
這是我的數據庫的一個例子 - 簽入;
select a.objectid,b.fid ,st_intersects (a.poly,b.geom)
from region a,
(
select objectid::text||((st_dump(poly)).path[1]::text) as fid, (st_dump(poly)).geom as geom
from parcel where geometrytype(poly)='MULTIPOLYGON')
as b
http://www.postgis.org/docs/ST_Dump.html
http://postgis.org/docs/ST_Intersects.html
AFAIK沒有辦法做到這一點。您必須循環 –