[GRASS-user] trouble with addons - was: dilation & erosion (mathematical morphology)

Paulo van Breugel p.vanbreugel at gmail.com
Thu Feb 5 08:19:11 PST 2015


I have svn revision r64291, and for me it works fine

On Thu, Feb 5, 2015 at 4:46 PM, Robert Nuske <rnuske at gwdg.de> wrote:

> hmm, that's what I hoped and what doesn't work
>
> Which leaves the question open whether it is me, the ubuntu package or the
> svn
> version (at or before changeset 64464) who causes the problem.
>
>
> thanks
>   robert
>
> Am Donnerstag, 5. Februar 2015, 16:15:02 schrieb Paulo van Breugel:
> > you should be able to install the addon from within GRASS using
> g.extension
> > or via the menu (settings - addon extensions). If you mean with 'standard
> > user' an user without administrative privileges, then yes, I think you
> > should be able to install the addons, they are normally installed in a
> > hidden folder (.grass7) in the home folder.
> >
> > On Thu, Feb 5, 2015 at 3:52 PM, Robert Nuske <rnuske at gwdg.de> wrote:
> > > Hi Paulo,
> > >
> > > thanks for the hint!
> > >
> > >
> > > Now I have some trouble to install the addon:
> > >
> > > As a standard user I am not allowed to create a directory under
> /usr/lib.
> > > A second try as root failed because HTML2MAN within "Grass.make" tries
> to
> > > call
> > > $(GISBASE)/tools/g.html2man.py. But the python script is called
> > > g.html2man.
> > > After linking g.html2man.py to g.html2man the built of the addon fails
> > > because
> > > of a missing python module (ImportError: No module named html).
> > >
> > >
> > > This was on ubuntu 14.04 with grass70 from the ppa:grass-devel.
> > > Version 7.0.0+1svn64464~ubuntu14.04.1 installed today.
> > >
> > >
> > >
> > > Are addons supposed to be installed by standard users?
> > >
> > >
> > > thanks
> > >
> > >   robert
> > >
> > > as standard user:
> > > -----------------------------------------------------------
> > > GRASS 7.0.0 (wgs84):~ > g.extension extension=r.grow.shrink
> > > svnurl=http://svn.osgeo.org/grass/grass-addons/grass7 --verbose
> > > Fetching <r.grow.shrink> from GRASS-Addons SVN repository (be
> patient)...
> > > A    r.grow.shrink/DEPRECATED
> > > A    r.grow.shrink/main.c
> > > A    r.grow.shrink/Makefile
> > > A    r.grow.shrink/r.grow.shrink.html
> > >
> > >  U   r.grow.shrink
> > >
> > > Checked out revision 64471.
> > > Compiling...
> > > mkdir -p /tmp/tmpGP17FI/r.grow.shrink/bin
> > > mkdir -p /tmp/tmpGP17FI/r.grow.shrink/etc
> > > mkdir -p /tmp/tmpGP17FI/r.grow.shrink/docs/html
> > > mkdir -p /usr/lib/grass70/docs/man
> > > mkdir: cannot create directory '/usr/lib/grass70/docs/man': Permission
> > > denied
> > > make: *** [/usr/lib/grass70/docs/man] Error 1
> > > ERROR: Compilation failed, sorry. Please check above error messages.
> > >
> > >
> > > as root (sudo -i):
> > > -----------------------------------------------------------
> > > GRASS 7.0.0 (wgs84):~ > g.extension extension=r.grow.shrink
> > > svnurl=http://svn.osgeo.org/grass/grass-addons/grass7 --verbose
> > > Fetching <r.grow.shrink> from GRASS-Addons SVN repository (be
> patient)...
> > > A    r.grow.shrink/DEPRECATED
> > > A    r.grow.shrink/main.c
> > > A    r.grow.shrink/Makefile
> > > A    r.grow.shrink/r.grow.shrink.html
> > >
> > >  U   r.grow.shrink
> > >
> > > Checked out revision 64471.
> > > Compiling...
> > > mkdir -p /tmp/tmpa27tYO/r.grow.shrink/bin
> > > mkdir -p /tmp/tmpa27tYO/r.grow.shrink/etc
> > > mkdir -p /tmp/tmpa27tYO/r.grow.shrink/docs/html
> > > mkdir -p /usr/lib/grass70/docs/man
> > > mkdir -p /tmp/tmpa27tYO/r.grow.shrink/docs/man/man1
> > > test -d OBJ.x86_64-pc-linux-gnu || mkdir -p OBJ.x86_64-pc-linux-gnu
> > > gcc  -Wall -g -O   -I/usr/lib/grass70/include
> -I/usr/lib/grass70/include
> > >
> > >   -
> > >
> > > DPACKAGE=\""grassmods"\"   -I/usr/lib/grass70/include -
> > > I/usr/lib/grass70/include -DRELDIR=\"/tmp/tmpa27tYO/r.grow.shrink\" -o
> > > OBJ.x86_64-pc-linux-gnu/main.o -c main.c
> > >
> > > : && gcc -L/usr/lib/grass70/lib -L/usr/lib/grass70/lib
> > >
> > > -Wl,--export-dynamic -
> > > Wl,-rpath-link,/usr/lib/grass70/lib  -o
> > > /tmp/tmpa27tYO/r.grow.shrink/bin/r.grow.shrink
> > > OBJ.x86_64-pc-linux-gnu/main.o
> > > -lgrass_gis.7.0.0svn -lgrass_raster.7.0.0svn  -lm
> > > if [ "/tmp/tmpa27tYO/r.grow.shrink/bin/r.grow.shrink" != "" ] ; then
> > > GISRC=/tmp/grass7-root-12200/gisrc GISBASE=/usr/lib/grass70
> > >
> PATH="/usr/lib/grass70/bin:/usr/lib/grass70/bin:/usr/lib/grass70/scripts:
> > > $PATH"
> > > PYTHONPATH="/usr/lib/grass70/etc/python:/usr/lib/grass70/gui/wxpython:
> > > $PYTHONPATH"
> > >
> > >
> LD_LIBRARY_PATH="/tmp/tmpa27tYO/r.grow.shrink/bin:/usr/lib/grass70/scripts
> > > :/usr/lib/grass70/lib:/usr/lib/grass70/lib:/usr/lib/grass70/lib"
> LC_ALL=C
> > > /tmp/tmpa27tYO/r.grow.shrink/bin/r.grow.shrink --html-description <
> > > /dev/null | grep -v '</body>\|</html>' > r.grow.shrink.tmp.html ; fi
> > > VERSION_NUMBER=7.0.0svn VERSION_DATE=2015 \
> > >
> > >         python /usr/lib/grass70/tools/mkhtml.py r.grow.shrink >
> > >
> > > /tmp/tmpa27tYO/r.grow.shrink/docs/html/r.grow.shrink.html
> > > VERSION_NUMBER=7.0.0svn /usr/lib/grass70/tools/g.html2man.py
> > > /tmp/tmpa27tYO/r.grow.shrink/docs/html/r.grow.shrink.html
> > > /tmp/tmpa27tYO/r.grow.shrink/docs/man/man1/r.grow.shrink.1
> > > /bin/sh: 1: /usr/lib/grass70/tools/g.html2man.py: not found
> > > make: *** [/tmp/tmpa27tYO/r.grow.shrink/docs/man/man1/r.grow.shrink.1]
> > > Error
> > > 127
> > > rm r.grow.shrink.tmp.html
> > > ERROR: Compilation failed, sorry. Please check above error messages.
> > >
> > > Am Donnerstag, 5. Februar 2015, 14:53:05 schrieb Paulo van Breugel:
> > > > Check out the r.growth.shrink addon.
> > > >
> > > > On Thu, Feb 5, 2015 at 1:59 PM, Robert Nuske <rnuske at gwdg.de> wrote:
> > > > > Hi there,
> > > > >
> > > > > looking at some noisy raster map, I would like to clean up the
> patches
> > > > > (map
> > > > > consists only of one class and NULL) using basic mathematical
> > >
> > > morphology
> > >
> > > > > (dilation & erosion) in GRASS 7.0.
> > > > >
> > > > >
> > > > > The dilation can easily be achieved with r.grow.
> > > > > But the erosion seems not to be as straight forward.
> > > > >
> > > > > Since the example about shrinking was removed from the help page of
> > >
> > > r.grow
> > >
> > > > > in
> > > > > GRASS 7.0 (http://grass.osgeo.org/grass70/manuals/r.grow.html), I
> > >
> > > hoped
> > >
> > > > > for an
> > > > > easier way to carry out the erosion. Looking in vain for a raster
> > >
> > > command
> > >
> > > > > named shrink or erode, I tried a negative distance in r.buffer (->
> > >
> > > error)
> > >
> > > > > and
> > > > > negative radius in r.grow (treated as absolute value).
> > > > >
> > > > > The following produce identical output with grown patches.
> > > > >
> > > > >   r.grow in=mod_10_33 out=mod_10_33_1 radius=1.1
> > > > >   r.grow in=mod_10_33 out=mod_10_33_2 radius=-1.1
> > > > >
> > > > > Any suggestions for a quick erosion?
> > > > >
> > > > >
> > > > > thanks
> > > > >
> > > > >   Robert
> > > > >
> > > > > _______________________________________________
> > > > > grass-user mailing list
> > > > > grass-user at lists.osgeo.org
> > > > > http://lists.osgeo.org/mailman/listinfo/grass-user
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/grass-user/attachments/20150205/fb1495ac/attachment-0001.html>


More information about the grass-user mailing list