How to Export invalid geometries ?

13 views
Skip to first unread message

Roberto Angeletti

unread,
Aug 21, 2015, 6:44:42 AM8/21/15
to spatiali...@googlegroups.com
Hello All,


As in object  :)   I need to export invalid geometries in a shp file, detected with ST_isValid.

There is a way to do this (possibly from pyQGis, but also in any other way...) ?


Thank you for any info about this.


Roberto

a.fu...@lqt.it

unread,
Aug 21, 2015, 4:21:52 PM8/21/15
to spatiali...@googlegroups.com
On Fri, 21 Aug 2015 12:44:41 +0200, Roberto Angeletti wrote:
> Hello All,
>
> As in object  :)   I need to export invalid geometries in a shp
> file, detected with ST_isValid.
>
> There is a way to do this (possibly from pyQGis, but also in any
> other
> way...) ?
>

Ciao Roberto,

the simplest way I can imagine is by using spatialite_gui:

1) execute an SQL query like this:

SELECT * FROM my_table
WHERE ST_IsValid(geometry) = 0;

2) then right-click on the resulset panel and select
"export resultset / as shapefile" from the context
menu.

bye Sandro
roberto.png
Reply all
Reply to author
Forward
0 new messages