[GRASS-user] r.in.gdal for importing categorical ArcGIS binary rasters

manuel.martin manuel.martin at orleans.inra.fr
Thu Feb 13 01:48:08 PST 2014


Hi Ben,
Thanks for the reply. I tried with the band option but it looks like 
gdal does not detect the multiple fields as multiple bands :

GRASS 7.0.svn (lambert93):~ > r.in.gdal --o \
 > 
input=/home/manuel/Desktop/sftp/Projets/Projets/Zones-humides/base_sig/dsm_data/clc/clc06_250m 
\
 > band=3 output=testclc
WARNING: Raster map <testclc> already exists and will be overwritten
WARNING: Datum <Not_specified_based_on_GRS_1980_ellipsoid> not recognised
          by GRASS and no parameters found
Projection of input dataset and current location appear to match
ERROR 5: 
/home/manuel/Desktop/sftp/Projets/Projets/Zones-humides/base_sig/dsm_data/clc/clc06_250m: 
GDALDataset::GetRasterBand(3) - Illegal band #

ERROR: Selected band (3) does not exist


Cheers, Manuel

On 02/12/2014 08:25 PM, Benjamin Ducke wrote:
> Hi Manuel,
>
> GRASS does not support multi-band rasters, so you'll have
> to import each band as a separate raster map.
>
> r.in.gdal has the "band=" option to specify a band number
> to import.
>
> Best,
>
> Ben
>
> On 12/02/14 17:05, manuel.martin wrote:
>> Hi all,
>>
>> I tried to import an ArcGIS binary raster (corine land cover for the
>> French territory) with three fields on each pixels (VALUE, COUNT and
>> CODE_06) using the *r.in.gdal* command. The import works just fine,
>> except that in the resulting raster, in GRASS, I only get one field,
>> which seems to be the VALUE field (and not the CODE_06 field, which I am
>> interested in, and which is a categorical field, although coded with
>> integers).
>>
>> Is there a way to produce a resulting raster with all the fields of the
>> initial ArcGIS layer, or alternatively to choose one unique field? Also,
>> is there a limitation on categorical fields. For instance, what if
>> instead of integer corine land cover codes I have literal labels, i.e.
>> levels of my categorical field coded with strings?
>>
>> Cheers, Manuel
>>
>> -- 
>>
>> ----------------0----0------
>> INRA - InfoSol
>> Centre de recherche d'Orléans
>> 2163 Avenue de la Pomme de Pin
>> CS 40001 ARDON
>> 45075 ORLEANS Cedex 2
>> tel : (33) (0)2 38 41 48 21
>> fax : (33) (0)2 38 41 78 69
>> http://www.gissol.fr
>> ----0----0------------------
>>
>>
>>
>> _______________________________________________
>> grass-user mailing list
>> grass-user at lists.osgeo.org
>> http://lists.osgeo.org/mailman/listinfo/grass-user
>>
>
>


-- 

----------------0----0------
INRA - InfoSol
Centre de recherche d'Orléans
2163 Avenue de la Pomme de Pin
CS 40001 ARDON
45075 ORLEANS Cedex 2
tel : (33) (0)2 38 41 48 21
fax : (33) (0)2 38 41 78 69
http://www.gissol.fr
----0----0------------------



More information about the grass-user mailing list