...I invite you and any other readers to conduct these tests with your versions of ArcGIS.
we would expect the chi-square statistic to be near 63 [the correct value is about 62.3].
''' write_ascii.py specify the filename, classes etc below ''' import random output_file = "c:/temp/demo_ascii.asc" classes = 64 ncols = 10 nrows = 10 xllcorner = 0 yllcorner = 0 cellsize = 1 NODATA_value = -9999 header = ["ncols " + str(ncols) + "\n", "nrows " + str(nrows) + "\n", "xllcorner " + str(xllcorner) + "\n", "yllcorner " + str(yllcorner) + "\n", "cellsize " + str(cellsize) + "\n", "NODATA_value " + str(NODATA_value)] out_file = open(output_file,'w') for i in header: out_file.write(i) for i in range(nrows): a_line = "\n" for j in range(ncols): a_val = int(random.random() * classes) a_line += str(a_val) + " " out_file.write(a_line) out_file.close()
Aangemelde leden kunnen berichten plaatsen, updates volgen en meer. Nieuw hier? Registreer een gratis account.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.