I can introduce in the next SpatiaLite release
some few new SQL functions:
------
CastToMultiPoint(Geometry)
CastToMultiLinestring(Geometry)
CastToMultiPolygon(Geometry)
1) if the arg already is a MultiPolygon
it will be returned unchanged
2) if the arg is a Polygon, then the
corresponding MultiPolygon will be
returned
3) if the arg is a GeometryCollection
[actually containing only one Polygon
or a MultiPolygon], then a MultiPolygon
will be returned
4) under any other circumstance, NULL
will be returned
5) obviously, the same applies for Points
and Linestrings as well
----
CastToGeometryCollection(Geometry)
1) if the arg is a valid geometry (any type)
a GeometryCollection will be returned
2) under any other circumstance, NULL
will be returned
----
CastToPoint(Geometry)
CastToLinestring(Geometry)
CastToPolygon(Geometry)
1) if the arg already is a Polygon
it will be returned unchanged
2) if the arg is a GeometryCollection or a
MultiPolygon [actually containing only
one Polygon], the corresponding Polygon
will be returned
3) under any other circumstance, NULL
will be returned
4) obviously, the same applies for Points
and Linestrings as well
----
any further suggestion will be warmly welcome
bye Sandro
PostGIS uses a single ST_Multi(Geometry) function for all geometry types.
--
Richard Greenwood
richard....@gmail.com
www.greenwoodmap.com