Output extent blowout from warp from file

Discussion created by jm1 on Nov 14, 2016
Latest reply on Nov 14, 2016 by jm1


I want to register a set of images (epsg4326) to a projected reference image epsg32755.  I have already tried Reproject in ArcMap 10.4, but the features do not line up well, so I think a Warp will be needed.  As there is a set of files, I wanted to use python to process them.


I have 21 gcp pairs for the files, saved to a text file from the Georeferencing tool.  Example of the python script given below.


The warp does seem to work OK in aligning the features, but my columns and rows blow out from the original 680, 765 to a massive 19615, 30096, i.e. the result image contains a lot of no data pixels.


I've tried changing the transformation, setting extent, but can not figure out how to fix the problem.

Any suggestions?






def warp_file(inFile,outFile,GCPfile):


    print "\nStarting process"




        # layer extent taken from T3 p030 image
        #arcpy.env.extent = arcpy.Extent(145.5059494, -17.0246642, 145.6570454, -17.1946472)

        arcpy.env.extent = arcpy.Extent(341121.25, 8117106.25, 357061.25, 8098416.25)





##        arcpy.Warp_management(inFile,outFile,GCPfile,"POLYORDER3","NEAREST")        


    except Exception as e:
        print "Unknown Error {0}".format(str(e))