Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

How could I convert a file(s) which is "DIGITAL Map data stored in ESRI ARCInfo Integer ASCII Grid format" into something the rest of us can use? i.e import into QGIS. The main file has no extension and is 70 MB, the accompanying files are a *.dbf and a *.prj.

It does appear to be of the format described here; http://en.wikipedia.org/wiki/Esri_grid but how do I convert it?

share|improve this question
1  
OK, by adding an *.asc suffix to the file I can get it to open in QGIS as a 1 band raster, with the default project projection. But I would like to associate the dbf information with it, presuming that there is more information here. –  BWill Sep 19 '11 at 7:05
3  
A .dbf file is not a standard part of an ASCII grid format. Why don't you just open the .dbf file (with a spreadsheet, database, or GIS program) and see what's in it? –  whuber Sep 19 '11 at 15:06
    
Hi W, the dbf seems to be some sort of key VALUE MAP_UNIT 1.00000 Undefined 2.00000 A1 3.00000 A10 4.00000 A11 5.00000 A12 6.00000 A13 7.00000 A14 8.00000 A15 9.00000 A16 –  BWill Sep 20 '11 at 11:51
    
Ah! It must be an attribute table. It is meant to be joined to the grid values. –  whuber Sep 20 '11 at 15:08
    
Not much luck with QGIS, I had fair crack at it with GRASS but still need the attribute data to be tied in there somehow. I'll work on your suggestions. –  BWill Nov 22 '11 at 23:44

4 Answers 4

gdal_translate-of gtiff foobar.asc foobar.tif, where .asc is optional, will do the trick of converting to the more usable geotiff format (and save a whack of disk space too). I'm not sure how one would go about associating the attribute values to the raster cells in qgis, that could be a separate question as it's probably not file format specific operation.

share|improve this answer

Arc ASCII grid files are single-band files. If you have not opened the *.dbf yet (for example, because Office 2007/2010 don't like dbfs), there is a free program DBF Commander that will open it for you and allow you to examine it and/or convert it to *.csv. The dbf... is it a vat.dbf? Value Attribute Table?

share|improve this answer

I have found R great for handling dbf files. I imagine it would work well to deal with both the raster and the dbf file in this instance. Using the package foreign you can read in a dbf as a dataframe manipulate it, and write out a dbf also. foreign is included in the default R installation.

For dealing with the raster I would use the package raster which has a lot of functionality for performing analysis. You read in anytime of raster (.asc is fine). For relating the raster and dbf together you might want to use the merge() command.

share|improve this answer

You can add a .dbf file to QGIS using Add Vector layer.

You get a geometryless layer with the attribute table which you can join to the raster or other vector files.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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