Topology - how edit node and edge vertex position

Michal Seidl michal.seidl at gmail.com
Tue Oct 15 00:52:36 PDT 2024


Hello,
while looking around it looks I have found bug in returning value of 
function ST_ChangeEdgeGeom(). It should return integer but it seems the 
string 'Edge 1 changed' returns instead.

https://postgis.net/docs/ST_ChangeEdgeGeom.html

As a result of problem with missing fce ST_MoveNode() I have found that 
the method ST_ChangeEdgeGeom() which will allow also edit start end end 
point (under condition not causing any intersections or overlaps) will 
be more useful in my case.

The work is in process as plpgsql function.

Michal

On 10/8/24 12:58, Sandro Santilli wrote:
> 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;



More information about the postgis-devel mailing list