[GRASSLIST:6057] Re: i.pca calls r.in.gdaln ??

Glynn Clements glynn.clements at virgin.net
Tue Apr 15 15:37:58 EDT 2003


John Chesnut wrote:

> System: 	Mac OSX 10.2.4
> Grass Version:	 OpenOSX binary 5.0  with OpenOSX update 0.1
> Problem:
> When I attempt to use i.pca under either  xterm or the tcltk 
> interface Grass parses the function as
> r.in.gdal, and exits with an error.
> 
> for example the function call:
> 
> i.pca -help
> 
> 
> Yields the following text which clearly refers to r.in.gdal::
> <<snip>>
> Description:
>   Import GDAL supported raster file into a binary raster map layer.
> 
> Usage:
>   i.pca [-oe] input=name [band=value] output=name [target=name]
>     [title="phrase"] [location=name]
> 
> Flags:
>    -o   Override projection (use locations projection)
>     <<snip>>
> 
> Is this a compile problem with the OpenOSX binary, or local to my 
> install, or is a universal bug ?

This suggests that the links in the bin directory (e.g. 
/usr/local/grass5/bin) are pointing at a binary which is effectively
r.in.gdal.

All of the "files" in the bin directory (except for r.agnps50.run,
tcltkgrass and nviz) should be hard links to $GISBASE/etc/front.end:

	$ ls -i /usr/local/grass5/bin
	8224858 bmif_to_cell
	8224858 d.3d
	8224858 d.area
	8224858 d.ask
	8224858 d.barscale
	8224858 d.colorlist
	8224858 d.colormode
	...
	$ ls -i /usr/local/grass5/etc/front.end
	8224858 /usr/local/grass5/etc/front.end

The front.end program invokes the appropriate program from either
etc/bin/cmd or etc/bin/inter, depending upon whether any command-line
arguments were used and whether a separate interactive version exists.

The most likely cause for this situation is that something attempted
to replace bin/r.in.gdal (rather than etc/bin/cmd/r.in.gdal) with an
r.in.gdal binary, and did so by overwriting the existing front.end
program, so front.end is now effectively r.in.gdal.

The easiest way to test this theory is to start GRASS then try to run
etc/front.end directly, e.g.

	GRASS:~ > /usr/local/grass5/etc/front.end help

Normally, you should get an error message:

	ERROR: program 'front.end' cannot be executed because: Neither a command
	       line (cmd) or interactive (inter) version was found

If you get the r.in.gdal help message instead, then my theory is
correct. In which case, try re-installing from the CD. If that doesn't
work, there's something wrong with the CD.

-- 
Glynn Clements <glynn.clements at virgin.net>




More information about the grass-user mailing list