[postgis-users] Error: "Precision reduction requires GEOS-3.9 or higher"
Marco Boeringa
marco at boeringa.demon.nl
Sat Apr 17 00:01:33 PDT 2021
Hi Paul,
Thanks for the response.
The virtual machine is a Microsoft "Hyper-V" instance with Ubuntu
20.04.2 LTS, as provided by Microsoft, that I upgraded by installing
PostgreSQL and PostGIS from the included Synaptic Package Manager, which
AFAIK references the official repositories for PostgreSQL and ubuntugis,
and the Canonical Partners repository:
"http://apt.postgresql.org/pub/repos/apt/focal-pgdg main"
"http://ppa.launchpad.net/ubuntugis/ppa/ubuntu focal main"
Before I upgraded libgeos from the ubuntugis repository,
"PostGIS_Full_Version()" showed GEOS 3.8.0.
So how do I potentially solve this? Or is this upgrade of GEOS only
possible by compiling PostGIS from source yourself (which I would
definitely like to avoid)?
Marco
Op 16-4-2021 om 23:58 schreef Paul Ramsey:
> It's curious, but the implication is that the postgis on your machine was built against an earlier GEOS. The version number that postgis reports for GEOS is generated at run-time, while the test of whether to include support for various functions is determined at compile-time. Hence you can see a "GEOS 3.9" version in your postgis, but still not have access to functions that are 3.9+ only.
>
> P
>
>> On Apr 16, 2021, at 2:53 PM, Marco Boeringa <marco at boeringa.demon.nl> wrote:
>>
>> Hi all,
>>
>> I upgraded my Ubuntu 20.04 instance with "libgeos-3.9.0" from the ubuntugis repository.
>>
>> When I use:
>>
>> "SELECT PostGIS_Full_Version();"
>>
>> I get back:
>>
>> POSTGIS="3.1.1 aaf4c79" [EXTENSION] PGSQL="130" GEOS="3.9.0-CAPI-1.16.2" PROJ="6.3.1" LIBXML="2.9.10" LIBJSON="0.13.1" LIBPROTOBUF="1.3.3" WAGYU="0.5.0 (Internal)"
>>
>> which at least suggests I am now correctly using GEOS 3.9.0 (note: I updated the PostGIS extension's functions using "ALTER EXTENSION postgis UPDATE")
>>
>> However, after adjusting some existing code to include the new "ST_ReducePrecision" PostGIS function (https://postgis.net/docs/ST_ReducePrecision.html), which is new in 3.9.0, I get back an error:
>>
>> "Precision reduction requires GEOS-3.9 or higher"
>>
>> which seems weird given the "PostGIS_Full_Version" result. Anyone have a clue as to what I missed?
>>
>> Marco
>>
>> _______________________________________________
>> postgis-users mailing list
>> postgis-users at lists.osgeo.org
>> https://lists.osgeo.org/mailman/listinfo/postgis-users
> _______________________________________________
> postgis-users mailing list
> postgis-users at lists.osgeo.org
> https://lists.osgeo.org/mailman/listinfo/postgis-users
More information about the postgis-users
mailing list