Skip to content
Permalink
Browse files

Indentation

  • Loading branch information
nyalldawson committed Jun 8, 2017
1 parent b6e1eea commit 8ef6722e9a710b8ec8c61ab009ba4e4334b5598f
Showing with 4 additions and 4 deletions.
  1. +4 −4 tests/src/python/featuresourcetestbase.py
@@ -510,7 +510,7 @@ def testRectAndExpression(self):

def testGetFeaturesDestinationCrs(self):
request = QgsFeatureRequest().setDestinationCrs(QgsCoordinateReferenceSystem('epsg:3785'))
features = {f['pk']:f for f in self.source.getFeatures(request)}
features = {f['pk']: f for f in self.source.getFeatures(request)}
# test that features have been reprojected
self.assertAlmostEqual(features[1].geometry().geometry().x(), -7829322, -5)
self.assertAlmostEqual(features[1].geometry().geometry().y(), 9967753, -5)
@@ -523,10 +523,10 @@ def testGetFeaturesDestinationCrs(self):
self.assertAlmostEqual(features[5].geometry().geometry().y(), 14493008, -5)

# when destination crs is set, filter rect should be in destination crs
rect = QgsRectangle(-7650000,10500000,-7200000,15000000)
rect = QgsRectangle(-7650000, 10500000, -7200000, 15000000)
request = QgsFeatureRequest().setDestinationCrs(QgsCoordinateReferenceSystem('epsg:3785')).setFilterRect(rect)
features = {f['pk']:f for f in self.source.getFeatures(request)}
self.assertEqual(set(features.keys()),{2,4})
features = {f['pk']: f for f in self.source.getFeatures(request)}
self.assertEqual(set(features.keys()), {2, 4})
# test that features have been reprojected
self.assertAlmostEqual(features[2].geometry().geometry().x(), -7591989, -5)
self.assertAlmostEqual(features[2].geometry().geometry().y(), 11334232, -5)

0 comments on commit 8ef6722

Please sign in to comment.
You can’t perform that action at this time.