| | |
| | | <if test="query.polygons != null and query.polygons.size > 0"> |
| | | and ( |
| | | <foreach collection="query.polygons" item="polygon" separator=" OR "> |
| | | ST_Contains( |
| | | ST_SRID(ST_GeomFromText(#{polygon}), 4326), |
| | | public.st_contains( |
| | | public.st_srid(public.st_geomfromtext(#{polygon}), 4326), |
| | | /* 注意:Kingbase/PostGIS 坐标顺序通常是 (经度, 纬度) 即 (longitude, latitude) */ |
| | | ST_GeomFromText(CONCAT('POINT(', longitude, ' ', latitude, ')'), 4326) |
| | | public.st_geomfromtext(CONCAT('POINT(', longitude, ' ', latitude, ')'), 4326) |
| | | ) |
| | | </foreach> |
| | | ) |