Opened 10 years ago

Closed 10 years ago

#2637 closed defect (invalid)

ST_Area regress between 2.1.2 and 2.0.4 when using use_spheroid = false

Reported by: robe Owned by: pramsey
Priority: medium Milestone: PostGIS 2.1.2
Component: postgis Version: 2.1.x
Keywords: Cc:

Description

More funkiness with use_spheroid:

SELECT gid, ST_Area(geog, false) As sphere_area, ST_Area(geog,true) AS spheroid_area
FROM (VALUES (1, ST_GeogFromText('MULTIPOLYGON(((-71.0821 42.3036,-71.0822 42.3036,-71.082 42.3038,-71.0819 42.3037,-71.0821 42.3036)))') ),
	(2, ST_GeogFromText('MULTIPOLYGON(((-71.1261 42.2703,-71.1257 42.2703,-71.1257 42.2701,-71.126 42.2701,-71.1261 42.2702,-71.1261 42.2703)))') ) ) As g(gid, geog)  ;

In POSTGIS="2.0.4" GEOS="3.4.2-CAPI-1.8.2 r0" PROJ="Rel. 4.8.0, 6 March 2012" GDAL="GDAL 1.10.0, released 2013/04/24" LIBXML="2.7.8" LIBJSON="UNKNOWN" (core procs from "2.0.4" need upgrade) RASTER (raster procs from "2.0.4" need upgrade) PostgreSQL 9.2.4, compiled by Visual C++ build 1600, 32-bit

 gid |   sphere_area    |  spheroid_area
-----+------------------+------------------
   1 |  228.61314662168 | 228.977274222299
   2 | 686.203767227692 | 687.292930366744

In POSTGIS="2.1.2dev r12220" GEOS="3.4.2-CAPI-1.8.2 r0" PROJ="Rel. 4.8.0, 6 March 2012" GDAL="GDAL 1.10.0, released 2013/04/24" LIBXML="2.7.8" LIBJSON="UNKNOWN" RASTER PostgreSQL 9.2.4, compiled by Visual C++ build 1600, 32-bit

 gid |   sphere_area    |  spheroid_area
-----+------------------+------------------
   1 | 228.671128069666 | 228.977274222299
   2 | 686.211664392567 | 687.292930366744
(2 rows)

Note how the spheroid areas between two versions agree but the sphere areas do not. Did we change our sphere between 2.0 and 2.1?

Change History (1)

comment:1 by robe, 10 years ago

Resolution: invalid
Status: newclosed

and to paraphrase pramsey — yes we read from spatial_ref_sys now (or at least I think that is what he said).

Given that this particular change in deviation in answer is not surprising.

Note: See TracTickets for help on using tickets.