다음은 사각형의 다각형 영역을 나타냅니다.
SELECT ST_Area(ST_GeomFromText('POLYGON((871325.790874952 6105405.3261047,871418.748307692 6105359.72944624,871346.22022442 6105215.141258,871254.85408906 6105261.72007212,871325.790874952 6105405.3261047))',4326)) As sqm;
결과 : 16586.2319335938
면적을 평방 미터로 어떻게 얻습니까? 나는 다음을 시도했다.
SELECT ST_Area(ST_Transform(ST_GeomFromText('POLYGON((871325.790874952 6105405.3261047,871418.748307692 6105359.72944624,871346.22022442 6105215.141258,871254.85408906 6105261.72007212,871325.790874952 6105405.3261047))',4326)),31467) As sqm;
그러나 ST_Transform이 작동하지 않는 것 같습니다. 다음과 같은 오류 메시지가 나타납니다.
ERROR: function st_transform(geometry) does not exist
LINE 1: SELECT ST_Area(ST_Transform(ST_GeomFromText('POLYGON((871325...
^
HINT: No function matches the given name and argument types. You might need to add explicit type casts.
********** Error **********
ERROR: function st_transform(geometry) does not exist
SQL Status:42883
Hint:No function matches the given name and argument types. You might need to add explicit type casts.
누락 된 Proj 지원은 문제가되어서는 안됩니다. SELECT PostGIS_full_version ()
"POSTGIS="1.5.3" GEOS="3.3.3-CAPI-1.7.4" PROJ="Rel. 4.8.0, 6 March 2012" LIBXML="2.8.0" USE_STATS"
SELECT ST_AREA(ST_Transform(ST_GeomFromText('POLYGON((871325.790874952 6105405.3261047,871418.748307692 6105359.72944624,871346.22022442 6105215.141258,871254.85408906 6105261.72007212,871325.790874952 6105405.3261047))',900913),31467)) As sqm;