id,summary,reporter,owner,description,type,status,priority,milestone,component,version,severity,resolution,keywords,cc 1469,AutoCreateWarpedVRT creates incorrect VRT Dataset,szekerest,warmerdam,"Currently, for the SWIG bindings, the only option to use the the GDAL warp functionality is to utilize AutoCreateWarpedVRT. To use this feature the following (simplified) C# code sample was created: {{{ gdal.AllRegister(); Dataset ds = gdal.Open( ""usapm.jpg"", gdalconst.GA_ReadOnly ); SpatialReference t_srs = new SpatialReference(""""); t_srs.SetFromUserInput(""+proj=longlat +ellps=clrk80 +no_defs""); string t_srs_wkt; t_srs.ExportToWkt(out t_srs_wkt); SpatialReference s_srs = new SpatialReference(""""); s_srs.SetFromUserInput(""+proj=utm +zone=16 +datum=NAD83 +no_defs""); string s_srs_wkt; s_srs.ExportToWkt(out s_srs_wkt); Dataset dswarp = gdal.AutoCreateWarpedVRT( ds, s_srs_wkt, t_srs_wkt, gdalconst.GRA_NearestNeighbour, 0.125 ); Driver drv_out = gdal.GetDriverByName(""GTiff""); // saving the VRT dataset (optional) Dataset dsw1 = dswarp.GetDriver().CreateCopy(""usapm_bad.vrt"", dswarp, 1, null); // saving the warped image Dataset dsw = drv_out.CreateCopy(""usapm_bad.tif"", dswarp, 0, new string[] { ""INTERLEAVE=PIXEL"", null }); }}} Currently this code does not work as expected and the resulting image is not warped. So as to inspect this problem the following equivalent commands were executed using the same dataset: {{{ gdalwarp -s_srs ""+proj=utm +zone=16 +datum=NAD83 +no_defs"" \ -t_srs ""+proj=longlat +ellps=clrk80 +no_defs"" -of VRT \ usapm.jpg usapm_good.vrt }}} {{{ gdalwarp -co ""INTERLEAVE=PIXEL"" usapm_good.vrt usapm_good.tif }}} A suggested patch was also created for fixing this problem. The following files will be attached to this bug: {{{ usapm_good.vrt usapm_bad.vrt usapm.zip (contains usapm.jpg, usapm.jgw) vrtwarped.cpp.patch }}}",defect,closed,normal,1.4.1,GDAL_Raster,unspecified,normal,fixed,vrt,Mateusz Łoskot