[postgis-devel] documentation slightly differ from behavior

Nicklas Avén nicklas.aven at jordogskog.no
Fri Dec 4 06:22:05 PST 2009


Hallo
 
I don't know if it is the documentation or the behavior that is not correct , but from the way I'm reading it it doesn't correspond fully.
 
 
select st_astext(st_endpoint('MULTILINESTRING((5 5,10 5),(1 1,5 5))'::geometry))
gives
"POINT(10 5)"
 
Documentation says that the function will return the last point of the linestring or null if it is no linestring. 
Is a multilinestring a linestring?
If it is, I expect POINT(5 5) from the function, otherwise I expect null. 
If this is the expeted behavior I think we have to complement the documentation with "For multilinestrings it returns the last point of the first subgeometry"
But I think it would be better to return the last point of the last subgeometry and say that the function supports multiliestrings.
 
Thanks
Nicklas

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/postgis-devel/attachments/20091204/2d6943b6/attachment.html>


More information about the postgis-devel mailing list