[postgis-users] TR: strange behavior of ST_Area(geography)
Olivier Leprêtre
o.lepretre at gmail.com
Sun Oct 15 05:34:30 PDT 2017
9.6 and
"POSTGIS="2.3.2 r15302" GEOS="3.6.1-CAPI-1.10.1 r4317" PROJ="Rel. 4.9.1, 04 March 2015" GDAL="GDAL 2.1.3, released 2017/20/01" LIBXML="2.7.8" LIBJSON="0.12" TOPOLOGY RASTER"
-----Message d'origine-----
De : Olivier Leprêtre [mailto:o.lepretre at gmail.com]
Envoyé : dimanche 15 octobre 2017 14:33
À : 'PostGIS Users Discussion'
Objet : RE: [postgis-users] strange behavior of ST_Area(geography)
I tested your query with 9.6 all tests return true.
Olivier
-----Message d'origine-----
De : postgis-users [mailto:postgis-users-bounces at lists.osgeo.org] De la part de IIDA Tetsushi Envoyé : dimanche 15 octobre 2017 13:42 À : postgis-users at lists.osgeo.org Objet : [postgis-users] strange behavior of ST_Area(geography)
Hi,
These polygons have the same shape but orientation.
--- my query -----
WITH poly AS (
SELECT
ST_SetSRID(ST_GeomFromText(
'POLYGON((138.002 37.001, 138.003 37.0010, 138.003 37.0013, 138.002 37.001))'
),4326) g1,
ST_SetSRID(ST_GeomFromText(
'POLYGON((138.002 37.001, 138.003 37.0013, 138.003 37.0010, 138.002 37.001))'
),4326) g2
)
SELECT ST_Equals(g1,g2),
ST_Area(g1) = ST_Area(g2) AS eq_area,
ST_Area(g1::geography) = ST_Area(g2::geography) AS geog1,
ST_Area(g1::geography, false) = ST_Area(g2::geography, false) AS geog2,
ST_Area(g1::geography) = ST_Area(ST_Reverse(g2)::geography) AS geog3,
ST_Area(ST_Transform(g1,32654)) = ST_Area(ST_Transform(g2,32654)) AS geom FROM poly;
----- output -----
st_equals | eq_area | geog1 | geog2 | geog3 | geom
-----------+---------+-------+-------+-------+------
t | t | f | t | t | t
I expected all these tests return true.
Is this behavior by spec?
Thanks
--
hogeman
_______________________________________________
postgis-users mailing list
postgis-users at lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/postgis-users
---
L'absence de virus dans ce courrier électronique a été vérifiée par le logiciel antivirus Avast.
https://www.avast.com/antivirus
More information about the postgis-users
mailing list