Get_Tract — 도형이 위치해 있는 구역(tract) 테이블로부터 인구조사 구역 또는 현장(field)을 반환합니다. 기본적으로 구역의 축약된 명칭을 반환합니다.
text get_tract(
geometry loc_geom, text output_field=name)
;
도형을 입력받아 해당 도형이 위치한 인구조사 구역을 반환합니다. 공간 참조 시스템을 따로 설정하지 않을 경우 NAD83 경위도라고 가정합니다.
![]() |
|
This function uses the census If you have not loaded your state data yet and want these additional tables loaded, do the following UPDATE tiger.loader_lookuptables SET load = true WHERE load = false AND lookup_name IN('tract', 'bg', 'tabblock'); then they will be included by the Loader_Generate_Script. |
2.0.0 버전부터 사용할 수 있습니다.
SELECT get_tract(ST_Point(-71.101375, 42.31376) ) As tract_name; tract_name --------- 1203.01
--this one returns the tiger geoid SELECT get_tract(ST_Point(-71.101375, 42.31376), 'tract_id' ) As tract_id; tract_id --------- 25025120301