[GRASS-user] editing rasters

Juan Manuel Barreneche jumanbar at gmail.com
Tue Aug 5 11:58:23 EDT 2008


Well, the problem was "solved" with r.null, apparently (i used the -r flag
for removing the NULL value bitmap). The resultant file is a georreferenced
tif and i succesfully edited it in gimp and re-imported it to grass

Even so, the error i mentioned in my previous message persists...

thank you again for this great help,

JM



On Tue, Aug 5, 2008 at 12:10 PM, Juan Manuel Barreneche
<jumanbar at gmail.com>wrote:

> sorry, i should have wrote "r.out.gdal"
>
> JM
>
>
> On Tue, Aug 5, 2008 at 12:02 PM, Juan Manuel Barreneche <
> jumanbar at gmail.com> wrote:
>
>> Thank you a lot for your help, I think i'll try Nikos choice, because i'm
>> not sure of how to use gdal_translate (i'm still a beginer with GRASS and
>> with linux in general)
>>
>> anyway, the r.in.gdal is not working for some reason, so i'm copying the
>> (last part of the) output here:
>>
>> b7301000-b741c000 r-xp 00000000 08:07 1954410
>> /usr/lib/lib/usr/grass-6.2.2/scripts/r.out.gdal: line 136:  5487
>> Aborted                 gdal_translate -of $FORMAT -ot $TYPE $CREATEKEY
>> $METAKEY $CELLHD $OUTPUT
>>
>> does anyone know what this means? The complete ouptut is here:
>>
>> GRASS 6.2.2 (yacare1):~ > r.out.gdal input=pondas format=GTiff type=Byte
>> output=pondas.tif
>> Writing format: GTiff
>> Writing type:   Byte
>> Input file size is 2113, 1768
>> 0...10...20...30...40...50...60...70...80...90...100 - done.
>> *** glibc detected *** gdal_translate: double free or corruption (!prev):
>> 0x080756b0 ***
>> ======= Backtrace: =========
>> /lib/libc.so.6[0xb77486e1]
>> /lib/libc.so.6(cfree+0x89)[0xb7749d79]
>> /usr/lib/libstdc++.so.6(_ZdlPv+0x21)[0xb78f3f81]
>> /usr/lib/libgdal.so.1(_ZN10VRTDatasetD0Ev+0x91)[0xb7cd75b1]
>> /usr/lib/libgdal.so.1(GDALClose+0xa0)[0xb7cf0000]
>> gdal_translate[0x804acae]
>> /lib/libc.so.6(__libc_start_main+0xdc)[0xb76f9f9c]
>> gdal_translate(GDALTermProgress+0x59)[0x8049721]
>> ======= Memory map: ========
>> 08048000-0804c000 r-xp 00000000 08:07 1824173    /usr/bin/gdal_translate
>> 0804c000-0804d000 rw-p 00004000 08:07 1824173    /usr/bin/gdal_translate
>> 0804d000-0812b000 rw-p 0804d000 00:00 0          [heap]
>> b6d00000-b6d21000 rw-p b6d00000 00:00 0
>> b6d21000-b6e00000 ---p b6d21000 00:00 0
>> b6edd000-b6f0e000 r-xp 00000000 08:07 1987363    /usr/lib/libproj.so.0.5.2
>> b6f0e000-b6f0f000 r--p 00030000 08:07 1987363    /usr/lib/libproj.so.0.5.2
>> b6f0f000-b6f11000 rw-p 00031000 08:07 1987363    /usr/lib/libproj.so.0.5.2
>> b6f11000-b6f95000 r-xp 00000000 08:07 317266
>> /usr/lib/libfftw3.so.3.1.2
>> b6f95000-b6f98000 r--p 00083000 08:07 317266
>> /usr/lib/libfftw3.so.3.1.2
>> b6f98000-b6f9a000 rw-p 00086000 08:07 317266
>> /usr/lib/libfftw3.so.3.1.2
>> b6f9a000-b6fd5000 r-xp 00000000 08:07 1362599    /lib/libncurses.so.5.5
>> b6fd5000-b6fdc000 r--p 0003a000 08:07 1362599    /lib/libncurses.so.5.5
>> b6fdc000-b6fe1000 rw-p 00041000 08:07 1362599    /lib/libncurses.so.5.5
>> b7008000-b7009000 rw-p b7008000 00:00 0
>> b7009000-b700a000 r-xp 00000000 08:07 759770     /usr/grass-6.2.2/lib/
>> libgrass_linkm.6.2.2.so
>> b700a000-b700b000 r--p 00000000 08:07 759770     /usr/grass-6.2.2/lib/
>> libgrass_linkm.6.2.2.so
>> b700b000-b700c000 rw-p 00001000 08:07 759770     /usr/grass-6.2.2/lib/
>> libgrass_linkm.6.2.2.so
>> b700c000-b7011000 r-xp 00000000 08:07 759784     /usr/grass-6.2.2/lib/
>> libgrass_rtree.6.2.2.so
>> b7011000-b7012000 r--p 00004000 08:07 759784     /usr/grass-6.2.2/lib/
>> libgrass_rtree.6.2.2.so
>> b7012000-b7013000 rw-p 00005000 08:07 759784     /usr/grass-6.2.2/lib/
>> libgrass_rtree.6.2.2.so
>> b7013000-b7023000 r-xp 00000000 08:07 759744     /usr/grass-6.2.2/lib/
>> libgrass_dig2.6.2.2.so
>> b7023000-b7024000 r--p 0000f000 08:07 759744     /usr/grass-6.2.2/lib/
>> libgrass_dig2.6.2.2.so
>> b7024000-b7025000 rw-p 00010000 08:07 759744     /usr/grass-6.2.2/lib/
>> libgrass_dig2.6.2.2.so
>> b7025000-b703a000 r-xp 00000000 08:07 759742     /usr/grass-6.2.2/lib/
>> libgrass_dgl.6.2.2.so
>> b703a000-b703b000 r--p 00014000 08:07 759742     /usr/grass-6.2.2/lib/
>> libgrass_dgl.6.2.2.so
>> b703b000-b703c000 rw-p 00015000 08:07 759742     /usr/grass-6.2.2/lib/
>> libgrass_dgl.6.2.2.so
>> b703c000-b7044000 r-xp 00000000 08:07 759736     /usr/grass-6.2.2/lib/
>> libgrass_dbmiclient.6.2.2.so
>> b7044000-b7045000 r--p 00007000 08:07 759736     /usr/grass-6.2.2/lib/
>> libgrass_dbmiclient.6.2.2.so
>> b7045000-b7046000 rw-p 00008000 08:07 759736     /usr/grass-6.2.2/lib/
>> libgrass_dbmiclient.6.2.2.so
>> b7046000-b7053000 r-xp 00000000 08:07 759734     /usr/grass-6.2.2/lib/
>> libgrass_dbmibase.6.2.2.so
>> b7053000-b7054000 r--p 0000c000 08:07 759734     /usr/grass-6.2.2/lib/
>> libgrass_dbmibase.6.2.2.so
>> b7054000-b7055000 rw-p 0000d000 08:07 759734     /usr/grass-6.2.2/lib/
>> libgrass_dbmibase.6.2.2.so
>> b7055000-b7084000 r-xp 00000000 08:07 759802     /usr/grass-6.2.2/lib/
>> libgrass_vect.6.2.2.so
>> b7084000-b7085000 r--p 0002e000 08:07 759802     /usr/grass-6.2.2/lib/
>> libgrass_vect.6.2.2.so
>> b7085000-b7086000 rw-p 0002f000 08:07 759802     /usr/grass-6.2.2/lib/
>> libgrass_vect.6.2.2.so
>> b7086000-b708d000 r-xp 00000000 08:07 759762     /usr/grass-6.2.2/lib/
>> libgrass_gproj.6.2.2.so
>> b708d000-b708e000 r--p 00006000 08:07 759762     /usr/grass-6.2.2/lib/
>> libgrass_gproj.6.2.2.so
>> b708e000-b708f000 rw-p 00007000 08:07 759762     /usr/grass-6.2.2/lib/
>> libgrass_gproj.6.2.2.so
>> b708f000-b7096000 r-xp 00000000 08:07 759732     /usr/grass-6.2.2/lib/
>> libgrass_datetime.6.2.2.so
>> b7096000-b7097000 r--p 00006000 08:07 759732     /usr/grass-6.2.2/lib/
>> libgrass_datetime.6.2.2.so
>> b7097000-b7098000 rw-p 00007000 08:07 759732     /usr/grass-6.2.2/lib/
>> libgrass_datetime.6.2.2.so
>> b7098000-b70e0000 r-xp 00000000 08:07 759758     /usr/grass-6.2.2/lib/
>> libgrass_gis.6.2.2.so
>> b70e0000-b70e1000 r--p 00048000 08:07 759758     /usr/grass-6.2.2/lib/
>> libgrass_gis.6.2.2.so
>> b70e1000-b70e2000 rw-p 00049000 08:07 759758     /usr/grass-6.2.2/lib/
>> libgrass_gis.6.2.2.so
>> b70e2000-b70fd000 rw-p b70e2000 00:00 0
>> b70fd000-b7104000 r-xp 00000000 08:07 1953955
>> /usr/lib/libkrb5support.so.0.1
>> b7104000-b7106000 rw-p 00006000 08:07 1953955
>> /usr/lib/libkrb5support.so.0.1
>> b7106000-b7107000 rw-p b7106000 00:00 0
>> b7107000-b7109000 r-xp 00000000 08:07 1362619    /lib/libcom_err.so.2.1
>> b7109000-b710b000 rw-p 00001000 08:07 1362619    /lib/libcom_err.so.2.1
>> b710b000-b712f000 r-xp 00000000 08:07 1953943
>> /usr/lib/libk5crypto.so.3.0
>> b712f000-b7131000 rw-p 00023000 08:07 1953943
>> /usr/lib/libk5crypto.so.3.0
>> b7131000-b726c000 r-xp 00000000 08:07 1956154    /usr/lib/
>> libgeos-3.0.0.so
>> b726c000-b726e000 r--p 0013a000 08:07 1956154    /usr/lib/
>> libgeos-3.0.0.so
>> b726e000-b7271000 rw-p 0013c000 08:07 1956154    /usr/lib/
>> libgeos-3.0.0.so
>> b7271000-b7280000 r-xp 00000000 08:07 1362575    /lib/libresolv-2.5.so
>> b7280000-b7282000 rw-p 0000e000 08:07 1362575    /lib/libresolv-2.5.so
>> b7282000-b7285000 rw-p b7282000 00:00 0
>> b7285000-b72fe000 r-xp 00000000 08:07 1953953    /usr/lib/libkrb5.so.3.2
>> b72fe000-b72ff000 r--p 00078000 08:07 1953953    /usr/lib/libkrb5.so.3.2
>> b72ff000-b7301000 rw-p 00079000 08:07 1953953    /usr/lib/libkrb5.so.3.2
>> b7301000-b741c000 r-xp 00000000 08:07 1954410
>> /usr/lib/lib/usr/grass-6.2.2/scripts/r.out.gdal: line 136:  5487
>> Aborted                 gdal_translate -of $FORMAT -ot $TYPE $CREATEKEY
>> $METAKEY $CELLHD $OUTPUT
>>
>> Thanks again,
>> Juan
>>
>>
>> On Mon, Aug 4, 2008 at 5:46 PM, Nikos Alexandris <
>> nikos.alexandris at felis.uni-freiburg.de> wrote:
>>
>>> On Mon, 2008-08-04 at 22:51 +0200, Moritz Lennert wrote:
>>> > On 04/08/08 22:19, Nikos Alexandris wrote:
>>> > > On Mon, 2008-08-04 at 16:57 -0300, Juan Manuel Barreneche wrote:
>>> > >> Hello users!
>>> > >>
>>> > >> Is there a easier way to edit rasters than d.rast.edit or r.digit?
>>> > >>
>>> > >> i'm thinking of tools like those you find in common image editing
>>> > >> programs like photoshop or gimp (brush, eraser, zoom in, zoom out,
>>> > >> etc...);  maybe even export a map and edit it with those programs?
>>> > >>
>>> > >> thank you very much,
>>> > >>
>>> > >> Juan
>>> > >
>>> > > 1. export your map with r.out.gdal as a geotiff. Be careful with what
>>> kind of data you have, how many categories (Byte, Int16, etc.)
>>> > >
>>> > > 2. Open with GIMP and edit BUT DO NOT resize the image, rotate, crop
>>> or
>>> > > similar.
>>> > >
>>> > > 3. Save as Tiff with other name than the original GeoTiff
>>> > >
>>> > > # For steps 4,5 look at [1]
>>> > > 4. Export with listgeo the geo-metadata from the original GeoTiff
>>> > >
>>> > > 5. Apply the geo-metadata to the Tiff file with geotifcp
>>> >
>>> > IIUC, you can also do this with gdal_translate (e.g. with the -mo flag,
>>> > and the projection setting options).
>>> >
>>> > Moritz
>>>
>>> Maybe this is even better. I suspect that some geo-tags are lost (?).
>>> Not sure but I've seen some time ago a few error messages while using
>>> listgeo/geotifcp. I will post back if I face a problem (again).
>>>
>>> Greetings, Nikos
>>>
>>>
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/grass-user/attachments/20080805/6b95fefe/attachment.html


More information about the grass-user mailing list