<html><body><div style="font-family: arial, helvetica, sans-serif; font-size: 12pt; color: #000000"><div>Hello all, </div><div>I want to get the error for each GCP before warping so I can calculate the RMSE before georeferencing.</div><div>With a list of GCPs, is it possible to get the eventual map location of each pixel coordinate to calculate the transformation error for each GCP?<br></div><div>I have tried to use GCPsToGeoTransform but that gave me a map location that was further from the intended chosen GCP coordinate than the actual post-<span style="color: #000000; font-family: arial, helvetica, sans-serif; font-size: 16px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: #ffffff; text-decoration-style: initial; text-decoration-color: initial; display: inline !important; float: none;" data-mce-style="color: #000000; font-family: arial, helvetica, sans-serif; font-size: 16px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: #ffffff; text-decoration-style: initial; text-decoration-color: initial; display: inline !important; float: none;">georeferencing</span> pixel location.</div><div><br data-mce-bogus="1"></div><div>Here is my <span style="color: #000000; font-family: arial, helvetica, sans-serif; font-size: 16px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: #ffffff; text-decoration-style: initial; text-decoration-color: initial; display: inline !important; float: none;" data-mce-style="color: #000000; font-family: arial, helvetica, sans-serif; font-size: 16px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: #ffffff; text-decoration-style: initial; text-decoration-color: initial; display: inline !important; float: none;">GCPsToGeoTransform code:</span></div><div>##CODE_START</div><div><br data-mce-bogus="1"></div><div>from osgeo import gdal<br>#list of GCPs<br>gcpjson={'0': {'row': 5305.626973704321, 'col': 1158.432032601927, 'lat': -107.18221364936802, 'lon': 35.08107313264506}, '1': {'row': 778.3230540174817, 'col': 2317.0737231100225, 'lat': -107.17634116783263, 'lon': 35.09958594602314}, '2': {'row': 3950.8777704175645, 'col': 4880.465723118029, 'lat': -107.163460244414, 'lon': 35.08679518563491}, '3': {'row': 7609.882307742781, 'col': 4407.027704042081, 'lat': -107.16570574683065, 'lon': 35.07164256912238}, '4': {'row': 1822.0904204049455, 'col': 6486.900377637105, 'lat': -107.15529960157271, 'lon': 35.096105471961536}, '5': {'row': 6291.396402113635, 'col': 7216.1033738731185, 'lat': -107.15180240538085, 'lon': 35.077317337370516}}<br><br>#New list to put in gdal.GCP objects into<br>gcpList=[]<br>#Load GCP objects into gcpList<br>for gcp in gcpjson:<br> gcpList.append(gdal.GCP(gcpjson[gcp]['lat'],gcpjson[gcp]['lon'],0,gcpjson[gcp]['col'],gcpjson[gcp]['row']))<br><br>#create GeoTranform from gcp list<br>GT = gdal.GCPsToGeoTransform(tuple(gcpList))<br><br>#Get pixel location from first GCP as a test.<br>col=gcpjson['0']['col']<br>row=gcpjson['0']['row']<br>xp = GT[0] + col*GT[1] + row*GT[2]<br>yp = GT[3] + col*GT[4] + row*GT[5]<br>print("POINT ("+str(xp)+" "+str(yp)+" 0)")</div><div><br data-mce-bogus="1"></div><div>##CODE_END</div><div><br data-mce-bogus="1"></div><div>This prints out the WKT 'POINT (-107.18216298 35.0808978834 0)' which is kinda close to <span style="color: #000000; font-family: arial, helvetica, sans-serif; font-size: 16px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: #ffffff; text-decoration-style: initial; text-decoration-color: initial; display: inline !important; float: none;" data-mce-style="color: #000000; font-family: arial, helvetica, sans-serif; font-size: 16px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: #ffffff; text-decoration-style: initial; text-decoration-color: initial; display: inline !important; float: none;">-107.18221364936802, 35.08107313264506 but looking at my post warped image the chosen pixel is right on top of the intended coordinate so I am clearly doing something (or a lot) wrong.</span></div><div><span style="color: #000000; font-family: arial, helvetica, sans-serif; font-size: 16px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: #ffffff; text-decoration-style: initial; text-decoration-color: initial; display: inline !important; float: none;" data-mce-style="color: #000000; font-family: arial, helvetica, sans-serif; font-size: 16px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: #ffffff; text-decoration-style: initial; text-decoration-color: initial; display: inline !important; float: none;"><br></span></div><div><br data-mce-bogus="1"></div><div><br data-mce-bogus="1"></div><div>Any help would be great.</div><div>Thanks,</div><div>-Hays</div><div><br data-mce-bogus="1"></div></div></body></html>