[FWTools] [Fwd: Re: ogr geometry intersection]

Jack Riley jack.l.riley at gmail.com
Thu Mar 22 15:13:01 EST 2007


Hello,

I originally posted this question re: "ogr geometry intersection" on
gdal-dev, thinking that it had more to do with gdal/ogr, or a library
therein, rather than with FWTools/Python wrapper.

Cheers,
Jack

---------- Forwarded message ----------
Date: Mar 22, 2007 4:00 PM
Subject: Re: ogr geometry intersection
To: gdal-dev at lists.maptools.org

It appears that the FWTools v1.0.9-and-earlier TopologyException is limited
to situations where one of the two polynomials being tested for
Intersection() is completely within the other.  In other words, the
Intersection() test in "old" versions of FWTools/GDAL works--and works
"fast"--if the two polynomials actually intersect.  So, my workaround is to
use FWTools v1.0.9 (or earlier) and condition any call to Intersection()
with Disjoint() or Contains() test(s).  The question remaining is:  can
FWTools v1.1.0+/GDAL revert back to the use of the "old" and "fast"
Intersection() code, adding in a test of Disjoint()/Contains() to circumvent
the TopologyException?

On 3/21/07:
>
> Hello,
>
> I recently upgraded my FWTools (Win32) installation from v1.0.5 to v1.2.2.
> Using v1.0.5, ogr geometry intersections would occasionally raise a
> TopologyException in my Python application; e.g.:
>
> Original exception: TopologyException: Area of intersection result is
> bigger then minimum area between input geometries
> Trying with Common bits remover.
> CBR: TopologyException: Area of intersection result is bigger then minimum
> area between input geometries
> Trying with precision 25
> Reduced with precision (25): TopologyException: no outgoing dirEdge found
> - 71.6 40.88 40.8829
> Trying with precision 24
> Reduced with precision (24): TopologyException: no outgoing dirEdge found
> -71.5833 40.875 40.8829
> Trying with precision 23
>
> After updating to FWTools v1.2.2 (gdal 1.4.0+svn to Feb. 22, 2007), I no
> longer see TopologyExceptions from polygyon intersections in my Python
> application -- but the performance has gone way down.  Evaluation of FWTools
> versions between 1.0.5 and 1.2.2 reveals that the TopologyException fix +
> slow-down was introduced in v1.1.0:
>
> P1.Intersection(P2), where P1=rectangle and P2=1860-point polygon
> v1.0.9:  ~0.01 seconds
> v1.1.0:  ~10.00 seconds (1000x slower)
>
> <sample program available>
>
> Is this a bug in GDAL, FWTools (Python wrapper), or an underlying library
> (GEOS)?
> Any ideas re: the slow-down and possible fix are appreciated.
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.maptools.org/pipermail/fwtools/attachments/20070322/10e5ba4c/attachment.html


More information about the FWTools mailing list