[postgis-users] TopologyException: geom is invalid

BladeOfLight16 bladeoflight16 at gmail.com
Wed Feb 25 23:32:29 PST 2015


On Wed, Feb 25, 2015 at 12:14 PM, Joseph Spenner <joseph85750 at yahoo.com>
wrote:

> DBD::Pg::st execute failed: ERROR:  Error performing intersection:
> TopologyException: Input geom 1 is invalid: Self-intersection at or near
> point -381688.06935935974 -1206669.4272876547 at -381688.06935935974
> -1206669.4272876547 at ./test.pl line 151.
>

Did you try ST_IsValid to verify the geometry is valid according to the OGC
standard? (See
http://postgis.net/docs/using_postgis_dbmanagement.html#OGC_Validity.
ST_IsValidDetail and ST_IsValidReason are also helpful in this regard.)
What happens if you run it through ST_MakeValid? Be aware that ST_MakeValid
can sometimes result in GeometryCollections if the input shape is malformed
(usually "rings" without enough points are that have different start and
end points).
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20150226/2e6478a5/attachment.html>


More information about the postgis-users mailing list