Created
November 30, 2018 16:05
-
-
Save Komzpa/7f2390db76dab8f28578b06d2000b047 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SELECT ST_Area(the_geom) As sqft, ST_Area(ST_Transform(the_geom,26986)) As sqm | |
FROM (SELECT | |
ST_GeomFromText('POLYGON((743238 2967416,743238 2967450, | |
743265 2967450,743265.625 2967416,743238 2967416))',2249) ) As foo(the_geom); | |
sqft | sqm | |
---------+------------------ | |
928.625 | 86.2724304199219 | |
19:03:21 [kom] > SELECT ST_Area(the_geom) As sqft, ST_Area(ST_Transform(the_geom,26986)) As sqm | |
[more] - > FROM (SELECT | |
[more] ( > ST_GeomFromText('POLYGON((743238 2967416,743238 2967450, | |
[more] ' > 743265 2967450,743265.625 2967416,743238 2967416))',2249) ) As foo(the_geom); | |
┌─────────┬─────────────────┐ | |
│ sqft │ sqm │ | |
├─────────┼─────────────────┤ | |
│ 928.625 │ 86.272430607008 │ | |
└─────────┴─────────────────┘ | |
(1 row) | |
Time: 5,596 ms |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
POSTGIS="3.0.0dev r17081" [EXTENSION] PGSQL="120" GEOS="3.7.0-CAPI-1.11.0 673b9939" PROJ="Rel. 5.2.0, September 15th, 2018" GDAL="GDAL 2.3.1, released 2018/06/22" LIBXML="2.7.8" LIBJSON="0.12" LIBPROTOBUF="1.2.1" (core procs from "3.0.0dev r17072" need upgrade) TOPOLOGY (topology procs from "3.0.0dev r17072" need upgrade) RASTER (raster procs from "3.0.0dev r17072" need upgrade)
`
SELECT ST_Area(the_geom) As sqft, ST_Area(ST_Transform(the_geom,26986)) As sqm
FROM (SELECT
ST_GeomFromText('POLYGON((743238 2967416,743238 2967450,
743265 2967450,743265.625 2967416,743238 2967416))',2249) ) As foo(the_geom);
sqft | sqm
---------+------------------
928.625 | 86.2724305950323
(1 row)
Time: 7.085 ms
`
set postgis.backend=sfcgal;
SELECT ST_Area(the_geom) As sqft, ST_Area(ST_Transform(the_geom,26986)) As sqm
FROM (SELECT
ST_GeomFromText('POLYGON((743238 2967416,743238 2967450,
743265 2967450,743265.625 2967416,743238 2967416))',2249) ) As foo(the_geom);
sqft | sqm
---------+------------------
928.625 | 86.2724305950324
Time: 0.898 ms
`