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.

I have an .asc file and I want to import in QGIS. The standard way to open it is from "add Raster layer" ("import Raster Layer"), there is another way? I know is strange that ask but I need it. And I need to convert the .asc file to .tif or to another raster format with QGIS.

share|improve this question
3  
Do you mean the standard way is to "add Raster layer"? Other ways would include adding the ASCII layer to a database and adding it from there, if that's the kind of thing you're looking for. Could you clarify? –  Simbamangu Dec 6 '11 at 15:28
    
Yes that I mean, I have the Greek version of Qgis and i translate it ....on the fly ;) –  Vassilis Dec 7 '11 at 7:11
    
No problem - we answered your question assuming that was the case! Do the methods we've outlined below work for you? Are you able to add raster layers successfully using these alternatives? –  Simbamangu Dec 7 '11 at 12:49

2 Answers 2

up vote 5 down vote accepted

In QGIS, then the Add Raster Layer (menu or toolbar) is your best bet: Layer: Add Raster Layer .... You could also use the Python console (see the pyqgis cookbook).

You may choose to load the layer, but you may also convert the file without adding it to your map canvas. Select the Raster: Conversion: Translate (convert format) menu option. The 'input layer' is your ASCII file, and the 'output file' will be a new file (choose the output format - TIFF or any of the 30 or so GDAL output types you will find there).

You may also choose to change the projection at this stage, choosing a new SRS. Raster translate screenshot

share|improve this answer
    
Beat me by a couple of minutes! +1 for suggesting the Python method. –  MerseyViking Dec 6 '11 at 15:55
    
thanks ... except that I couldn't get the method outlined on that page to work ... but this answer did, using loadedLayer = i.addRasterLayer('filename.asc', 'Name'). Not sure why, only just getting into Python. –  Simbamangu Dec 6 '11 at 16:09
    
First of all thank you all for your answers, I need all this things because we convert our excercises (for a master) from Arcgis to Qgis and we try to be simble. Thats why ask you for importing .asc files from main menu. With python is difficult for people who never use gis or a programming lang. But converter is that I'm looking for. thnx anyway –  Vassilis Dec 8 '11 at 7:48

The easiest way, apart from Layer|Add Raster Layer... is to just drag and drop it to the layers window. If you also want to translate it, then Raster|Translate (Convert format) is the tool for the job. All that does is wrap the command line tool gdal_translate, part of the excellent GDAL tools and library).

On the stackexchange sites, it is usual to give some background to the question in case you're doing something that might be sub-optimal and the experts can perhaps suggest a better workflow. So, as @Simbamangu asks, why is Layer|Add Raster Layer... not the right tool for the job for you? What are you trying to achieve?

share|improve this answer
    
+1 ... 'Drag and drop' ... hadn't even tried that before. –  Simbamangu Dec 6 '11 at 19:34

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.