OK, I can understand the concept why this is the case now. But if there
is any example or reference article on line that would be of great help.
Bo
On 1/16/19 10:37 AM, Sandro Santilli wrote:
On Wed, Jan 16, 2019 at 10:26:12AM -0700, Bo Guo wrote:
strk,
Here is how it break up the topo geom conversion (l_tolerance is 0.0000001)
LOOP
WITH foo AS (SELECT grd_id FROM azgiv.roadcenterlines
WHERE grd_topo_geom IS NULL
LIMIT l_batch_size)
UPDATE azgiv.roadcenterlines
SET grd_topo_geom =
topology.totopogeom(grd_geom, 'azgiv_topo', l_topo_layer_id, l_tolerance)
FROM foo
WHERE foo.grd_id = roadcenterlines.grd_id;
GET DIAGNOSTICS l_rowcount = ROW_COUNT;
EXIT WHEN l_rowcount < l_batch_size;
END LOOP;
The goal of chunking was to get partial results rather than an
all-or-nothing behavior. If you use that plpgsql loop you'll want
to catch exceptions and set those TopoGeometries to NULL instead.
Then you'll be able to see what the loop was able to convert and
what not, and get back to the still-to-be-converted geoms, maybe
after cleaning up some of what you got converted already.
--strk;
_______________________________________________
postgis-users mailing list
[email protected]
https://lists.osgeo.org/mailman/listinfo/postgis-users
_______________________________________________
postgis-users mailing list
[email protected]
https://lists.osgeo.org/mailman/listinfo/postgis-users