Feature request #1912

[PATCH] area not null for symbols with value zero

Added by alicebtoklas - over 14 years ago. Updated about 14 years ago.

Status:Closed
Priority:Low
Assignee:Marco Hugentobler
Category:Symbology
Pull Request or Patch supplied: Resolution:fixed
Easy fix?:No Copied to github as #:11972

Description

Maybe it's not the right place to talk about that, but:

using the "area scale field" to change the size of my point symbols, I get small symbols where the value in this field is zero, instead of no symbol at all. I think it's a big problem.

Cheers,

Alice

History

#1 Updated by Giovanni Manghi over 14 years ago

I confirm it on the latest qgis version available on both linux and windows.

#2 Updated by mlennert - over 14 years ago

Replying to alicebtoklas:

Maybe it's not the right place to talk about that, but:

using the "area scale field" to change the size of my point symbols, I get small symbols where the value in this field is zero, instead of no symbol at all. I think it's a big problem.

I can confirm with 1.3.0. This is quite annoying and makes QGIS unusable for proportionate size cartography.

#3 Updated by Giovanni Manghi over 14 years ago

still confirmed in trunk

#4 Updated by mlennert - over 14 years ago

Replying to [comment:2 mlennert]:

Replying to alicebtoklas:

Maybe it's not the right place to talk about that, but:

using the "area scale field" to change the size of my point symbols, I get small symbols where the value in this field is zero, instead of no symbol at all. I think it's a big problem.

I can confirm with 1.3.0. This is quite annoying and makes QGIS unusable for proportionate size cartography.

To complement this: whatever the value of the area scale field, if you put the Size field to 0.01, all symbols (at least circles) are of equal size. I imagine this is linked to the OP's issue.

#5 Updated by mlennert - over 14 years ago

Replying to alicebtoklas:

using the "area scale field" to change the size of my point symbols, I get small symbols where the value in this field is zero, instead of no symbol at all. I think it's a big problem.

Found the culprit: http://trac.osgeo.org/qgis/changeset/9513, which responds to http://trac.osgeo.org/qgis/ticket/1186 (putting Maciek and homann in cc, so that they can possibly react as well).

Applying the following patch, solves the problem of this current bug, while apparently not reopening #1186:

Index: qgsmarkercatalogue.cpp
===================================================================
--- qgsmarkercatalogue.cpp    (révision 12502)
+++ qgsmarkercatalogue.cpp    (copie de travail)
@@ -118,12 +118,6 @@
   // First prepare the paintdevice that the marker will be drawn onto
   //

-  // Introduce a minimum size, we don't want it to disappear.
-  if ( size < 4 )
-  {
-    size = 4;
-  }
-
   QImage myImage;
   int imageSize;
   if ( fullName.startsWith( "hard:" ) )

As already mentioned, this is a show-stopper for any proportionate symbol cartography in QGIS, and so should be solved ASAP.

I'm also a bit skeptical about the second part of #9513:

-  if ( name == "circle" ) 
+  // If radius is 0, draw a circle, so it wont disappear. 
+  if ( name == "circle" || r < 1) 

Why does r have to be defined as int ? And is this maybe deprecated since http://trac.osgeo.org/qgis/changeset/8976 ? I don't have the time to delve any deeper into the source code, but maybe someone can have a look.

But in any case, most of the issue of this bug seems to be solved by above patch.

Moritz

#6 Updated by mlennert - about 14 years ago

ping

This is a major issue for our usage of QGIS and it would be great if someone could at least have a look at the proposed patch.

Moritz

#7 Updated by Marco Hugentobler about 14 years ago

I'm going to have a look at the patch.

Why does r have to be defined as int

This is probably legacy and comes from earlier times when all the symbol measures were in pixels.

#8 Updated by Marco Hugentobler about 14 years ago

  • Resolution set to fixed
  • Status changed from Open to Closed

I agree that those minimum marker sizes are not good in some situations. Therefore, patch is applied in f76bc2d0 (SVN r13162). Thanks!

Also available in: Atom PDF