Thank you Hugues (and my apologies for using the wrong name), if I understood you correctly this is what the code should look like:
WITH line AS (SELECT geom from foot_cl where (sheet='AT24' AND sid=463)), cells AS (SELECT ST_Centroid((ST_Intersection(at24.rast, line.geom)).geom) AS geom, (ST_Intersection(at24.rast, line.geom)).val AS val FROM at24, line WHERE ST_Intersects(at24.rast, line.geom)), points3d AS (SELECT ST_SetSRID(ST_MakePoint(ST_X(cells.geom), ST_Y(cells.geom), val), 2193) AS geom FROM cells, line ORDER BY ST_Distance(ST_StartPoint(line.geom), cells.geom)) SELECT ST_MakeLine(points3d.geom) FROM points3d,line,cells The result is exactly the same as before as you can see here: makeline.png <http://postgis.17.x6.nabble.com/file/n5006270/makeline.png> But it should look as follows (after replacing makeline with the points): points.png <http://postgis.17.x6.nabble.com/file/n5006270/points.png> Thank you for your help -- View this message in context: http://postgis.17.x6.nabble.com/ST-MakeLine-woes-tp5006266p5006270.html Sent from the PostGIS - User mailing list archive at Nabble.com. _______________________________________________ postgis-users mailing list [email protected] http://lists.osgeo.org/cgi-bin/mailman/listinfo/postgis-users
