[GRASS-user] V.Select strange results

Hi all.
i'm looking to v.select (grass 6.4).

i've 2 paths done by v.net.path, i want to extract the diff path of
these 2 paths using v.select, overlap and the reverse.
before this operation i clean both of them using break and snap.

As you can see in the image there are two path, one blue and one
green, these two path sheared pieces (u can't see the shared path,but
is not imporant).
so, i want find the differences of these two path.
i do the select with a reverse command but the result is not right as
i can excepted.

if u pay attention the black path (the diff path) is not completly
right. in fact this path has to start and finish on the intersection
of these two path (blue and green) but start and end before the
intersection. so the black path has to be identical as the green path
(the green path that u can see)

i think the problem is the lines of these 2 path (green and blue) that
are not cut in the intersection, so the line goes across the
intersection of these line.

how can i fix this problem?

thanks.

--
Stefano

(attachments)

path.png

On 25/05/09 18:00, Stefano wrote:

Hi all.
i'm looking to v.select (grass 6.4).

i've 2 paths done by v.net.path, i want to extract the diff path of
these 2 paths using v.select, overlap and the reverse.
before this operation i clean both of them using break and snap.

As you can see in the image there are two path, one blue and one
green, these two path sheared pieces (u can't see the shared path,but
is not imporant).
so, i want find the differences of these two path.
i do the select with a reverse command but the result is not right as
i can excepted.

if u pay attention the black path (the diff path) is not completly
right. in fact this path has to start and finish on the intersection
of these two path (blue and green) but start and end before the
intersection. so the black path has to be identical as the green path
(the green path that u can see)

i think the problem is the lines of these 2 path (green and blue) that
are not cut in the intersection, so the line goes across the
intersection of these line.

how can i fix this problem?

v.select does not cut exactly at the edges of overlap, but selects the entire feature that overlaps, even if this feature goes beyond the overlap (i.e. it does an "overlap" and not an "intersect").

What you want is v.overlay, but unfortunately this has never been implemented for two line layers (never understood why).

Your best solution at this stage is to compile the current grass6 svn tree (6.5) with the --with-geos configure flag which will give you access to a much more wide array of tools than only overlap [1].

Moritz

[1] http://grass.osgeo.org/grass65/manuals/html65_user/v.select.html

Hi,

I try to compile the grass 65 svn on my suse 11.1 64bit. Everything
works fine except (64-bit-support and) the wxPython-gui.

make command gives following error:

###########################################
GRASS GIS compilation log
-------------------------
Started compilation: Do 28. Mai 15:13:08 CEST 2009
--
Errors in:
/usr/local/src/cvs/grass65/grass6_devel/gui/wxpython/nviz
--
In case of errors please change into the directory with error and run
'make'.
If you get multiple errors, you need to deal with them in the order they
appear in the error log. If you get an error building a library, you will
also get errors from anything which uses the library.
--
Finished compilation: Do 28. Mai 15:13:36 CEST 2009
make: *** [default] Fehler 1
###########################################

running make in /usr/local/src/cvs/grass65/grass6_devel/gui/wxpython/nviz

gives:

#########################################
python setup.py build_ext --swig=/usr/bin/swig --swig-opts=-c++
--build-lib=OBJ.x86_64-unknown-linux-gnu
--build-temp=OBJ.x86_64-unknown-linux-gnu
running build_ext
building '_grass6_wxnviz' extension
swigging grass6_wxnviz.i to grass6_wxnviz_wrap.cpp
/usr/bin/swig -python -c++ -o grass6_wxnviz_wrap.cpp grass6_wxnviz.i
gcc -pthread -fno-strict-aliasing -DNDEBUG -fmessage-length=0 -O2 -Wall
-D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables
-fasynchronous-unwind-tables -g -fwrapv -fPIC -DPACKAGE="grasslibs"
-D_FILE_OFFSET_BITS=64 -D_LARGE_FILES -D__WXGTK__
-I/usr/local/src/cvs/grass65/grass6_devel/dist.x86_64-unknown-linux-gnu/include
-I/usr/include -I/usr/lib64/wx/include/gtk2-unicode-release-2.8
-I/usr/include/wx-2.8 -I/usr/include/python2.6 -c change_view.cpp -o
OBJ.x86_64-unknown-linux-gnu/change_view.o
In file included from /usr/include/wx-2.8/wx/wx.h:18,
                 from nviz.h:23,
                 from change_view.cpp:15:
/usr/include/wx-2.8/wx/list.h:1178: error: expected ‘,’ or ‘...’ before
numeric constant
/usr/include/wx-2.8/wx/list.h:1262: error: expected ‘,’ or ‘...’ before
numeric constant
In file included from /usr/include/wx-2.8/wx/wx.h:32,
                 from nviz.h:23,
                 from change_view.cpp:15:
