[GRASS-user] problem with export of raster data
FAROUX STEPHANIE
stephanie.faroux at meteo.fr
Tue Feb 24 03:25:37 EST 2009
Markus Neteler wrote:
> On Mon, Feb 23, 2009 at 12:15 PM, FAROUX STEPHANIE
> <stephanie.faroux at meteo.fr> wrote:
>
>> Hello
>> I try to export a raster integer map whose values range from -9999 to
>> 5880712. How can i specify that i want integer 4 bytes and not integer 2
>> bytes (it makes integer 2 bytes)??
>>
>
> If you export with r.out.gdal you can choose among
>
> type File type
> options: Byte,Int16,UInt16,Int32,UInt32,Float32,Float64,CInt16,
> CInt32,CFloat32,CFloat64
>
> This is the range which GRASS support for export to GDAL
> supported formats (of course it depends if the format is compatible
> with the selected type, see GDAL manual pages for details).
>
> Markus
>
>
Yes i saw it.
However i wonder what is the difference between Uint32, Int32, CInt32? I
suppose: unsigned integer 32 bits for the first, but the others?
Then, i want binary files, what should i choose among the proposed formats?
I tried with no format and with GTiff format. For example when i do:
"r.out.gdal input=world_fa2 format=GTiff2 type=Int32 output=world_fa_gdal"
or "r.out.gdal input=world_fa2 format=GTiff2 type=UInt32
output=world_fa_gdal" or "r.out.gdal input=world_fa2 format=GTiff2
type=CInt32 output=world_fa_gdal"
it doesn't work and i get:
*** buffer overflow detected ***: g.parser terminated
======= Backtrace: =========
/lib64/libc.so.6(__fortify_fail+0x37)[0x2b42e8de0157]
/lib64/libc.so.6[0x2b42e8dde7e0]
/lib64/libc.so.6[0x2b42e8ddddb9]
/lib64/libc.so.6(_IO_default_xsputn+0x8e)[0x2b42e8d65b5e]
/lib64/libc.so.6(_IO_vfprintf+0x1633)[0x2b42e8d3b9b3]
/lib64/libc.so.6(__vsprintf_chk+0x9d)[0x2b42e8ddde5d]
/lib64/libc.so.6(__sprintf_chk+0x80)[0x2b42e8dddda0]
g.parser(main+0x2b9)[0x4012b9]
/lib64/libc.so.6(__libc_start_main+0xf4)[0x2b42e8d16074]
g.parser[0x400ea9]
======= Memory map: ========
00400000-00402000 r-xp 00000000 08:01 199895
/usr/lib64/grass62/bin/g.parser
00602000-00603000 rw-p 00002000 08:01 199895
/usr/lib64/grass62/bin/g.parser
00603000-00624000 rw-p 00603000 00:00 0
[heap]
2b42e81bc000-2b42e81d6000 r-xp 00000000 08:01 65538
/lib64/ld-2.7.so
2b42e81d6000-2b42e81d8000 rw-p 2b42e81d6000 00:00 0
2b42e83d5000-2b42e83d6000 r--p 00019000 08:01 65538
/lib64/ld-2.7.so
2b42e83d6000-2b42e83d7000 rw-p 0001a000 08:01 65538
/lib64/ld-2.7.so
2b42e83d7000-2b42e8427000 r-xp 00000000 08:01 222338
/usr/lib64/grass62/lib/libgrass_gis.6.2.3.so
2b42e8427000-2b42e8626000 ---p 00050000 08:01 222338
/usr/lib64/grass62/lib/libgrass_gis.6.2.3.so
2b42e8626000-2b42e8629000 rw-p 0004f000 08:01 222338
/usr/lib64/grass62/lib/libgrass_gis.6.2.3.so
2b42e8629000-2b42e8641000 rw-p 2b42e8629000 00:00 0
2b42e8641000-2b42e8648000 r-xp 00000000 08:01 222312
/usr/lib64/grass62/lib/libgrass_datetime.6.2.3.so
2b42e8648000-2b42e8848000 ---p 00007000 08:01 222312
/usr/lib64/grass62/lib/libgrass_datetime.6.2.3.so
2b42e8848000-2b42e8849000 rw-p 00007000 08:01 222312
/usr/lib64/grass62/lib/libgrass_datetime.6.2.3.so
2b42e8862000-2b42e8876000 r-xp 00000000 08:01 65654
/lib64/libz.so.1.2.3
2b42e8876000-2b42e8a75000 ---p 00014000 08:01 65654
/lib64/libz.so.1.2.3
2b42e8a75000-2b42e8a76000 rw-p 00013000 08:01 65654
/lib64/libz.so.1.2.3
2b42e8a76000-2b42e8a77000 rw-p 2b42e8a76000 00:00 0
2b42e8a77000-2b42e8af6000 r-xp 00000000 08:01 65553
/lib64/libm-2.7.so
2b42e8af6000-2b42e8cf6000 ---p 0007f000 08:01 65553
/lib64/libm-2.7.so
2b42e8cf6000-2b42e8cf7000 r--p 0007f000 08:01 65553
/lib64/libm-2.7.so
2b42e8cf7000-2b42e8cf8000 rw-p 00080000 08:01 65553
/lib64/libm-2.7.so
2b42e8cf8000-2b42e8e43000 r-xp 00000000 08:01 65545
/lib64/libc-2.7.so
2b42e8e43000-2b42e9042000 ---p 0014b000 08:01 65545
/lib64/libc-2.7.so
2b42e9042000-2b42e9046000 r--p 0014a000 08:01 65545
/lib64/libc-2.7.so
2b42e9046000-2b42e9047000 rw-p 0014e000 08:01 65545
/lib64/libc-2.7.so
2b42e9047000-2b42e904e000 rw-p 2b42e9047000 00:00 0
2b42e904e000-2b42e908d000 r--p 00000000 08:01 565776
/usr/share/locale/UTF-8/LC_CTYPE
2b42e908d000-2b42e9094000 r--s 00000000 08:01 500251
/usr/lib64/gconv/gconv-modules.cache
2b42e9094000-2b42e9095000 r--p 00000000 08:01 565931
/usr/share/locale/fr_FR.UTF-8/LC_MESSAGES/SYS_LC_MESSAGES
2b42e9095000-2b42e90f5000 r--p 00000000 08:01 222408
/usr/lib64/grass62/locale/fr/LC_MESSAGES/grassmods.mo
2b42e90f5000-2b42e90f6000 r-xp 00000000 08:01 500166
/usr/lib64/gconv/ISO8859-1.so
2b42e90f6000-2b42e92f6000 ---p 00001000 08:01 500166
/usr/lib64/gconv/ISO8859-1.so
2b42e92f6000-2b42e92f7000 r--p 00001000 08:01 500166
/usr/lib64/gconv/ISO8859-1.so
2b42e92f7000-2b42e92f8000 rw-p 00002000 08:01 500166
/usr/lib64/gconv/ISO8859-1.so
2b42e92f8000-2b42e9305000 r-xp 00000000 08:01 65589
/lib64/libgcc_s-4.2.3.so.1
2b42e9305000-2b42e9504000 ---p 0000d000 08:01 65589
/lib64/libgcc_s-4.2.3.so.1
2b42e9504000-2b42e9505000 rw-p 0000c000 08:01 65589
/lib64/libgcc_s-4.2.3.so.1
7fffc28d7000-7fffc28ed000 rw-p 7ffffffe9000 00:00 0
[stack]
7fffc29fd000-7fffc29ff000 r-xp 7fffc29fd000 00:00 0
[vdso]
ffffffffff600000-ffffffffff601000 r-xp 00000000 00:00 0
[vsyscall]
So for the moment what i did is transforming my integer into real and
exporting it as binary. Thus i get a float binary file but with the
correct values....
More information about the grass-user
mailing list