totopoGeom have an extra arg to prevent addition of primitives to topology
|Reported by:||robe||Owned by:||strk|
|Priority:||medium||Milestone:||PostGIS Fund Me|
This is a request from Leo. In writing the example, he realized I could screw up his topology network with my reckless use of toTopoGeom and I did by not getting my points quite right to line up with his topology.
The scenario: You are the master maintainer of a topology for say a city or something and have meticulously laid out the topology that should account for all department topogeometry needs.
Some reckless person in department A, comes by and creates a topogeometry with toTopoGeom because his/her topogeometry which should have snapped to existing edges, did not. Now you have extra annoying nodes in your topology.
That reckless person may very well be you. You want the totopoGeom not to do you favors by creating new primitives if you know all the topos you are adding should be able to use the edges,nodes, and faces already existing in your topology.
So after discussion, proposed solution is to add an extra proto to toTopoGeom that prevents creation of new primitives and if a topogeometry can't be created without adding a primitive, it should throw an error.
change this existing proto:
toTopoGeom(geometry geom, varchar toponame, integer layer_id, float8 tolerance);
toTopoGeom(geometry geom, varchar toponame, integer layer_id, float8 tolerance, allow_primitive_creation = true);
He wanted it to default to false, but since we are asking for this in a minor, we can't change that behavior without screwing up some people.