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; _______________________________________________ postgis-users mailing list postgis-users@lists.osgeo.org https://lists.osgeo.org/mailman/listinfo/postgis-users