Is there a SQL way to run spatialitegui RTTOPO SanitizeGeometry?

21 views
Skip to first unread message

Andrea Borruso

unread,
Dec 28, 2020, 11:10:51 AM12/28/20
to SpatiaLite Users
Hi,
is there a SQL way to run RTTOPO SanitizeGeometry command of the spatialite-gui app (using the default sanitize option)?

Thank you


a.fu...@lqt.it

unread,
Dec 28, 2020, 11:31:25 AM12/28/20
to spatiali...@googlegroups.com
On Mon, 28 Dec 2020 08:10:50 -0800 (PST), Andrea Borruso wrote:
> Hi,
> is there a SQL way to run RTTOPO SanitizeGeometry command of the
> spatialite-gui app (using the default sanitize option)?
>

ciao Andrea,

the GUI wizard is fully based on the standard RTTOPO MakeValid()
function, it simply add some bonus value such as producing an
HTML detailed report.

you can get the same practical effect by using a pure SQL
statement as:

UPDATE geom = MakeValid(geom) FROM my_table;

or even better:

UPDATE geom = MakeValid(geom)
FROM my_table
WHERE ST_IsValid(geom) <> 1;

happy new year,
Sandro


andy

unread,
Dec 28, 2020, 11:43:03 AM12/28/20
to spatiali...@googlegroups.com
Grazie mille Sandro and happy new year to you and mailing list users.

I have used

UPDATE table SET  geom  = MakeValid( geom  )
WHERE ST_IsValid( geom  ) <> 1;

--
You received this message because you are subscribed to a topic in the Google Groups "SpatiaLite Users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/spatialite-users/gsnRNcsg32Y/unsubscribe.
To unsubscribe from this group and all its topics, send an email to spatialite-use...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/spatialite-users/9468ae50be882d8e9914ba3b4aa4e38d%40lqt.it.


--
___________________

Andrea Borruso
website: https://medium.com/tantotanto
38° 7' 48" N, 13° 21' 9" E, EPSG:4326
___________________

"cercare e saper riconoscere chi e cosa,
 in mezzo all’inferno, non è inferno, 
e farlo durare, e dargli spazio"

Italo Calvino
Reply all
Reply to author
Forward
0 new messages