[GRASS-dev] Makefile related problem? Re: [GRASS-user] Confused when using i.fusion.brovey

Nikos Alexandris nik at nikosalexandris.net
Mon Nov 10 11:30:43 PST 2014


Nikos:

..

>> > Thanks to "r.in.wms", fixed by using this line:
>> >
>> > +sys.path.insert(1, os.path.join(os.path.dirname(sys.path[0]), 
>> 'etc',
>> > 'r.in.wms'))
>>
>> This approach broke for my script i.fusion.hpf again. The 
>> sys.path[0] is
>> an empty string (now). I have
>> no idea why it did work before.

It works!  I forgot to push the last change s/r.in.wms/i.fusion.hpf/ 
:-!  Thanks to Yann for saving, again.


>> Is the approach in v.class.ml relevant/better/safer:
>> <
>> 
>> http://trac.osgeo.org/grass/browser/grass-addons/grass7/vector/v.class.ml/v.class.ml.py?order=date#L380
>> >?


Vaclav:

> This is used on more places. I suggest to go with that although I'm 
> afraid
> it is not perfect either.
>
> See other examples:
> 
> http://trac.osgeo.org/grass/browser/grass-addons/grass7/raster/r.modis/r.modis.import/r.modis.import.py#L95
> 
> http://trac.osgeo.org/grass/browser/grass-addons/grass7/imagery/i.segment.hierarchical/i.segment.hierarchical.py#L153
>
> See the implementation:
> 
> http://trac.osgeo.org/grass/browser/grass/trunk/lib/python/pygrass/utils.py#L264
>
> See related tickets:
> http://trac.osgeo.org/grass/ticket/2132
> https://trac.osgeo.org/grass/ticket/2097


More information about the grass-dev mailing list