[GRASS-dev] [GRASS GIS] #1041: winGRASS Tcl/Tk: Cannot save image files (PNG/JPG/BMP/etc)

#1041: winGRASS Tcl/Tk: Cannot save image files (PNG/JPG/BMP/etc)
----------------------+-----------------------------------------------------
Reporter: ege | Owner: grass-dev@lists.osgeo.org
     Type: defect | Status: new
Priority: normal | Milestone: 6.4.0
Component: Tcl | Version: svn-releasebranch64
Keywords: wingrass | Platform: MSWindows XP
      Cpu: x86-32 |
----------------------+-----------------------------------------------------
When trying to save a PNG (or JPG, BMP, ...) from Map Display, a box
appears saying:

"Could not create PNG: couldn't execute "gdal_translate": no such file or
directory

GRASS was installed using OSGeo4W installer. Tcl/Tk GUI is used. When
using wxPython GUI, it works without problems.

--
Ticket URL: <http://trac.osgeo.org/grass/ticket/1041&gt;
GRASS GIS <http://grass.osgeo.org>

#1041: winGRASS Tcl/Tk: Cannot save image files (PNG/JPG/BMP/etc)
---------------------------+------------------------------------------------
  Reporter: ege | Owner: grass-dev@lists.osgeo.org
      Type: defect | Status: new
  Priority: normal | Milestone: 6.4.0
Component: Tcl | Version: svn-releasebranch64
Resolution: | Keywords: wingrass
  Platform: MSWindows XP | Cpu: x86-32
---------------------------+------------------------------------------------
Comment (by hamish):

make sure that the enormously useful gdal tools are installed. look for a
package in the osgeo4w installer called "gdal-bin" or similar.

.ppm output should work without additional help.

Hamish

--
Ticket URL: <https://trac.osgeo.org/grass/ticket/1041#comment:1&gt;
GRASS GIS <http://grass.osgeo.org>

#1041: winGRASS Tcl/Tk: Cannot save image files (PNG/JPG/BMP/etc)
---------------------------+------------------------------------------------
  Reporter: ege | Owner: grass-dev@lists.osgeo.org
      Type: defect | Status: new
  Priority: normal | Milestone: 6.4.0
Component: Tcl | Version: svn-releasebranch64
Resolution: | Keywords: wingrass
  Platform: MSWindows XP | Cpu: x86-32
---------------------------+------------------------------------------------
Comment (by ege):

The enormously useful gdal tools are there. As is the specific executable
GRASS complains about: C:\OSGeo4W\apps\gdal-16\bin\gdal_translate.exe

Sorry, I forgot to specify that I was giving a two-days training on GRASS.
Thus I and the students ran all sorts of commands, but the image export
didn't work on all PCs in the classroom (different PCs, all WinXP, same
OSGeo4W installer).

--
Ticket URL: <https://trac.osgeo.org/grass/ticket/1041#comment:2&gt;
GRASS GIS <http://grass.osgeo.org>

#1041: winGRASS Tcl/Tk: Cannot save image files (PNG/JPG/BMP/etc)
---------------------------+------------------------------------------------
  Reporter: ege | Owner: grass-dev@lists.osgeo.org
      Type: defect | Status: new
  Priority: normal | Milestone: 6.4.0
Component: Tcl | Version: svn-releasebranch64
Resolution: | Keywords: wingrass
  Platform: MSWindows XP | Cpu: x86-32
---------------------------+------------------------------------------------
Comment (by hamish):

are the gdal programs in the %PATH%, available from a dos box?

It is probably worth mentioning that we are all(?) testing with the
standalone installer, not the osgeo4w one. The text on the download page
saying that the osgeo4w one is better for use in bulk computer lab
installs is perhaps a bit misleading and should possibly be removed. I
don't know enough about it to make that call with enough certainty to
commit that change myself. And of course if you are using lots of other
OSGeo software, using the osgeo4w installer does make a lot of sense.

regards,
Hamish

--
Ticket URL: <https://trac.osgeo.org/grass/ticket/1041#comment:3&gt;
GRASS GIS <http://grass.osgeo.org>

#1041: winGRASS Tcl/Tk: Cannot save image files (PNG/JPG/BMP/etc)
---------------------------+------------------------------------------------
  Reporter: ege | Owner: grass-dev@lists.osgeo.org
      Type: defect | Status: new
  Priority: normal | Milestone: 6.4.0
Component: Tcl | Version: svn-releasebranch64
Resolution: | Keywords: wingrass
  Platform: MSWindows XP | Cpu: x86-32
