[postgis-devel] Much slower processing on GEOS 3.9.0 versus 3.8.0 for geodesic area calculation

Paul Ramsey pramsey at cleverelephant.ca
Tue Apr 27 13:46:40 PDT 2021


Just to stick a nail in the GEOS-version-affects-geography-area conversation, I took the time to set up two builds (GEOS 3.8 and GEOS 3.9) and swapped between them without changing anything else about the system.

postgis=# select postgis_full_version();
                                                                                                                                                                          postgis_full_version                                                                                                                                                                           
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
 POSTGIS="3.2.0dev 3.1.0rc1-162-g46efb9f2d" [EXTENSION] PGSQL="130" GEOS="3.8.3-CAPI-1.13.4" PROJ="8.0.0" GDAL="GDAL 3.2.0, released 2020/10/26" LIBXML="2.9.4" LIBJSON="0.15" LIBPROTOBUF="1.3.3" WAGYU="0.5.0 (Internal)"

postgis=# select sum(st_area(geom::geography)) from va;
        sum         
--------------------
 1070124793748.3967
(1 row)

Time: 1449.551 ms (00:01.450)


Then stop the server, change the LD_LIBRARY_PATH to the 3.9 install location and restart.

postgis=# select postgis_full_version();
                                                                                                                                                                            postgis_full_version                                                                                                                                                                            
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
 POSTGIS="3.2.0dev 3.1.0rc1-162-g46efb9f2d" [EXTENSION] PGSQL="130" GEOS="3.9.2dev-CAPI-1.14.2" PROJ="8.0.0" GDAL="GDAL 3.2.0, released 2020/10/26" LIBXML="2.9.4" LIBJSON="0.15" LIBPROTOBUF="1.3.3" WAGYU="0.5.0 (Internal)"

postgis=# select sum(st_area(geom::geography)) from va;
        sum         
--------------------
 1070124793748.3959
(1 row)

Time: 1439.969 ms (00:01.440)



There's no effect to be seen when GEOS version is the only variable in play.

P


More information about the postgis-devel mailing list