Beispiel #1
0
 def test_sagasortgrid(self):
     outputs=sextante.runalg("saga:sortgrid",raster(),True,None)
     output=outputs['OUTPUT']
     self.assertTrue(os.path.isfile(output))
     dataset=gdal.Open(output, GA_ReadOnly)
     strhash=hash(str(dataset.ReadAsArray(0).tolist()))
     self.assertEqual(strhash,1320073153)
Beispiel #2
0
 def test_SagaRasterAlgorithmWithUnsupportedOutputFormat(self):
     outputs=sextante.runalg("saga:convergenceindex",raster(),0,0,SextanteUtils.getTempFilename("img"))
     output=outputs['RESULT']
     self.assertTrue(os.path.isfile(output))
     dataset=gdal.Open(output, GA_ReadOnly)
     strhash=hash(str(dataset.ReadAsArray(0).tolist()))
     self.assertEqual(strhash, 485390137)
Beispiel #3
0
 def test_sagametricconversions(self):
     outputs=sextante.runalg("saga:metricconversions",raster(),0,None)
     output=outputs['CONV']
     self.assertTrue(os.path.isfile(output))
     dataset=gdal.Open(output, GA_ReadOnly)
     strhash=hash(str(dataset.ReadAsArray(0).tolist()))
     self.assertEqual(strhash,-2137931723)
 def test_modelernotinorder(self):
     outputs=sextante.runalg("modeler:notinorder",raster(),None)
     output=outputs['CAREA_ALG0']
     self.assertTrue(os.path.isfile(output))
     dataset=gdal.Open(output, GA_ReadOnly)
     strhash=hash(str(dataset.ReadAsArray(0).tolist()))
     self.assertEqual(strhash,-1557050506)
 def test_modelersimplemodel(self):
     outputs=sextante.runalg("modeler:simplemodel",raster(),None)
     output=outputs['SLOPE_ALG0']
     self.assertTrue(os.path.isfile(output))
     dataset=gdal.Open(output, GA_ReadOnly)
     strhash=hash(str(dataset.ReadAsArray(0).tolist()))
     self.assertEqual(strhash,1891122097)
 def test_modelersimplemodel(self):
     outputs=sextante.runalg("modeler:simplemodel",raster(),None)
     output=outputs['SLOPE_ALG0']
     self.assertTrue(os.path.isfile(output))
     dataset=gdal.Open(output, GA_ReadOnly)
     strhash=hash(str(dataset.ReadAsArray(0).tolist()))
     self.assertEqual(strhash,1891122097)
 def test_modelernotinorder(self):
     outputs=sextante.runalg("modeler:notinorder",raster(),None)
     output=outputs['CAREA_ALG0']
     self.assertTrue(os.path.isfile(output))
     dataset=gdal.Open(output, GA_ReadOnly)
     strhash=hash(str(dataset.ReadAsArray(0).tolist()))
     self.assertEqual(strhash,-1557050506)
Beispiel #8
0
 def test_sagametricconversions(self):
     outputs = sextante.runalg("saga:metricconversions", raster(), 0, None)
     output = outputs['CONV']
     self.assertTrue(os.path.isfile(output))
     dataset = gdal.Open(output, GA_ReadOnly)
     strhash = hash(str(dataset.ReadAsArray(0).tolist()))
     self.assertEqual(strhash, -2137931723)
Beispiel #9
0
 def test_sagasortgrid(self):
     outputs = sextante.runalg("saga:sortgrid", raster(), True, None)
     output = outputs['OUTPUT']
     self.assertTrue(os.path.isfile(output))
     dataset = gdal.Open(output, GA_ReadOnly)
     strhash = hash(str(dataset.ReadAsArray(0).tolist()))
     self.assertEqual(strhash, 1320073153)
Beispiel #10
0
 def test_gdalogrsieve(self):
     outputs=sextante.runalg("gdalogr:sieve",raster(),2,0,None)
     output=outputs['dst_filename']
     self.assertTrue(os.path.isfile(output))
     dataset=gdal.Open(output, GA_ReadOnly)
     strhash=hash(str(dataset.ReadAsArray(0).tolist()))
     self.assertEqual(strhash,-1353696889)
Beispiel #11
0
 def test_gdalogrsieveWithUnsupportedOutputFormat(self):
     outputs=sextante.runalg("gdalogr:sieve",raster(),2,0, SextanteUtils.getTempFilename("img"))
     output=outputs['dst_filename']
     self.assertTrue(os.path.isfile(output))
     dataset=gdal.Open(output, GA_ReadOnly)
     strhash=hash(str(dataset.ReadAsArray(0).tolist()))
     self.assertEqual(strhash,-1353696889)        
Beispiel #12
0
 def test_gdalogrmerge(self):
     outputs=sextante.runalg("gdalogr:merge",raster(),False,False,None)
     output=outputs['OUTPUT']
     self.assertTrue(os.path.isfile(output))
     dataset=gdal.Open(output, GA_ReadOnly)
     strhash=hash(str(dataset.ReadAsArray(0).tolist()))
     self.assertEqual(strhash,-1353696889)
Beispiel #13
0
 def test_gdalogrwarpreproject(self):
     outputs=sextante.runalg("gdalogr:warpreproject",raster(),"EPSG:23030","EPSG:4326",0,0,"",None)
     output=outputs['OUTPUT']
     self.assertTrue(os.path.isfile(output))
     dataset=gdal.Open(output, GA_ReadOnly)
     strhash=hash(str(dataset.ReadAsArray(0).tolist()))
     self.assertEqual(strhash,-2021328784)        
Beispiel #14
0
 def test_gdalogrsieveWithUnsupportedOutputFormat(self):
     outputs=sextante.runalg("gdalogr:sieve",raster(),2,0, SextanteUtils.getTempFilename("img"))
     output=outputs['dst_filename']
     self.assertTrue(os.path.isfile(output))
     dataset=gdal.Open(output, GA_ReadOnly)
     strhash=hash(str(dataset.ReadAsArray(0).tolist()))
     self.assertEqual(strhash,-1353696889)
Beispiel #15
0
 def test_gdalogrsieve(self):
     outputs=sextante.runalg("gdalogr:sieve",raster(),2,0,None)
     output=outputs['dst_filename']
     self.assertTrue(os.path.isfile(output))
     dataset=gdal.Open(output, GA_ReadOnly)
     strhash=hash(str(dataset.ReadAsArray(0).tolist()))
     self.assertEqual(strhash,-1353696889)
Beispiel #16
0
 def test_SagaRasterAlgorithmWithUnsupportedOutputFormat(self):
     outputs=sextante.runalg("saga:convergenceindex",raster(),0,0,SextanteUtils.getTempFilename("img"))
     output=outputs['RESULT']
     self.assertTrue(os.path.isfile(output))
     dataset=gdal.Open(output, GA_ReadOnly)
     strhash=hash(str(dataset.ReadAsArray(0).tolist()))
     self.assertEqual(strhash, 485390137)