ELSE
-- Should never happen
RAISE EXCEPTION
- 'Unexpected feature dimension %', ST_Dimension(ageom);
+ 'Unsupported feature type %', typ;
END IF;
-- Now that we have a topogeometry, we loop over distinct components
select totopogeom('MULTIPOINT(0 0, 10 10)'::geometry, 'tt', 4); -- invalid (areal) layer
select totopogeom('POLYGON((0 0, 10 10, 10 0, 0 0))'::geometry, 'tt', 1); -- invalid (puntal) layer
select totopogeom('POLYGON((0 0, 10 10, 10 0, 0 0))'::geometry, 'tt', 3); -- invalid (lineal) layer
+-- Unsupported feature types
+select totopogeom('TIN( ((0 0 0, 0 0 1, 0 1 0, 0 0 0)), ((0 0 0, 0 1 0, 1 1 0, 0 0 0)) )'::geometry, 'tt', 4); -- TODO: support !
+select totopogeom('TRIANGLE ((0 0, 0 9, 9 0, 0 0))'::geometry, 'tt', 4); -- TODO: support !
+select totopogeom('CIRCULARSTRING(0 0, 1 1, 1 0)'::geometry, 'tt', 3); -- Unsupported feature type
+
-- Convert a point
with inp as ( select 'POINT(0 0)' ::geometry as g)
ERROR: Layer "4" of topology "tt" is areal, cannot hold a puntal feature.
ERROR: Layer "1" of topology "tt" is puntal, cannot hold an areal feature.
ERROR: Layer "3" of topology "tt" is lineal, cannot hold an areal feature.
+ERROR: Unsupported feature type TIN
+ERROR: Unsupported feature type TRIANGLE
+ERROR: Unsupported feature type CIRCULARSTRING
POINT(0 0)|t
LINESTRING(0 10,10 10)|t
POLYGON((0 20,10 20,5 30,0 20),(2 22,8 22,5 28,2 22))|t