From d0671098d1428a10565ae015ca37568e638c15d7 Mon Sep 17 00:00:00 2001 From: artemp Date: Fri, 24 May 2013 09:32:48 +0100 Subject: [PATCH] OGR.input + set tolerance tol=0.001 in features_at_point test older versions of GDAL are not handling empty bounding boxes correctly e.g SetSpatialFilterRect(x0,y0,x0,y0) tested on ubuntu-12.04/64-bit g++-4.6.3 gdal-1.7.3 --- tests/python_tests/ogr_test.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/python_tests/ogr_test.py b/tests/python_tests/ogr_test.py index baf982bd7..4a0acc659 100644 --- a/tests/python_tests/ogr_test.py +++ b/tests/python_tests/ogr_test.py @@ -30,7 +30,7 @@ if 'ogr' in mapnik.DatasourceCache.plugin_names(): # See SHAPE_ENCODING for overriding: http://gdal.org/ogr/drv_shapefile.html # So: failure for the NOM_FR field is expected for older gdal ds = mapnik.Ogr(file='../../demo/data/boundaries.shp',layer_by_index=0) - f = ds.features_at_point(ds.envelope().center()).features[0] + f = ds.features_at_point(ds.envelope().center(), 0.001).features[0] eq_(ds.geometry_type(),mapnik.DataGeometryType.Polygon) eq_(f['CGNS_FID'], u'6f733341ba2011d892e2080020a0f4c9')