#1968 closed defect (fixed)
toTopoGeom: missing edges on returned topogeometry
Reported by: | amartin | Owned by: | strk |
---|---|---|---|
Priority: | high | Milestone: | PostGIS 2.0.4 |
Component: | topology | Version: | 2.0.x |
Keywords: | totopogeom edge history | Cc: |
Description
This query creates 8 edges in the topology but returns a topogeometry object with only 7 edges (i.e. the relation table has only 7 records for that topogeometry object).
SELECT totopogeom( st_geomFromtext('MULTILINESTRING ((535695.149659 4352913.865809, 535688.723014 4352898.92539, 535723.74701 4352895.150892, 535753.102703 4352892.178469, 535795.04699 4352887.189505, 535796.627126 4352887.671191, 535833.621825 4352884.315548, 535876.015985 4352880.471036), (535835.196958 4352883.587799, 535876.015985 4352880.471036), (535721.65 4352723.95, 535856.49208 4352710.87767), (535716.757204 4352776.376076, 535709.98 4352820.5, 535707.36 4352839.32, 535706.76 4352849.87, 535702.8 4352855.33, 535692.11 4352866.25, 535687.41 4352875.78, 535687.44 4352887.6, 535688.11 4352897.4, 535688.497742 4352897.353794), (535721.65 4352723.95, 535718.85 4352752.09, 535717.5 4352771.54, 535716.757204 4352776.376076), (535856.49208 4352710.87767, 535871.413761 4352859.350046, 535858.408056 4352862.146972, 535849.178201 4352866.7619, 535839.8085 4352874.733138, 535835.613111 4352880.746528, 535835.196958 4352883.587799), (535688.497742 4352897.353794, 535688.721074 4352898.927358, 535695.149659 4352913.865809))',25830),'the_topo', 2, E'0.8');
Change History (10)
comment:1 by , 12 years ago
Component: | postgis → topology |
---|---|
Owner: | changed from | to
comment:2 by , 12 years ago
comment:3 by , 12 years ago
Status: | new → assigned |
---|
After trying your call I actually see 7 lines in input and 7 edges in output. But you're right that 8 edges are created !
comment:4 by , 12 years ago
Priority: | medium → high |
---|
Ok, confirmed. The missing edge is even pretty big
comment:6 by , 12 years ago
Milestone: | PostGIS 2.0.2 → PostGIS 2.0.3 |
---|
comment:7 by , 12 years ago
The missing edge is created by effect of a split of a previously added edge. For some reason the split is not seeing the newly added TopoGeometry object, thus is unable to add the split edge to its definition. Could have to do with function modifiers (stable vs. volatile?)
comment:8 by , 12 years ago
Only happens when it's a _node_ of one of the lines splitting an existing edge, not when it's an edge crossing another.
Simplified testcase:
SELECT CreateTopology('t'); CREATE TABLE t.fline(id serial); SELECT AddTopoGeometryColumn('t','t','fline', 'g', 'line'); INSERT INTO t.fline(g) SELECT totopogeom( 'MULTILINESTRING ((0 0, 10 0),(5 0, 5 5))','t', 1);
comment:9 by , 12 years ago
Keywords: | history added |
---|---|
Resolution: | → fixed |
Status: | assigned → closed |
I suspect the snapping due to the tolerance (0.8 in your case) is making an edge collapse. Try with a tolerance of 0.