[postgis-users] Contradiction between ST_IsValid() and ST_IsValidReason() ?
Sandro Santilli
strk at kbt.io
Wed Dec 23 06:40:50 PST 2020
On Wed, Dec 23, 2020 at 11:20:07AM +0100, Andreas Neumann wrote:
> Hi,
>
> I have the strange situation that ST_IsValid() claims a geometry is not
> valid, but then ST_IsValidReason() says 'Valid Geometry'
>
> Here is my query:
>
> SELECT
> t_id,
> ST_AsText(ST_MakeValid(geometrie)) AS geom_repaired,
> ST_AsText(geometrie) AS geom_orig,
> ST_IsValidReason(geometrie)
> FROM arp_npl.erschlssngsplnung_erschliessung_linienobjekt
> WHERE ST_IsValid(geometrie) = False;
>
> And here parts of the output:
> [image: image.png]
>
> Why is this contradiction - and which one is right? ST_IsValid() or
> ST_IsValidReason() ?
Sounds like a bug. ST_IsValid should print the invalidity in a NOTICE,
it looks like ST_IsValidReason is failing to check that kind of
invalidity. Would be useful to file a ticket and attach the offending
geometry (best if reduced as much as possible).
--strk;
More information about the postgis-users
mailing list