I have a table with 720 rows and 156 columns. I have a grid with 720 rows and 156 columns. I would like to assign the values from the table to the corresponding values in the grid.

I am a beginner to ArcGIS.

  • Is that Grid (polygons, square and arranged) or GRID (raser data format)? Can we see a sample of the rows from both please to see if there's something that can be joined (or coaxed into a join field). – Michael Stimson Jun 9 '15 at 23:05
  • I think you are after joining and relating tables [help.arcgis.com/en/arcgisdesktop/10.0/help/index.html#//… – TsvGis Jun 9 '15 at 23:21
  • 1
    Doesn't work like that with a database vs a spreadsheet. In table view each row is a feature (grid cell). Columns are feature attributes, not separate features. You need one row in your data table for each grid cell, and a matching attribute between cell features and table (ie two columns; one a cell ID and one the value you want to add), to do a join. To attack this in your table, you'd have to add the row/column reference to each cell with the value, make a single column, and split the result to two columns, and give your cells that r/c reference. Proposed answer is probably faster. – Chris W Jun 10 '15 at 0:03
  • Hey, thanks for the help guys. Sorry for the confusion. By grid, I was referring to an area on my map that has been split up into individual cells. – jcronin Jun 10 '15 at 1:21

Create a new ASCII raster from your table. To do this, first save your table as a space-delimited file. Open the file in a text editor and add an ASCII raster header, like this:

43 2 45 7 3 56 2 5 23 65 34 6 32 54 57 34
35 45 65 34 2 6 78 4 2 6 89 3 2 7 45 23 5 ...

You can get the parameters to use from the properties of your existing raster. Save the text file with an extension of .asc. If you are on a recent version of ArcGIS, you will now be able to view the ASCII raster like any other raster.

You can learn more in the help for "ASCII to Raster (Conversion)".

  • 2
    That works, just match your origin and cellsize to the grid. From here you can convert to polygon or point for spatial joining with vector grid. I like it – Michael Stimson Jun 9 '15 at 23:32
  • Can you guys help me with determining the values for CELLSIZE, XLLCORNER, and YLLCORNER. I believe that xllcorner and yllcorner are just found in the extent tab of the properties of the grid. Is this correct? Thanks. – jcronin Jun 10 '15 at 20:34
  • 1
    You are correct. Under Extents, your XLLCORNER is the "Left" extent, and the YLLCORNER is the "Bottom" extent (LL stands for "Lower Left"). CELLSIZE is in "Raster Information". – jlcrawf0 Jun 10 '15 at 20:47
  • @jcronin As a text file your raster doesn't have a coordinate reference system. Since you set the origin coordinate to the same value as your grid, you should be able to set the raster to the same CRS and have it align. You would do this with the Define Projection tool. jlcrawf0 you might want to expand your answer a bit with the steps Michael mentions and some of the details so it fully addresses the original question. – Chris W Jun 11 '15 at 3:52

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.