Opened 12 years ago
Closed 12 years ago
#2176 closed defect (fixed)
ST_ChangeEdgeGeom: exception on SymDifference
Reported by: | strk | Owned by: | strk |
---|---|---|---|
Priority: | medium | Milestone: | PostGIS 2.0.3 |
Component: | topology | Version: | 2.0.x |
Keywords: | history | Cc: | paolo.crosato@… |
Description
As reported here: http://lists.osgeo.org/pipermail/postgis-users/2013-January/036276.html
Robusness issues in GEOS result in exceptions thrown at ST_ChangeEdgeGeom time, where verifying that the incurred change would not change the data topology.
There could be improvements in that computation. For example we could skip the check completely if no nodes other than the endpoints of the line would fall within the extent of either old or new edge…
Attachments (2)
Change History (9)
comment:1 by , 12 years ago
follow-up: 4 comment:2 by , 12 years ago
Cc: | added |
---|
What's needed for this case is simplified data, starting from the geometry of the initial edge and of the simplified edge. Hopefully Paolo can provide that.
comment:3 by , 12 years ago
Rewriting the edge motion range computation may also help here. What we want to guarantee is that all points within the edge bounding box are still on their previous edge side (left or right)
comment:4 by , 12 years ago
Replying to strk:
What's needed for this case is simplified data, starting from the geometry of the initial edge and of the simplified edge. Hopefully Paolo can provide that.
This is the call, topo name and edge id are just copy paste SELECT topology.ST_ChangeEdgeGeom('eu_geom_35_topo', 81018, SimplifyUTM(geom, 35)) FROM eu_geom_35_topo.edge WHERE edge_id = 81018;
In the attached file there is the original geometry, SimplifyUTM function definition and the geometry after SimplifyUTM call, all geometries are EWKB format.
Simplifyutm calls utmzone, it's the same function found in the postgis book, anyway here is the code from my instance: CREATE OR REPLACE FUNCTION public.utmzone(geometry)
RETURNS integer AS
$BODY$
DECLARE
geomgeog geometry; zone int; pref int;
BEGIN
geomgeog:= ST_Transform($1,4326); IF (ST_Y(geomgeog))>0 THEN
pref:=32600;
ELSE
pref:=32700;
END IF; zone:=floor((ST_X(geomgeog)+180)/6)+1; RETURN zone+pref;
END; $BODY$
LANGUAGE plpgsql IMMUTABLE COST 100;
Tell me if you need other data or details. Apologies if I made any mistake with the bug report system, first time I use it.
Paolo
comment:5 by , 12 years ago
Can you provide HEXWKB please ? It's what you get by default if you SELECT the_geom FROM table
from a text cursor. I don't need the utmzone function, just the original and simplified geometries.
The idea is to produce a testcase that would trigger the bug in a script like this:
SELECT CreateTopology('bug2176'); SELECT TopoGeo_addLinestring('bug2176', '<first_geometry>'); SELECT ST_ChangeEdgeGeom('bug2176', 1, '<second_geometry>');
With the smallest possible '<first_geometry>' and '<second_geometry>'
comment:7 by , 12 years ago
Keywords: | history added |
---|---|
Resolution: | → fixed |
Status: | new → closed |
See http://trac.osgeo.org/geos/ticket/614 for the GEOS side of this