Opened 15 years ago

Closed 14 years ago

#1912 closed patch (fixed)

[PATCH] area not null for symbols with value zero

Reported by: alicebtoklas Owned by: mhugent
Priority: major: does not work as expected Milestone: Version 1.5.0
Component: Symbology Version: Trunk
Keywords: area symbols Cc: msieczka, homann
Must Fix for Release: Yes Platform: All
Platform Version: Awaiting user input: no

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

Change History (8)

comment:1 by lutra, 15 years ago

Component: Build/InstallSymbology
Owner: alicebtoklas removed
Platform: DebianAll

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

in reply to:  description ; comment:2 by mlennert, 14 years ago

Version: HEAD

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.

comment:3 by lutra, 14 years ago

Version: HEAD

still confirmed in trunk

in reply to:  2 comment:4 by mlennert, 14 years ago

Replying to 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.

in reply to:  description comment:5 by mlennert, 14 years ago

Cc: msieczka homann added
Must Fix for Release: NoYes
Summary: area not null for symbols with value zero[PATCH] area not null for symbols with value zero

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

comment:6 by mlennert, 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

comment:7 by mhugent, 14 years ago

Owner: set to mhugent
Type: bugpatch

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.

comment:8 by mhugent, 14 years ago

Resolution: fixed
Status: newclosed

I agree that those minimum marker sizes are not good in some situations. Therefore, patch is applied in r13161. Thanks!

Note: See TracTickets for help on using tickets.