[postgis-users] topologies

paul.malm at lfv.se paul.malm at lfv.se
Tue Mar 26 05:19:43 PDT 2019


Hi,
I'm new to postgis and db-handling overall. I'm having a problem with the example at: http://blog.mathieu-leplatre.info/use-postgis-topologies-to-clean-up-road-networks.html

This is what I want to do;
Merge 2 line layers together, and keep track on from which layer the lines came from (fname).
Create topology to fix the intersections and edges and save the result to a new table (roads_clean).

My SQL:
CREATE TABLE merged AS(
SELECT fname, the_geom FROM public."RST_1813_UTM31N_WE_D_R_Line"
UNION
SELECT fname, the_geom FROM public."CTR_1813_UTM31N_WE_line");

SELECT Populate_Geometry_Columns('merged'::regclass);

SELECT topology.CreateTopology('roads_topo', 32631);
SELECT topology.AddTopoGeometryColumn('roads_topo', 'public', 'merged', 'topo_geom', 'LINESTRING');
UPDATE merged SET topo_geom = topology.toTopoGeom(wkb_geometry, 'roads_topo', 1, 1.0);
CREATE TABLE public."roads_clean" AS (
    SELECT  topo_geom::geometry FROM merged);


Nor I or pgAdmin 4 knows what wkb_geometry is, in the UPDATE command (directly copied from the example).
Can someone please, help me?
Kind regards,
Paul

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20190326/50be3132/attachment.html>


More information about the postgis-users mailing list