[Manifold-l] Duplicating the GUI Explode Transform in SQL
adamw at manifold.net
adamw at manifold.net
Tue Jul 4 08:34:17 CDT 2006
> I would like to be able to script an SQL clause that provides
> the same functionality as GUI Explode.
Given the following auxilary query named "digits":
VALUES (0), (1), (2), (3), (4), (5), (6), (7), (8), (9)
...this will take the drawing named "Drawing" (single-branch lines only, no filtering is being done) and explode each line into segments:
SELECT [ID],
NewLine(Coord([Geom (I)], N.V), Coord([Geom (I)], N.V + 1))
FROM [Drawing] INNER JOIN
(SELECT D1.[Column]*100 + D2.[Column]*10 + D3.[Column]*1 V
FROM [Digits] D1, [Digits] D2, [Digits] D3) N
ON N.V < CoordCount([Geom (I)]) - 1
The inner query creates a temporary table filled with numbers from 0 to 999.
--
Adam Wachowski
Manifold Development Team
More information about the Manifold-l
mailing list