def testConsistentResults(self):

        ulx = 94.2
        uly = 19.4
        lrx = 94.6
        lry = 19.1
        srs = SpatialReference()
        srs.ImportFromEPSG(4326)
        srs.SetAxisMappingStrategy(osr.OAMS_TRADITIONAL_GIS_ORDER)

        env = Envelope()
        env.addPoint(ulx, uly, 0, srs)
        env.addPoint(lrx, lry, 0, srs)

        fpq = FootprintsQuery(FootprintsQueryTestCase._logger)
        fpq.addAoI(env)
        numScenes = 27
        fpq.setMaximumScenes(numScenes)
        fpScenes1 = fpq.getScenes()
        fpScenes2 = fpq.getScenes()

        self.assertEqual(len(fpScenes1), numScenes)
        self.assertEqual(len(fpScenes1), len(fpScenes2))

        for i in range(len(fpScenes1)):
            self.assertEqual(fpScenes1[i].fileName(), fpScenes2[i].fileName())
    def testAddAoI(self):

        ulx = 626002.2463251714
        uly = 2145525.859757114
        lrx = 668316.2848759613
        lry = 2112661.4394026464
        srs = SpatialReference()
        srs.ImportFromEPSG(32646)

        env = Envelope()
        env.addPoint(ulx, uly, 0, srs)
        env.addPoint(lrx, lry, 0, srs)

        fpq = FootprintsQuery(FootprintsQueryTestCase._logger)
        fpq.addAoI(env)

        numScenes = 27
        fpq.setMaximumScenes(numScenes)
        fpScenes1 = fpq.getScenes()
        self.assertEqual(len(fpScenes1), numScenes)