Opened 17 years ago
Last modified 16 years ago
#1497 closed enhancement
Use EnhancedPrecisionOp for difference and intersection operations — at Initial Version
Reported by: | Owned by: | Mateusz Łoskot | |
---|---|---|---|
Priority: | normal | Milestone: | 1.6.0 |
Component: | OGR_SF | Version: | svn-trunk |
Severity: | minor | Keywords: | geos intersection precision |
Cc: |
Description
We can use the new geos operations to compute difference and intersection (and possibly other). Algorithms are more robusts and there is less error messages like "no diredge found". The little patch: diff -r -N gdal-1.4.0/ogr/ogrgeometry.cpp gdal-1.4.0-fb/ogr/ogrgeometry.cpp 167a168,174 > #ifdef HAVE_GEOS > #if GEOS_VERSION_MAJOR >= 3 > #include <geos/precision/EnhancedPrecisionOp.h> > #endif > #endif > > 1724c1731,1735 < hGeosProduct = GEOSIntersection( hThisGeosGeom, hOtherGeosGeom ); --- > #if GEOS_VERSION_MAJOR >= 3 > hGeosProduct = (GEOSGeometry*)geos::precision::EnhancedPrecisionOp::intersection(( geos::geom::Geometry*) hThisGeosGeom, (geos::geom::Geometry*)hOtherGeosGeom ); > #else > hGeosProduct = GEOSIntersection( hThisGeosGeom, hOtherGeosGeom ); > #endif 1862a1874,1876 > #if GEOS_VERSION_MAJOR >= 3 > hGeosProduct = (GEOSGeometry*)geos::precision::EnhancedPrecisionOp::difference(( geos::geom::Geometry*) hThisGeosGeom, (geos::geom::Geometry*)hOtherGeosGeom ); > #else 1863a1878 > #endif
Note:
See TracTickets
for help on using tickets.