[GRASS-dev] [GRASS GIS] #29: moving of vector object by mouse

#29: moving of vector object by mouse
-------------------------+--------------------------------------------------
Reporter: zanollim | Owner: grass-dev@lists.osgeo.org
     Type: enhancement | Status: new
Priority: major | Milestone: 6.4.0
Component: Python | Version: svn-trunk
Keywords: |
-------------------------+--------------------------------------------------
when moving a vector object by mouse, the object isn't exactly below the
pointer (especially moving points) and when I click on the new position,
the object isn't placed correctly.

--
Ticket URL: <http://trac.osgeo.org/grass/ticket/29&gt;
GRASS GIS <http://grass.osgeo.org>
GRASS Geographic Information System (GRASS GIS) - http://grass.osgeo.org/

#29: moving of vector object by mouse
--------------------------+-------------------------------------------------
  Reporter: zanollim | Owner: martinl
      Type: enhancement | Status: assigned
  Priority: major | Milestone: 6.4.0
Component: Python | Version: svn-trunk
Resolution: | Keywords: wxgui, digitization
--------------------------+-------------------------------------------------
Changes (by martinl):

* cc: grass-dev@lists.osgeo.org (added)

--
Ticket URL: <http://trac.osgeo.org/grass/ticket/29#comment:2&gt;
GRASS GIS <http://grass.osgeo.org>
GRASS Geographic Information System (GRASS GIS) - http://grass.osgeo.org/

#29: moving of vector object by mouse
--------------------------+-------------------------------------------------
  Reporter: zanollim | Owner: martinl
      Type: enhancement | Status: assigned
  Priority: major | Milestone: 6.4.0
Component: Python | Version: svn-trunk
Resolution: | Keywords: wxgui, digitization
--------------------------+-------------------------------------------------
Comment (by zanollim):

Now I click on the 'Move feature(s)' tool and[[BR]]
when I try to select a feature with the mouse,[[BR]]
I see this error and the feature isn't selected:

{{{
Traceback (most recent call last):
   File "/usr/src/grass_trunk/dist.i686-pc-linux-
gnu/etc/wx/gui_modules/mapdisp.py", line 818, in MouseActions
     self.OnLeftUp(event)
   File "/usr/src/grass_trunk/dist.i686-pc-linux-
gnu/etc/wx/gui_modules/mapdisp.py", line 1214, in OnLeftUp
     digitClass.GetSelectType())
   File "/usr/src/grass_trunk/dist.i686-pc-linux-
gnu/etc/wx/gui_modules/digit.py", line 1161, in SelectLinesByBox
     nselected = self.__display.SelectLinesByBox(x1, y1, -1.0 *
vdigit.PORT_DOUBLE_MAX,
AttributeError: 'module' object has no attribute 'PORT_DOUBLE_MAX'
}}}

--
Ticket URL: <http://trac.osgeo.org/grass/ticket/29#comment:3&gt;
GRASS GIS <http://grass.osgeo.org>
GRASS Geographic Information System (GRASS GIS) - http://grass.osgeo.org/

#29: moving of vector object by mouse
--------------------------+-------------------------------------------------
  Reporter: zanollim | Owner: martinl
      Type: enhancement | Status: assigned
  Priority: major | Milestone: 6.4.0
Component: Python | Version: svn-trunk
Resolution: | Keywords: wxgui, digitization
--------------------------+-------------------------------------------------
Comment (by martinl):

Replying to [comment:3 zanollim]:
> Now I click on the 'Move feature(s)' tool and[[BR]]
> when I try to select a feature with the mouse,[[BR]]
> I see this error and the feature isn't selected:

{{{
> Traceback (most recent call last):
> File "/usr/src/grass_trunk/dist.i686-pc-linux-
gnu/etc/wx/gui_modules/mapdisp.py", line 818, in MouseActions
> self.OnLeftUp(event)
> File "/usr/src/grass_trunk/dist.i686-pc-linux-
gnu/etc/wx/gui_modules/mapdisp.py", line 1214, in OnLeftUp
> digitClass.GetSelectType())
> File "/usr/src/grass_trunk/dist.i686-pc-linux-
gnu/etc/wx/gui_modules/digit.py", line 1161, in SelectLinesByBox
> nselected = self.__display.SelectLinesByBox(x1, y1, -1.0 *
vdigit.PORT_DOUBLE_MAX,
> AttributeError: 'module' object has no attribute 'PORT_DOUBLE_MAX'
}}}

