我的坐标是:-48.54367281530538 -15.91180231568948
我需要知道这些坐标是否属于我的多角形
select boolean st_contains(st_geomfromtext('POINT(-48.54367281530538 -15.91180231568948)',4326), st_geomfromkml(a.geom))
from "LIM_Municipio_A" as a
where nome ilike 'alexânia';
我的桌子:
答案 0 :(得分:2)
doc说:
布尔值ST_Contains(几何 geomA ,几何 geomB );
,则几何A包含几何B。
如果[...]
因此,您必须先使用多边形,然后再使用点。
select st_contains(
st_geomfromkml(a.geom),
st_geomfromtext('POINT(-48.54367281530538 -15.91180231568948)',4326)
)
from "LIM_Municipio_A" as a
where nome ilike 'alexânia';