[GRASS-dev] [GRASS GIS] #171: d.vect: -c type=area doesn't draw boundary

#171: d.vect: -c type=area doesn't draw boundary
---------------------+------------------------------------------------------
Reporter: hamish | Owner: grass-dev@lists.osgeo.org
     Type: defect | Status: new
Priority: major | Milestone: 6.4.0
Component: default | Version: svn-develbranch6
Keywords: d.vect |
---------------------+------------------------------------------------------
'd.vect -c type=area' doesn't draw boundaries.

If you use type=area,boundary you get them, but IIUC "area" is an alias
for "centroid,boundary", so you shouldn't have to do that.

I am not sure if 'd.vect -a type=area' will or not.

Hamish

--
Ticket URL: <http://trac.osgeo.org/grass/ticket/171&gt;
GRASS GIS <http://grass.osgeo.org>

#171: d.vect: -c type=area doesn't draw boundary
----------------------+-----------------------------------------------------
  Reporter: hamish | Owner: grass-dev@lists.osgeo.org
      Type: defect | Status: new
  Priority: major | Milestone: 6.4.0
Component: default | Version: svn-develbranch6
Resolution: | Keywords: d.vect
----------------------+-----------------------------------------------------
Comment (by hamish):

correction: it draws the boundaries, but uses the same color as the fill
when it should make the area color random and the line color respect
color=. e.g.:

  d.vect -c type=area fcolor=none

see the d.vect symbol drawing code for an example of using a primary and
secondary color in place of line= and fill=.

Hamish

--
Ticket URL: <http://trac.osgeo.org/grass/ticket/171#comment:1&gt;
GRASS GIS <http://grass.osgeo.org>

#171: d.vect: -c type=area doesn't draw boundary
----------------------+-----------------------------------------------------
  Reporter: hamish | Owner: grass-dev@lists.osgeo.org
      Type: defect | Status: new
  Priority: major | Milestone: 6.4.0
Component: default | Version: svn-develbranch6
Resolution: | Keywords: d.vect
----------------------+-----------------------------------------------------
Comment (by neteler):

I assume that in darea() of d.vect/area.c some test is needed in
the loop therein to distinguish the various vector types while
looping over all vectors.

Markus

--
Ticket URL: <http://trac.osgeo.org/grass/ticket/171#comment:2&gt;
GRASS GIS <http://grass.osgeo.org>

#171: d.vect: -c type=area doesn't draw boundary
----------------------+-----------------------------------------------------
  Reporter: hamish | Owner: grass-dev@lists.osgeo.org
      Type: defect | Status: new
  Priority: major | Milestone: 6.4.0
Component: default | Version: svn-develbranch6
Resolution: | Keywords: d.vect
----------------------+-----------------------------------------------------
Comment (by neuba):

Hi I don't know it is the same issue but I can not draw any vector map
with d.vect when I use command like d.vect output=map1 i got this error
message: output <map1> exist. If I put an inexistant vector, I got: map
<map1> not found.
Thank you

--
Ticket URL: <http://trac.osgeo.org/grass/ticket/171#comment:3&gt;
GRASS GIS <http://grass.osgeo.org>

#171: d.vect: -c type=area doesn't draw boundary
----------------------+-----------------------------------------------------
  Reporter: hamish | Owner: grass-dev@lists.osgeo.org
      Type: defect | Status: new
  Priority: major | Milestone: 6.4.0
Component: default | Version: svn-develbranch6
Resolution: | Keywords: d.vect
----------------------+-----------------------------------------------------
Comment (by martinl):

Replying to [comment:3 neuba]:
> Hi I don't know it is the same issue but I can not draw any vector map
with d.vect when I use command like d.vect output=map1 i got this error
message: output <map1> exist. If I put an inexistant vector, I got: map
<map1> not found.

There is no 'output' parameter

{{{
d.vect --help
}}}

{{{
d.vect output=x
Sorry, <output> is not a valid parameter

ERROR: Required parameter <map> not set:
     (Name of input vector map).
}}}

Martin

--
Ticket URL: <http://trac.osgeo.org/grass/ticket/171#comment:4&gt;
GRASS GIS <http://grass.osgeo.org>

#171: d.vect: -c type=area doesn't draw boundary
----------------------+-----------------------------------------------------
  Reporter: hamish | Owner: grass-dev@lists.osgeo.org
      Type: defect | Status: new
  Priority: major | Milestone: 6.4.0
Component: default | Version: svn-develbranch6
Resolution: | Keywords: d.vect
----------------------+-----------------------------------------------------
Comment (by neteler):

