[GRASS-user] Importing ASCII file

Rainer M Krug r.m.krug at gmail.com
Wed Jun 27 10:54:32 PDT 2012


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 27/06/12 18:36, Daniel Lee wrote:
> Hi Rich,
> 
> Thanks for the tip. Unfortunately, r.in.ascii is made for files with another type of header. 
> Nonetheless, I tried it and here's the output:
> 
> r.in.ascii input=/home/lee/co2/daten/gcm_results/prec_1.asc output=test "north" field missing
> from header "south" field missing from header "east" field missing from header "west" field
> missing from header "rows" field missing from header "cols" field missing from header Illegal
> row value ERROR: Can't get cell header
> 
> Those values aren't in the header though and the requirements of r.in.arc match the header :(
> QGIS manages to open it, but I don't know how to script it and it's quite a large number of
> datasets.
> 
> Any other ideas? Does anyone have experience with opening and exporting rasters in QGIS from a 
> script? That would make things a bit easier, otherwise it takes a good 5 minutes or so to open
> each file.

What about gdal? Check with gdalinfo which format it is, and then use r.in.gdal to import it - I
guess qgis is using gdal to import the files.

Cheers,

Rainer

> 
> Thanks! Daniel
> 
> --
> 
> B.Sc. Daniel Lee Geschäftsführung für Forschung und Entwicklung ISIS - International Solar
> Information Solutions GbR Vertreten durch: Daniel Lee, Nepomuk Reinhard und Nils Räder
> 
> Softwarecenter 3 35037 Marburg Festnetz: +49 6421 379 6256 Mobil: +49 176 6127 7269 E-Mail:
> Lee at isi-solutions.org <mailto:Lee at isi-solutions.org> Web: http://www.isi-solutions.org
> <http://www.isi-solutions.org/>
> 
> 
> 
> 
> 2012/6/27 Rich Shepard <rshepard at appl-ecosys.com <mailto:rshepard at appl-ecosys.com>>
> 
> On Wed, 27 Jun 2012, Daniel Lee wrote:
> 
> I'm having a lot of trouble importing some ASCII data into GRASS. It seems
> 
> like a perfect case for r.in.arc, but r.in.arc isn't working. Here's some info:
> 
> 
> Daniel,
> 
> From the 6.5 manual r. index:
> 
> r.in.arc        Converts an ESRI ARC/INFO ascii raster file (GRID) into a (binary) raster map
> layer. r.in.ascii      Converts ASCII raster file to binary raster map layer.
> 
> Try r.in.ascii.
> 
> Rich
> 
> -- Richard B. Shepard, Ph.D.          |   Integrity - Credibility - Innovation Applied
> Ecosystem Services, Inc.   |    Helping Ensure Our Clients' Futures 
> <http://www.appl-ecosys.com>     Voice: 503-667-4517 <tel:503-667-4517>      Fax: 503-667-8863 
> <tel:503-667-8863>
> 
> _________________________________________________ grass-user mailing list 
> grass-user at lists.osgeo.org <mailto:grass-user at lists.osgeo.org> 
> http://lists.osgeo.org/__mailman/listinfo/grass-user 
> <http://lists.osgeo.org/mailman/listinfo/grass-user>
> 
> 
> 
> 
> _______________________________________________ grass-user mailing list 
> grass-user at lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-user
> 


-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAk/rSNgACgkQoYgNqgF2egphcACfRtCQ8LHhTjC2hBjXcZzRwOUy
uQAAn3NCvz7yexJm0RHz+NwUreQfamWW
=wQPa
-----END PGP SIGNATURE-----


More information about the grass-user mailing list