Topology - how edit node and edge vertex position

Sandro Santilli strk at kbt.io
Tue Oct 8 03:58:19 PDT 2024


I'm adding postgis-devel to the loop, please subscribe and continue
discussion there so other developers are also aware of who's working
on what. The best would be for you to start with a trac ticket [1]
stating the goal so we can also plan including in next release, and
working with a pull request to gather comments more easily [2].

For both the trac ticket and the pull request you'll need an OSGeo
UserID [3], ping me with another private message to get the mantra
required to register one if you don't already have it.

[1] https://trac.osgeo.org/postgis
[2] https://git.osgeo.org/gitea/postgis/postgis
[3] https://id.osgeo.org

More replies are inline.

On Mon, Oct 07, 2024 at 06:06:56PM +0200, Michal Seidl wrote:

> I am thinking about implementing such method as pgplsql function/procedure
> with very simple rule that new position can not make topology invalid.

Sounds sensible !

> This should leads to several simple rules like, new edges must not intersects
> anything.
> 
> As I am playing with topology, the approach built on direct updates of node
> and edges geometry looks like most straightforward.
> 
> The steps can be:
> - start transaction

This is automatic, if you implement the code as a FUNCTION.

> - find edges connected to node
> - test new edges geometries for intersection with surrounding data
> - if ok, update node, edges and face mbr geometries in tables
> - test topology with ValidateTopology() method
> - if error, roll back and raise exception

Perfect ! 

> Do you think there is some obvious problem, it can not be implemented like
> this?

Not really. There will be possible choices to make, like how to modify
the edges to reach the new node (move the existing vertex or add a new
one?) and how to handle intersections (drop some vertex from the
edges?).

--strk;
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 659 bytes
Desc: not available
URL: <http://lists.osgeo.org/pipermail/postgis-devel/attachments/20241008/ac0ee0f5/attachment.sig>


More information about the postgis-devel mailing list