Replying to [comment:3 neuba]:
> Hi I don't know it is the same issue but I can not draw any vector map
with d.vect when I use command like d.vect output=map1 ...

IMPORTANT to all SVN users:
After the recent change in parser.c you need to RECOMPILE GRASS from
scratch.

I wanted to post this but forgot about it. So

{{{
make distclean
sh configure ...
make
}}}

to get the parameters right again.

@neuba: this is unrelated to this bug report.

Markus

--
Ticket URL: <http://trac.osgeo.org/grass/ticket/171#comment:5&gt;
GRASS GIS <http://grass.osgeo.org>

GRASS GIS wrote:

IMPORTANT to all SVN users:
After the recent change in parser.c you need to RECOMPILE GRASS from
scratch.

I wanted to post this but forgot about it. So

{{{
make distclean
sh configure ...
make
}}}

Might it be better to just assign explicit values to the G_OPT_*
constants, so that this issue doesn't occur whenever new constants are
added or removed?

A related, but distinct option is to make e.g. G_gisinit() check that
the library and module were compiled with the same version of gis.h,
I.e.:

include/gis.h:

  int G__gisinit(const char *, const char *);
  
  #define GIS_H_VERSION "$Revision$"
  
  #define G_gisint(pgm) G__gisinit(GIS_H_VERSION, (pgm))

lib/gis/gisinit.c:

  int G__gisinit(const char *version, const char *pgm)
  {
    ...
  
    if (strcmp(version, GIS_H_VERSION) != 0)
      G_fatal_error(_("Incompatible library version for module"));
  
    ...
  }

--
Glynn Clements <glynn@gclements.plus.com>

On Sat, May 24, 2008 at 11:10 AM, Glynn Clements
<glynn@gclements.plus.com> wrote:

GRASS GIS wrote:

IMPORTANT to all SVN users:
After the recent change in parser.c you need to RECOMPILE GRASS from
scratch.

I wanted to post this but forgot about it. So

{{{
make distclean
sh configure ...
make
}}}

Might it be better to just assign explicit values to the G_OPT_*
constants, so that this issue doesn't occur whenever new constants are
added or removed?

A related, but distinct option is to make e.g. G_gisinit() check that
the library and module were compiled with the same version of gis.h,
I.e.:

include/gis.h:

       int G__gisinit(const char *, const char *);

       #define GIS_H_VERSION "$Revision$"

       #define G_gisint(pgm) G__gisinit(GIS_H_VERSION, (pgm))

lib/gis/gisinit.c:

       int G__gisinit(const char *version, const char *pgm)
       {
               ...

               if (strcmp(version, GIS_H_VERSION) != 0)
                       G_fatal_error(_("Incompatible library version for module"));

               ...
       }

Sounds like a very good suggestion to me. I got trapped by this
myself a couple of times in the past.

Markus

#171: d.vect: -c type=area doesn't draw boundary
--------------------------+-------------------------------------------------
  Reporter: hamish | Owner: grass-dev@lists.osgeo.org
      Type: defect | Status: new
  Priority: major | Milestone: 6.4.0
Component: default | Version: svn-develbranch6
Resolution: | Keywords: d.vect
  Platform: Unspecified | Cpu: Unspecified
--------------------------+-------------------------------------------------
Changes (by mlennert):

  * platform: => Unspecified
  * cpu: => Unspecified

Comment:

Attached diff should fix the bug. I don't really understand why there was
a conditioning on the value of rgb in there. Looking through the code, I
don't think it is useful, but please test (notably with some of the flags,
such as table color and z-color).

Moritz

--
Ticket URL: <https://trac.osgeo.org/grass/ticket/171#comment:6&gt;
GRASS GIS <http://grass.osgeo.org>

#171: d.vect: -c type=area doesn't draw boundary
--------------------------+-------------------------------------------------
  Reporter: hamish | Owner: grass-dev@lists.osgeo.org
      Type: defect | Status: closed
  Priority: major | Milestone: 6.4.0
Component: default | Version: svn-develbranch6
Resolution: fixed | Keywords: d.vect
  Platform: Unspecified | Cpu: Unspecified
--------------------------+-------------------------------------------------
Changes (by neteler):

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

Comment:

Fixed in 6.4: devel_grass6 (r351819) and 6.4.0svn (r35182).

--
Ticket URL: <http://trac.osgeo.org/grass/ticket/171#comment:7&gt;
GRASS GIS <http://grass.osgeo.org>