You need to recompile vdigit interface since it has been changed (r29940).

{{{
cd gui/wxpython/vdigit
make
}}}

Restart GUI, then it should work.

Martin

--
Ticket URL: <http://trac.osgeo.org/grass/ticket/29#comment:4&gt;
GRASS GIS <http://grass.osgeo.org>
GRASS Geographic Information System (GRASS GIS) - http://grass.osgeo.org/

#29: moving of vector object by mouse
--------------------------+-------------------------------------------------
  Reporter: zanollim | Owner: martinl
      Type: enhancement | Status: assigned
  Priority: major | Milestone: 6.4.0
Component: Python | Version: svn-trunk
Resolution: | Keywords: wxgui, digitization
--------------------------+-------------------------------------------------
Comment (by martinl):

Replying to [comment:4 martinl]:

> You need to recompile vdigit interface since it has been changed
(r29940).

{{{
> cd gui/wxpython/vdigit
> make
}}}

sorry, it should be
{{{
cd gui/wxpython/vdigit
make clean
make
}}}

You need to recompile it from scratch since some fn prototypes has been
changed too.

Martin

--
Ticket URL: <http://trac.osgeo.org/grass/ticket/29#comment:5&gt;
GRASS GIS <http://grass.osgeo.org>
GRASS Geographic Information System (GRASS GIS) - http://grass.osgeo.org/

#29: moving of vector object by mouse
--------------------------+-------------------------------------------------
  Reporter: zanollim | Owner: martinl
      Type: enhancement | Status: assigned
  Priority: major | Milestone: 6.4.0
Component: Python | Version: svn-trunk
Resolution: | Keywords: wxgui, digitization
--------------------------+-------------------------------------------------
Comment (by zanollim):

Replying to [comment:5 martinl]:
> sorry, it should be
> {{{
> cd gui/wxpython/vdigit
> make clean
> make
> }}}
>
> You need to recompile it from scratch since some fn prototypes has been
changed too.
>
> Martin

OK, but now, when compiling vdigit, i see this error:
{{{
grass6_wxvdigit_wrap.cxx:1883: error: no type named \u2018category\u2019
in \u2018struct swig::traits<std::pair<int, std::vector<int,
std::allocator<int> > > >\u2019
make: *** [OBJ.i686-pc-linux-gnu/grass6_wxvdigit_wrap.o] Error 1
}}}

and the component isn't compiled.

--
Ticket URL: <http://trac.osgeo.org/grass/ticket/29#comment:6&gt;
GRASS GIS <http://grass.osgeo.org>
GRASS Geographic Information System (GRASS GIS) - http://grass.osgeo.org/

#29: moving of vector object by mouse
--------------------------+-------------------------------------------------
  Reporter: zanollim | Owner: martinl
      Type: enhancement | Status: assigned
  Priority: major | Milestone: 6.4.0
Component: Python | Version: svn-trunk
Resolution: | Keywords: wxgui, digitization
--------------------------+-------------------------------------------------
Comment (by martinl):

Replying to [comment:6 zanollim]:
> Replying to [comment:5 martinl]:
> > sorry, it should be
{{{
> > cd gui/wxpython/vdigit
> > make clean
> > make
}}}
> >
> > You need to recompile it from scratch since some fn prototypes has
been changed too.
> >
> > Martin
>
> OK, but now, when compiling vdigit, i see this error:
{{{
> grass6_wxvdigit_wrap.cxx:1883: error: no type named \u2018category\u2019
in \u2018struct swig::traits<std::pair<int, std::vector<int,
std::allocator<int> > > >\u2019
> make: *** [OBJ.i686-pc-linux-gnu/grass6_wxvdigit_wrap.o] Error 1
}}}
>
> and the component isn't compiled.

there are also changes in Makefile (still not stable, sorry). You need to
regenerate the Makefile.

