id summary reporter owner description type status priority milestone component version resolution keywords cc 3705 ST_AsX3D needs improvement Mike Taves robe "Testing ST_AsX3D on various geometries gives varied and interesting results with PostGIS 2.3 on Windows. These are non-critical outputs, separated from critical outputs in #3704 Some are documented not to be implemented, however they still run without raising a ""'X' geometry type not implemented"" error. The documentation should also mention that M-coordinates (where present) are dropped. `SELECT ST_AsX3D('POLYGON EMPTY');`:: returns invalid XML: `' />` `SELECT ST_AsX3D('POLYGON ((30 10, 40 40, 20 40, 10 20, 30 10))');`:: returns invalid XML: `30 10 40 40 20 40 10 20 ' />`, and similar for empty and non-empty MULTIPOLYGON `SELECT ST_AsX3D('MULTILINESTRING ((2 3, 4 5))');`:: returns invalid XML: `2 3 4 5 ' />` With the following, valid XML is returned (I can't confirm if these are valid X3D): * `POINT(1 2)` : `1 2` * `LINESTRING(1 2, 3 4)` : `` * `MULTIPOINT EMPTY` : `` * `TRIANGLE((0 0 0,0 1 0,1 1 0,0 0 0))` : `0 0 0 0 1 0 1 1 0` * `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)))` : `` * `POLYHEDRALSURFACE Z (((0 0 0, 0 1 0, 1 1 0, 1 0 0, 0 0 0)),((0 0 0, 0 1 0, 0 1 1, 0 0 1, 0 0 0)),((0 0 0, 1 0 0, 1 0 1, 0 0 1, 0 0 0)),((1 1 1, 1 0 1, 0 0 1, 0 1 1, 1 1 1)),((1 1 1, 1 0 1, 1 0 0, 1 1 0, 1 1 1)),((1 1 1, 1 1 0, 0 1 0, 0 1 1, 1 1 1)))` : ` ` However some of these don't work within a `GEOMETRYCOLLECTION` (the documentation does not indicate the support level of this geometry type): `SELECT ST_AsX3D('GEOMETRYCOLLECTION(POINT(1 2),LINESTRING(1 2, 3 4))');`:: returns invalid XML: `1 2` or `SELECT ST_AsX3D('GEOMETRYCOLLECTION(POINT(1 2),POINT(3 4))');`:: returns invalid XML: `1 23 4` " defect new medium PostGIS Fund Me postgis 2.3.x