Hi;<div><br></div><div>Sorry if this is a dumb newbie question.  I am trying to build a topology trimesh (in what to me is the obvious way) from an unreasonably large SRTM raster.  I can get the nodes and edges into the database, but the Polygonize function doesn't create the expected triangles (two per raster pixel), but instead creates a single square.</div>
<div><br></div><div>I tried to produce an SQL file which highlights the behavior (which, for all I know, is fully expected).  Please find attached two such files.  I did read the source to the Polygonize function, and when I call st_polygonize on the edge_data column (as it does), I get back the expected triangle with Z value...</div>
<div><br></div><div>Here's test01.sql (in case it doesn't survive the MTAs), in which I simplified away use of 3D coords and SRID:</div><div><br></div><div><div>SELECT CreateTopology('ma_topo'); -- No Z</div>
<div>SELECT AddEdge('ma_topo', ST_GeomFromText('LINESTRING(2 2, 4 2)'));</div><div>SELECT AddEdge('ma_topo', ST_GeomFromText('LINESTRING(4 2, 3 1)'));</div><div>SELECT AddEdge('ma_topo', ST_GeomFromText('LINESTRING(3 1, 2 2)'));</div>
<div>SELECT Polygonize('ma_topo');</div><div>-- Correctly shows a single triangle in the Topology</div><div>SELECT St_AsText(foo.geom) FROM (SELECT (st_dump(st_polygonize(geom))).geom FROM ma_topo.edge_data) as foo;</div>
<div>SELECT ST_AsText(mbr) FROM ma_topo.face;</div></div><div><br></div><div>Here's test00.sql, which exhibits the same quad/tri behavior, but additionally is missing the Z value...</div><div><br></div><div><div>SELECT CreateTopology('ma_topo', 4326, 0, true); -- Has Z</div>
<div>SELECT AddEdge('ma_topo', ST_GeomFromText('SRID=4326;LINESTRINGZ(2 2 2, 4 2 2)'));</div><div>SELECT AddEdge('ma_topo', ST_GeomFromText('SRID=4326;LINESTRINGZ(4 2 2, 3 1 9)'));</div><div>
SELECT AddEdge('ma_topo', ST_GeomFromText('SRID=4326;LINESTRINGZ(3 1 9, 2 2 2)'));</div><div>SELECT Polygonize('ma_topo');</div><div>-- Correctly shows a single triangle in the Topology</div><div>SELECT St_AsText(foo.geom) FROM (SELECT (st_dump(st_polygonize(geom))).geom FROM ma_topo.edge_data) as foo;</div>
<div>SELECT ST_AsText(mbr) FROM ma_topo.face;</div></div><div><br></div><div><br></div><div>FYI I am using the latest PostGIS (from source control, rebuilt yesterday in an attempt to ensure this was not simply a case of outdated software), running under FC16 x86_64.  Again, sorry if this is a dumb question, but I am new to SQL, PostGres, and PostGIS - yes, the trifecta.</div>
<div><br></div><div>Thanks for any help you can give me, including any advice as to approach...</div><div><br></div><div>-jm</div><div><br></div>