{{{
cd gui/wxpython/vdigit
make clean
cd ../../..
./configure (or configure.sh if you have own script)
cd gui/wxpython/vdigit
make
}}}

Hope now it will work.

Martin

--
Ticket URL: <http://trac.osgeo.org/grass/ticket/29#comment:7&gt;
GRASS GIS <http://grass.osgeo.org>
GRASS Geographic Information System (GRASS GIS) - http://grass.osgeo.org/

#29: moving of vector object by mouse
--------------------------+-------------------------------------------------
  Reporter: zanollim | Owner: martinl
      Type: enhancement | Status: assigned
  Priority: major | Milestone: 6.4.0
Component: Python | Version: svn-trunk
Resolution: | Keywords: wxgui, digitization
--------------------------+-------------------------------------------------
Comment (by zanollim):

Replying to [comment:7 martinl]:
>
> there are also changes in Makefile (still not stable, sorry). You need
to regenerate the Makefile.
>
> {{{
> cd gui/wxpython/vdigit
> make clean
> cd ../../..
> ./configure (or configure.sh if you have own script)
> cd gui/wxpython/vdigit
> make
> }}}
>
> Hope now it will work.
>
> Martin

Sorry Martin,
after the ./configure (terminated with no errors)
when I run make the new error is:
{{{
make: shared: Command not found
make: [grass6_wxvdigit.so] Error 127 (ignored)
}}}

in the Makefile, inside the 'vdigit' folder, I read only this line with
the word 'shared':
{{{
[...]
LDFLAGS=-shared -fpic -L$(ARCH_LIBDIR) $(VECTLIB) $(GISLIB) $(GDALLIBS)
$(VEDITLIB) -lgdi $(WXLDFLAGS)
[...]
}}}

--
Ticket URL: <http://trac.osgeo.org/grass/ticket/29#comment:8&gt;
GRASS GIS <http://grass.osgeo.org>
GRASS Geographic Information System (GRASS GIS) - http://grass.osgeo.org/

#29: moving of vector object by mouse
--------------------------+-------------------------------------------------
  Reporter: zanollim | Owner: martinl
      Type: enhancement | Status: assigned
  Priority: major | Milestone: 6.4.0
Component: Python | Version: svn-trunk
Resolution: | Keywords: wxgui, digitization
--------------------------+-------------------------------------------------
Comment (by martinl):

Replying to [comment:8 zanollim]:

> after the ./configure (terminated with no errors)
> when I run make the new error is:
{{{
> make: shared: Command not found
> make: [grass6_wxvdigit.so] Error 127 (ignored)
}}}
>
> in the Makefile, inside the 'vdigit' folder, I read only this line with
the word 'shared':
{{{
> [...]
> LDFLAGS=-shared -fpic -L$(ARCH_LIBDIR) $(VECTLIB) $(GISLIB) $(GDALLIBS)
$(VEDITLIB) -lgdi $(WXLDFLAGS)
> [...]
}}}

Since this issue is not related to the bug, you can write me personally. I
assume you run ./configure without any switches (from the error I can see
at least without --with-cxx). I remember I prepared the script for
configuration on your machine. It is called configure.sh, you need to run
this script or ./configure with all needed switches.

Regards, Martin

--
Ticket URL: <http://trac.osgeo.org/grass/ticket/29#comment:9&gt;
GRASS GIS <http://grass.osgeo.org>
GRASS Geographic Information System (GRASS GIS) - http://grass.osgeo.org/

#29: moving of vector object by mouse
--------------------------+-------------------------------------------------
  Reporter: zanollim | Owner: martinl
      Type: enhancement | Status: closed
  Priority: major | Milestone: 6.4.0
Component: Python | Version: svn-trunk
Resolution: fixed | Keywords: wxgui, digitization
--------------------------+-------------------------------------------------
Changes (by zanollim):

  * status: assigned => closed
  * resolution: => fixed

Comment:

Thanks Martin,

I confirm that this bug is fixed.

michele

--
Ticket URL: <http://trac.osgeo.org/grass/ticket/29#comment:10&gt;
GRASS GIS <http://grass.osgeo.org>
GRASS Geographic Information System (GRASS GIS) - http://grass.osgeo.org/