Skip to main content
edited grammar and typos
Source Link
lambertj
  • 3.1k
  • 3
  • 21
  • 38

thatsIt's my first time writing here, but hope iI might give you some insight. I used the code from your post, with some minor changes it worked… kind of. I checked the correlation matrices that iI get by comparing some of minemy classification data with data rasterized in qgisthe QGIS tool and raster generated by this code. Raster generated by your code had kappa coefficient near 0.4, while that generated by qgisQGIS was near 0.9. I think the problem lies somwheresomewhere in

    target_ds.SetGeoTransform((x_min, pixel_width, 0, y_min, 0, pixel_width))

Using .GetGeoTransform() solved the problem for me (got same correlation matrices as from QGIS data)

    target_ds.SetGeoTransform(data.GetGeTransform())

thats my first time writing here, but hope i might give you some insight. I used the code from your post, with some minor changes it worked… kind of. I checked correlation matrices that i get by comparing some of mine classification data with data rasterized in qgis tool and raster generated by this code. Raster generated by your code had kappa coefficient near 0.4, while that generated by qgis was near 0.9. I think the problem lies somwhere in

    target_ds.SetGeoTransform((x_min, pixel_width, 0, y_min, 0, pixel_width))

Using .GetGeoTransform() solved the problem for me (got same correlation matrices as from QGIS data)

    target_ds.SetGeoTransform(data.GetGeTransform())

It's my first time writing here, but hope I might give you some insight. I used the code from your post, with some minor changes it worked… kind of. I checked the correlation matrices that I get by comparing some of my classification data with data rasterized in the QGIS tool and raster generated by this code. Raster generated by your code had kappa coefficient near 0.4, while that generated by QGIS was near 0.9. I think the problem lies somewhere in

    target_ds.SetGeoTransform((x_min, pixel_width, 0, y_min, 0, pixel_width))

Using .GetGeoTransform() solved the problem for me (got same correlation matrices as from QGIS data)

    target_ds.SetGeoTransform(data.GetGeTransform())
Source Link

thats my first time writing here, but hope i might give you some insight. I used the code from your post, with some minor changes it worked… kind of. I checked correlation matrices that i get by comparing some of mine classification data with data rasterized in qgis tool and raster generated by this code. Raster generated by your code had kappa coefficient near 0.4, while that generated by qgis was near 0.9. I think the problem lies somwhere in

    target_ds.SetGeoTransform((x_min, pixel_width, 0, y_min, 0, pixel_width))

Using .GetGeoTransform() solved the problem for me (got same correlation matrices as from QGIS data)

    target_ds.SetGeoTransform(data.GetGeTransform())