PostgreSQL1 PostGIS 공간쿼리 PostGIS 공간쿼리 목표 : 전달된 좌표를 기반으로 가장 가까운 순으로 출력한다. Geometry 로 변경 좌표를 Geometry 로 변경 select ST_SetSRID(ST_Point(126.94130, 37.37736), 4326) 문자열을 변수로 받는 경우는 double precision 으로 변경 ST_SetSRID(ST_Point(CAST(#{lng} as double precision), CAST(#{lat} as double precision)), 4326) Geometry 에서 SRID 확인 st_srid(geom) SRID 변경 https://postgis.net/docs/ST_Transform.html geometry ST_Transform(geometry g1, integer s.. 2017. 4. 20. 이전 1 다음