There are various options for translating PostGIS geometries to X3D since X3D geometry types don't map directly to PostGIS geometry types and some newer X3D types that might be better mappings we ahve avoided since most rendering tools don't currently support them.
These are the mappings we have settled on. Feel free to post a bug ticket if you have thoughts on the idea or ways we can allow people to denote their preferred mappings.

Below is how we currently map PostGIS 2D/3D types to X3D types

PostGIS Type

2D X3D Type

3D X3D Type

LINESTRING

not yet implemented - will be PolyLine2D

LineSet

MULTILINESTRING

not yet implemented - will be PolyLine2D

IndexedLineSet

MULTIPOINT

Polypoint2D

PointSet

POINT

outputs the space delimited coordinates

outputs the space delimited coordinates

(MULTI) POLYGON, POLYHEDRALSURFACE

Invalid X3D markup

IndexedFaceSet (inner rings currently output as another faceset)

TIN

TriangleSet2D (Not Yet Implemented)

IndexedTriangleSet

2D geometry support not yet complete. Inner rings currently just drawn as separate polygons. We are working on these.

There is also a nice open source X3D viewer you can use to view rendered geometries. Free Wrl http://freewrl.sourceforge.net/ binaries available for Mac, Linux, and Windows. Use the FreeWRL_Launcher packaged to view the geometries.