On Thu, Sep 26, 2024 at 10:11:12PM +0200, Michal Seidl wrote: > Hello, > I am trying to figure out, what is correct way to edit position/coordinates > of nodes and edge vertexes. > > While updating edge vertexes can be achieved with function > ST_ChangeEdgeGeom() by updating whole geometry. > > If I try to update start or end point I get 'SQL/MM Spatial exception - > start node not geometry start point' that is correct by checking the C code > of function. > > So how to change position of start or end point of edge? I would expect some > function but I am not able to find it.
There's currently no function to do that, and no specification of behavior of such a function in the ISO standard. You'd currently need to add the new node, split the existing edge, drop the edge portion you don't need, add a new edge from the split node to the new node, heal the 2 edges. If you use TopoGeometry objects for storing attributes you would probably have an easier life by using toTopoGeom and clearTopoGeom to replace the old definition with a new definition and remove unused primitives at the end.o --strk;