<html>
<head>
        <title></title>
        
<meta name="GENERATOR" content="MSHTML 8.00.6001.18812"></meta>
</head>

<body>
        
<div>The function ST_Line_Substring is some mixture between 2D and 3D. It preserves the z-value but don't use it in calculation. The documentation describes this but the note that the function supports 3D I think is false. </div>
        
<div> </div>
        
<div>Why not make it real 3D so it considers the third dimmension in the calculation.</div>
        
<div> </div>
        
<div>Now this query:</div>
        
<div><br />
                select st_asewkt(ST_Line_Substring(the_geom,0.2, 0.8))<br />
                 from<br />
                (SELECT ST_GeomFromEWKT('SRID=4269;LINESTRING(1 1 1,1 1 3, 1 1 5, 1 1 8)') as the_geom ) a;<br />
                </div>
        
<div>gives the little bit strange result:</div>
        
<div>"SRID=4269;LINESTRING(1 1 3,1 1 5)"</div>
        
<div> </div>
        
<div>I think t would be much better to make it fully 3D-supportive. Then the result of this query is:</div>
        
<div>"SRID=4269;LINESTRING(1 1 2.4,1 1 3,1 1 5,1 1 6.6)"</div>
        
<div> </div>
        
<div>I have attached a patch that makes this.</div>
        
<div> </div>
        
<div>The reason I started to look at this was that I wanted a function that takes distances instead of fraction of the total length. </div>
        
<div>I hve a working finction that takes the startdistance and end-distance from the start of the line to pull out the substring-line. In some cases that is more straight on than going via the fractions. Should I post it or will there be to many functions too little difference?</div>
        
<div>The question is if I should put effort in writing the documentation and regression-tests.</div>
        
<div> </div>
        
<div>Greetings</div>
        
<div>Nicklas</div>
        
<div> </div>
</body>
</html>