<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<div class="moz-cite-prefix">I think geoTiffs do not handle
categorical variables (can anyone confirm?), neither the
writeRAST6() function from spgrass6 (tested yesterday), and that's
why I looked for a full GRASS option (avoiding using R to go from
ArcGIS to GRASS). So it is true that I can import categorical
ArcGIS binary rasters into R, but then I'm stuck into R and cannot
move to GRASS...<br>
<br>
Manuel<br>
<br>
On 02/13/2014 11:58 AM, Nuno Sá wrote:<br>
</div>
<blockquote
cite="mid:CAB-ux0BU+9xcY0DcZPOE8_-2_NwXm14N8Kk1D5=3KYkkLWnFZA@mail.gmail.com"
type="cite">
<div dir="ltr">Out of the box:
<div><br>
</div>
<div>Import it in R and save it as a Tiff - use GRASS to open
this tiff. Maybe it works ;P</div>
</div>
<div class="gmail_extra"><br>
<br>
<div class="gmail_quote">On 13 February 2014 10:50, Benjamin
Ducke <span dir="ltr"><<a moz-do-not-send="true"
href="mailto:benducke@fastmail.fm" target="_blank">benducke@fastmail.fm</a>></span>
wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0
.8ex;border-left:1px #ccc solid;padding-left:1ex">Ouch. I am
beginning to suspect that the ESRI "field"<br>
concept for raster layers does not translate well<br>
to GRASS/GDAL. Sorry for not being able to help.<br>
Maybe someone else on this list has experience with<br>
this type of data structure?<br>
<br>
At least now we know that r.in.gdal starts counting<br>
bands with "1"!<br>
<br>
Ben<br>
<div class="HOEnZb">
<div class="h5"><br>
On 13/02/14 11:14, manuel.martin wrote:<br>
> I had already tried this (with "2") ;-). No luck
either. Reading your<br>
> email I tried with "0" (maybe would gdal detect
only two bands over<br>
> three). It comes out that only "band=1" works....<br>
><br>
><br>
> GRASS 7.0.svn (lambert93):~ > r.in.gdal --o<br>
>
input=/home/manuel/Desktop/sftp/Projets/Projets/Zones-humides/base_sig/dsm_data/clc/clc06_250m<br>
> band=0 output=testclc<br>
> WARNING: Raster map <testclc> already exists
and will be overwritten<br>
> WARNING: Datum
<Not_specified_based_on_GRS_1980_ellipsoid> not
recognised<br>
> by GRASS and no parameters found<br>
> Projection of input dataset and current location
appear to match<br>
> ERROR 5:<br>
>
/home/manuel/Desktop/sftp/Projets/Projets/Zones-humides/base_sig/dsm_data/clc/clc06_250m:<br>
> GDALDataset::GetRasterBand(0) - Illegal band #<br>
><br>
> ERROR: Selected band (0) does not exist<br>
><br>
><br>
><br>
><br>
> On 02/13/2014 10:59 AM, Benjamin Ducke wrote:<br>
>> Hmm, the manual page does not say so
explicitely,<br>
>> but maybe band numbering starts with "0"?<br>
>> In that case your band 3 would have index
number "2".<br>
>><br>
>> Ben<br>
>><br>
>> On 13/02/14 10:48, manuel.martin wrote:<br>
>>> Hi Ben,<br>
>>> Thanks for the reply. I tried with the band
option but it looks like<br>
>>> gdal does not detect the multiple fields as
multiple bands :<br>
>>><br>
>>> GRASS 7.0.svn (lambert93):~ > r.in.gdal
--o \<br>
>>>
input=/home/manuel/Desktop/sftp/Projets/Projets/Zones-humides/base_sig/dsm_data/clc/clc06_250m<br>
>>><br>
>>> \<br>
>>>> band=3 output=testclc<br>
>>> WARNING: Raster map <testclc> already
exists and will be overwritten<br>
>>> WARNING: Datum
<Not_specified_based_on_GRS_1980_ellipsoid> not<br>
>>> recognised<br>
>>> by GRASS and no parameters found<br>
>>> Projection of input dataset and current
location appear to match<br>
>>> ERROR 5:<br>
>>>
/home/manuel/Desktop/sftp/Projets/Projets/Zones-humides/base_sig/dsm_data/clc/clc06_250m:<br>
>>><br>
>>> GDALDataset::GetRasterBand(3) - Illegal
band #<br>
>>><br>
>>> ERROR: Selected band (3) does not exist<br>
>>><br>
>>><br>
>>> Cheers, Manuel<br>
>>><br>
>>> On 02/12/2014 08:25 PM, Benjamin Ducke
wrote:<br>
>>>> Hi Manuel,<br>
>>>><br>
>>>> GRASS does not support multi-band
rasters, so you'll have<br>
>>>> to import each band as a separate
raster map.<br>
>>>><br>
>>>> r.in.gdal has the "band=" option to
specify a band number<br>
>>>> to import.<br>
>>>><br>
>>>> Best,<br>
>>>><br>
>>>> Ben<br>
>>>><br>
>>>> On 12/02/14 17:05, manuel.martin wrote:<br>
>>>>> Hi all,<br>
>>>>><br>
>>>>> I tried to import an ArcGIS binary
raster (corine land cover for the<br>
>>>>> French territory) with three fields
on each pixels (VALUE, COUNT and<br>
>>>>> CODE_06) using the *r.in.gdal*
command. The import works just fine,<br>
>>>>> except that in the resulting
raster, in GRASS, I only get one field,<br>
>>>>> which seems to be the VALUE field
(and not the CODE_06 field, which<br>
>>>>> I am<br>
>>>>> interested in, and which is a
categorical field, although coded with<br>
>>>>> integers).<br>
>>>>><br>
>>>>> Is there a way to produce a
resulting raster with all the fields of<br>
>>>>> the<br>
>>>>> initial ArcGIS layer, or
alternatively to choose one unique field?<br>
>>>>> Also,<br>
>>>>> is there a limitation on
categorical fields. For instance, what if<br>
>>>>> instead of integer corine land
cover codes I have literal labels, i.e.<br>
>>>>> levels of my categorical field
coded with strings?<br>
>>>>><br>
>>>>> Cheers, Manuel<br>
>>>>><br>
>>>>> --<br>
>>>>><br>
>>>>> ----------------0----0------<br>
>>>>> INRA - InfoSol<br>
>>>>> Centre de recherche d'Orléans<br>
>>>>> 2163 Avenue de la Pomme de Pin<br>
>>>>> CS 40001 ARDON<br>
>>>>> 45075 ORLEANS Cedex 2<br>
>>>>> tel : (33) (0)2 38 41 48 21<br>
>>>>> fax : (33) (0)2 38 41 78 69<br>
>>>>> <a moz-do-not-send="true"
href="http://www.gissol.fr" target="_blank">http://www.gissol.fr</a><br>
>>>>> ----0----0------------------<br>
>>>>><br>
>>>>><br>
>>>>><br>
>>>>>
_______________________________________________<br>
>>>>> grass-user mailing list<br>
>>>>> <a moz-do-not-send="true"
href="mailto:grass-user@lists.osgeo.org">grass-user@lists.osgeo.org</a><br>
>>>>> <a moz-do-not-send="true"
href="http://lists.osgeo.org/mailman/listinfo/grass-user"
target="_blank">http://lists.osgeo.org/mailman/listinfo/grass-user</a><br>
>>>>><br>
>>>><br>
>>><br>
>><br>
>><br>
><br>
><br>
<br>
<br>
<br>
--<br>
</div>
</div>
<div class="im HOEnZb">Dr. Benjamin Ducke, M.A.<br>
{*} Geospatial Consultant<br>
{*} GIS Developer<br>
<br>
<a moz-do-not-send="true"
href="mailto:benducke@fastmail.fm">benducke@fastmail.fm</a><br>
</div>
<div class="HOEnZb">
<div class="h5">_______________________________________________<br>
grass-user mailing list<br>
<a moz-do-not-send="true"
href="mailto:grass-user@lists.osgeo.org">grass-user@lists.osgeo.org</a><br>
<a moz-do-not-send="true"
href="http://lists.osgeo.org/mailman/listinfo/grass-user"
target="_blank">http://lists.osgeo.org/mailman/listinfo/grass-user</a><br>
</div>
</div>
</blockquote>
</div>
<br>
<br clear="all">
<div><br>
</div>
-- <br>
<div dir="ltr"><br>
Nuno César de Sá<br>
+351 91 961 90 37<br>
<br>
</div>
</div>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">_______________________________________________
grass-user mailing list
<a class="moz-txt-link-abbreviated" href="mailto:grass-user@lists.osgeo.org">grass-user@lists.osgeo.org</a>
<a class="moz-txt-link-freetext" href="http://lists.osgeo.org/mailman/listinfo/grass-user">http://lists.osgeo.org/mailman/listinfo/grass-user</a></pre>
</blockquote>
<br>
<br>
<pre class="moz-signature" cols="72">--
----------------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
<a class="moz-txt-link-freetext" href="http://www.gissol.fr">http://www.gissol.fr</a>
----0----0------------------
</pre>
</body>
</html>