Re: Topology - how edit node and edge vertex position

Sandro Santilli <[email protected]>
Newsgroups gmane.comp.gis.postgis
Message-ID <Zvp0hzEYdf344l5h@c19>
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;
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.