/usr/include/wx-2.8/wx/module.h:21: error: expected ‘,’ or ‘...’ before
numeric constant
In file included from /usr/include/wx-2.8/wx/wx.h:36,
                 from nviz.h:23,
                 from change_view.cpp:15:
/usr/include/wx-2.8/wx/window.h:111: error: expected ‘,’ or ‘...’ before
numeric constant
In file included from /usr/include/wx-2.8/wx/wx.h:55,
                 from nviz.h:23,
                 from change_view.cpp:15:
/usr/include/wx-2.8/wx/menu.h:36: error: expected ‘,’ or ‘...’ before
numeric constant
/usr/include/wx-2.8/wx/menu.h:37: error: expected ‘,’ or ‘...’ before
numeric constant
In file included from /usr/include/wx-2.8/wx/wx.h:66,
                 from nviz.h:23,
                 from change_view.cpp:15:
/usr/include/wx-2.8/wx/dataobj.h:262: error: expected ‘,’ or ‘...’
before numeric constant
In file included from /usr/include/wx-2.8/wx/radiobox.h:166,
                 from /usr/include/wx-2.8/wx/wx.h:79,
                 from nviz.h:23,
                 from change_view.cpp:15:
/usr/include/wx-2.8/wx/gtk/radiobox.h:19: error: expected ‘,’ or ‘...’
before numeric constant
In file included from /usr/include/wx-2.8/wx/toolbar.h:67,
                 from /usr/include/wx-2.8/wx/wx.h:86,
                 from nviz.h:23,
                 from change_view.cpp:15:
/usr/include/wx-2.8/wx/tbarbase.h:231: error: expected ‘,’ or ‘...’
before numeric constant
In file included from /usr/include/wx-2.8/wx/wx.h:89,
                 from nviz.h:23,
                 from change_view.cpp:15:
/usr/include/wx-2.8/wx/sizer.h:414: error: expected ‘,’ or ‘...’ before
numeric constant
In file included from /usr/include/wx-2.8/wx/wx.h:91,
                 from nviz.h:23,
                 from change_view.cpp:15:
/usr/include/wx-2.8/wx/statusbr.h:25: error: expected ‘,’ or ‘...’
before numeric constant
error: command 'gcc' failed with exit status 1
make: *** [OBJ.x86_64-unknown-linux-gnu/_grass6_wxnviz.so] Fehler 1

############################################

I dont understand the error. Thanks for hints!

Achim

PS: 64-bit support needs fftw2 compiled with -fPIC
#this applies to FFTW2, not GRASS:
    cd fftw-2.1.5/
    CFLAGS="-fPIC" ./configure
    make
    make install
what I did. My configuration looks like this:
CFLAGS="-O3 -msse3 -march=core2 -Wall" LDFLAGS="-s" ./configure \
      --with-64bit \
      --with-libs=/usr/lib64 \
      --with-fftw \
      --with-cxx \
      --with-sqlite \
      --with-postgres \
      --with-postgres-libs=/usr/include/pgsql/libpq \
      --with-postgres-includes=/usr/include/pgsql \
      --with-freetype \
      --with-freetype-includes=/usr/include/freetype2 \
      --with-motif \
      --with-proj-share=/usr/share/proj \
      --with-geos \
      --with-python \
      --with-wxwidgets=/usr/bin/wx-config

Thanks all. i think that the current solution is good enough. maybe next time i’ll try the 6.5 with feature.

thanks

On Thu, May 28, 2009 at 10:39, Moritz Lennert <mlennert@club.worldonline.be> wrote:

On 25/05/09 18:00, Stefano wrote:

Hi all.
i’m looking to v.select (grass 6.4).

i’ve 2 paths done by v.net.path, i want to extract the diff path of
these 2 paths using v.select, overlap and the reverse.
before this operation i clean both of them using break and snap.

As you can see in the image there are two path, one blue and one
green, these two path sheared pieces (u can’t see the shared path,but
is not imporant).
so, i want find the differences of these two path.
i do the select with a reverse command but the result is not right as
i can excepted.

if u pay attention the black path (the diff path) is not completly
right. in fact this path has to start and finish on the intersection
of these two path (blue and green) but start and end before the
intersection. so the black path has to be identical as the green path
(the green path that u can see)

i think the problem is the lines of these 2 path (green and blue) that
are not cut in the intersection, so the line goes across the
intersection of these line.

how can i fix this problem?

v.select does not cut exactly at the edges of overlap, but selects the entire feature that overlaps, even if this feature goes beyond the overlap (i.e. it does an “overlap” and not an “intersect”).

What you want is v.overlay, but unfortunately this has never been implemented for two line layers (never understood why).

Your best solution at this stage is to compile the current grass6 svn tree (6.5) with the --with-geos configure flag which will give you access to a much more wide array of tools than only overlap [1].

Moritz

[1] http://grass.osgeo.org/grass65/manuals/html65_user/v.select.html


Stefano