[GRASS-dev] Re: [GRASS GIS] #820: r.in.wms doesn't work in WinGRASS installer distribution

GRASS GIS trac at osgeo.org
Sun Sep 19 16:34:43 EDT 2010


#820: r.in.wms doesn't work in WinGRASS installer distribution
---------------------------------------+------------------------------------
 Reporter:  ddalimonte                 |       Owner:  grass-dev@…              
     Type:  defect                     |      Status:  new                      
 Priority:  major                      |   Milestone:  6.4.0                    
Component:  Projections/Datums         |     Version:  svn-releasebranch64      
 Keywords:  r.in.wms, wingrass, cs2cs  |    Platform:  MSWindows XP             
      Cpu:  Unspecified                |  
---------------------------------------+------------------------------------

Comment(by hellik):

 Replying to [comment:30 glynn]:
 > Replying to [comment:29 hamish]:
 > > Replying to [comment:26 hamish]:
 > > > > for the trac record, the shell scripts needed the programs called
 > > > > with their full path in the command line,
 > >
 > > Replying to [comment:27 mmetz]:
 > > > Not in my self-compiled 6.4 version, no changes to the local copy.
 My
 > > > point was that calling the programs in question with their full path
 > > > might be fighting symptoms and not the cause.
 > >
 > > I think it happens on the second pass, when g.parser relaunches $0.
 (??)
 > >
 > > perhaps it works or doesn't work because Windows includes pwd in the
 path while UNIX does not? So if you happen to be in the same dir as the
 addon script on Windows it will magically work, while on UNIX (or if you
 cd..), it would not?
 >
 > On Unix, g.parser re-invokes the script using execl(), which doesn't use
 the path. There isn't any point in using the path; g.parser must be able
 to open the script to read the option specifications, so it must have
 either the full path to the script or a path relative to the current
 directory.
 >
 > When the shell executes a script via the path, the program specified in
 the #! line (e.g. bash) will receive the script's full path in argv![1].
 In the case of bash, this path is available via $0.
 >
 > On Windows, g.parser re-invokes a script by executing $GRASS_SH with the
 path to the script as the first argument. Again, this requires either a
 full path or a path relative to the current directory; %PATH% has no
 effect.

 related to this topic there was also a thread under #1163, but switching
 now to this ticket.

 after some testing there seems to be a missing GDAL_DATA variable in the
 WinGrass-installer, which is needed that for example gdalwarp is able to
 work properly.

 I've added a fix for this in r43520 for WinGrass65. in a self built
 WinGrass65-installer with this fix, r.in.wms is working with all the
 examples in the man-pages.

 this fix can also be applied to Grass64. the only issue in WinGrass64 is,
 that the helper scripts in C:\Program Files\GRASS-64\etc\r.in.wms
 (r.in.gdalwarp, wms.download, wms.request) aren't found by r.in.wms. if I
 copy these files in C:\Program Files\GRASS-64\scripts, then also r.in.wms
 is working with all the examples in the man-pages in WinGrass64.

 maybe any idea/hint for the issue that the helper scripts aren't
 recognized?

 best regards
 Helmut

 best regards

-- 
Ticket URL: <http://trac.osgeo.org/grass/ticket/820#comment:31>
GRASS GIS <http://grass.osgeo.org>



More information about the grass-dev mailing list