I want to have a query that will insert a new edge into an existing topology, and create new nodes accordingly. I would rather not rebuild the entire topology because I want all the existing node and edge ids to stay just as they are (unless they must be split). It seems to me that I should follow this workflow:
--SELECT topology.CreateTopology('network_topo', 31467); --SELECT topology.AddTopoGeometryColumn('network_topo', 'public', 'existing_network', 'topo_geom', 'LINESTRING'); --UPDATE existing_network SET topo_geom = topology.toTopoGeom(geom, 'network_topo', 1, 1.0); SELECT topology.AddEdge('network_topo', ST_LineMerge(public.new_lines.geom)) FROM public.new_lines;
(The commented out parts are things I have already done)
topology.AddEdge command is returning this error:
ERROR: AddEdge can only be used against topologies with no faces defined
I don't really care about faces, I am only interested in the linear features and nodes. But I don't know how I can create a topology with undefined faces.
Or maybe I am just on the wrong track entirely. Is this even possible? Or is it necessary to rebuild the entire topology with a new table of polylines with the new lines added?