---------------------------+------------------------------------------------
Comment (by ege):

Replying to [comment:3 hamish]:
> are the gdal programs in the %PATH%, available from a dos box?
>
> if you are using lots of other OSGeo software, using the osgeo4w
installer does make a lot of sense.

The path to gdal's "bin" folder was not in the %PATH%. After adding it,
the image file save works also from Tcl/Tk. So it's an OSGeo4W-related
issue, I assume.

Actually, we were focusing on GRASS for that training, but you know, when
you start by introducing the concept of open source and OSGeo software in
general, it's nice to show students (who never approached FOSS4G before)
that there is a convenient way for installing everything easily. Maybe
next time we will use the stand-alone installer for GRASS-focused
trainings.

Regards,
Eugenio

--
Ticket URL: <https://trac.osgeo.org/grass/ticket/1041#comment:4&gt;
GRASS GIS <http://grass.osgeo.org>

#1041: winGRASS Tcl/Tk: Cannot save image files (PNG/JPG/BMP/etc)
---------------------------+------------------------------------------------
  Reporter: ege | Owner: grass-dev@lists.osgeo.org
      Type: defect | Status: closed
  Priority: normal | Milestone: 6.4.0
Component: Tcl | Version: svn-releasebranch64
Resolution: wontfix | Keywords: wingrass
  Platform: MSWindows XP | Cpu: x86-32
---------------------------+------------------------------------------------
Changes (by hamish):

  * status: new => closed
  * resolution: => wontfix

Comment:

Replying to [comment:4 ege]:
> The path to gdal's "bin" folder was not in the %PATH%. After
> adding it, the image file save works also from Tcl/Tk. So it's
> an OSGeo4W-related issue, I assume.

Yes.

> Actually, we were focusing on GRASS for that training, but you
> know, when you start by introducing the concept of open source
> and OSGeo software in general, it's nice to show students (who
> never approached FOSS4G before) that there is a convenient way
> for installing everything easily.

it is true that Open Source is best thought of as an ecosystem rather than
a series of independent islands. Having the full range of gdal command
line tools, to part command line part GUI like GRASS, to full GUI like
QGIS lets you use the best tool for the job each time wrt each's strength.
Having said that the stand-alone WinGRASS installer is a lot less more
familiar/easier for new users (me too).

> Maybe next time we will use the stand-alone installer for GRASS-focused
> trainings.

shrug, when ready grab the latest version of each, try both yourself, see
which one is the better fit for you. A goal is to have both working
properly. :slight_smile:

There is not much we can do about the PATH issue from here, so opened as
OSGeo4W bug:
   https://trac.osgeo.org/osgeo/ticket/562
and closing this ticket. sorry there isn't a "cantfix" option for closing
the bug; "wontfix" isn't exactly true but is the closest available.

Hamish

--
Ticket URL: <https://trac.osgeo.org/grass/ticket/1041#comment:5&gt;
GRASS GIS <http://grass.osgeo.org>

#1041: winGRASS Tcl/Tk: Cannot save image files (PNG/JPG/BMP/etc)
---------------------------+------------------------------------------------
  Reporter: ege | Owner: grass-dev@lists.osgeo.org
      Type: defect | Status: closed
  Priority: normal | Milestone: 6.4.0
Component: Tcl | Version: svn-releasebranch64
Resolution: wontfix | Keywords: wingrass
  Platform: MSWindows XP | Cpu: x86-32
---------------------------+------------------------------------------------
Comment (by hellik):

Replying to [comment:5 hamish]:
>
> There is not much we can do about the PATH issue from here, so opened as
OSGeo4W bug:
> https://trac.osgeo.org/osgeo/ticket/562
> and closing this ticket. sorry there isn't a "cantfix" option for
closing the bug; "wontfix" isn't exactly true but is the closest
available.
>
>
> Hamish

just have a look at the osgeo4w-wiki:

http://trac.osgeo.org/osgeo4w/wiki/PackageListing#a1.5.xstable

there is gdal1.5 (stable), gdal1.6.x and development trunk.

for gdal 1.6 (see http://trac.osgeo.org/osgeo4w/wiki/pkg-gdal16):

{{{
The gdal-16 package unpacks in osgeo4w\apps\gdal-16 and does not disturb
the normal gdal package. To actually use the gdal-16 package, run the
"gdal16.bat" script in the OSGeo4W console window.
}}}

best regards
Helmut

--
Ticket URL: <https://trac.osgeo.org/grass/ticket/1041#comment:6&gt;
GRASS GIS <http://grass.osgeo.org>