Is there an ST_Dump equivalent ?

1,187 views
Skip to first unread message

Samuel

unread,
Jan 16, 2012, 10:07:47 AM1/16/12
to spatiali...@googlegroups.com
Hello all,
Is there a spatialite equivalent of St_Dump ? St_Dump is used to split a GeometryCollection into multiples records (rows). I have MultiLineStrings that I need to make single so that they could be used with the excellent routing (graph/network) captablities of spatialite. I don't know how to do that without leaving the SQL world (and I don't want to script things if I'm really not required to).
Any ideas ?
Regards,
Samuel

a.fu...@lqt.it

unread,
Jan 16, 2012, 10:27:27 AM1/16/12
to spatiali...@googlegroups.com
Hi Samuel,

PostgreSQL/PostGIS can implement ST_Dump because this DBMS
supports array values.
SQLite simply supports scalar values, so implementing ST_Dump
isn't possible at all.

Anyway SpatiaLite supports a mechanism exactly intended to
split collections (MultiXXX) into elementaty items
(one item for each row).
Note well: this feature is not implemented at the SQL level,
but is supported by both tools (spatialite CLI and spatialite_GUI).

on spatialite CLI:
.elemgeo [dot macro pseudo-command]

on spatialite_gui:
1) right click on the tree control over the Geometry
you intend to split into elementary items.
2) then select "separating elementary Geometries" from
the context menu that will appear.

bye Sandro

Samuel

unread,
Jan 16, 2012, 11:19:30 AM1/16/12
to spatiali...@googlegroups.com
Sandro,
Thank you for your kind, fast and ellaborate answer ! This project (spatialite) amazes me every day, that goes without saying that is saves me lot of time as well !
Reply all
Reply to author
Forward
0 new messages