Opened 16 years ago

Closed 9 years ago

#2380 closed defect (fixed)

OGRBuildPolygonFromEdges() has not been mapped to SWIG

Reported by: Even Rouault Owned by: hobu
Priority: normal Milestone: 1.8.1
Component: SWIG (all bindings) Version: 1.5.0
Severity: normal Keywords: swig OGRBuildPolygonFromEdges
Cc: dfuhry@…, warmerdam

Description

Reported by David Fuhry, see http://lists.osgeo.org/pipermail/gdal-dev/2008-May/017127.html

ogr.BuildPolygonFromEdges as called from python is always throwing an 
exception for me, and perhaps always segfaulting:

$ ./test_build_poly.py
BuildPolygonFromEdges failed.
Segmentation fault

I first experienced the error running swig/python/samples/tigerpoly.py 
on some TIGER data.  I duplicated some of tigerpoly.pl into a reduced 
python testcase (attached).

Tested with both svn head and 1.5.1, on both RHEL4 x86_64 and Debian 
x86_64.  I don't know the debugging procedure for tracing python calls 
into C++.  Suggestions on that or how to fix the bug welcome.

Thanks,

Dave

Change History (7)

comment:1 by hobu, 16 years ago

Status: newassigned

I have implemented this in r14581 with Dave's test case in r14580, which succeeds. I don't know if this should be backported to 1.5 (too late for 1.5.2 anyway).

comment:2 by Even Rouault, 16 years ago

Cc: warmerdam added

Adding Frank in CC to regenerate the SWIG bindings and see if backporting is to be considered.

comment:3 by warmerdam, 16 years ago

I have regenerated the python bindings. I'm not too keen on backporting new bindings into 1.5.

comment:4 by Even Rouault, 16 years ago

For some reason, ogr_geom_build_from_edges fails on epimetheus

comment:5 by Even Rouault, 16 years ago

For me, methods not mapped in NG bindings, but present in OG bindings, should be more considered as API breakage between GDAL 1.4 and GDAL 1.5, and I think that users expect they can switch from OG bindings to NG bindings safely.

The ogr.BuildPolygonFromEdges is an example of that, and gdal.EscapeString reported in #2400 is another one.

comment:6 by hobu, 15 years ago

This should be in 1.6. Can you please test and confirm that things work correctly Dave?

comment:7 by Jukka Rahkonen, 9 years ago

Resolution: fixed
Status: assignedclosed

There are now 4 ogr_geom_build_from_edges_ tests in the autotest script /trunk/autotest/ogr/ogr_geom.py. It looks like the initial fix for GDAL 1.6 was good and autotests have been enhanced afterwards.

Note: See TracTickets for help on using tickets.