[Qgis-user] Classification uses full range of values from joined attribute table
Lee Hachadoorian
Lee.Hachadoorian+L at gmail.com
Mon Nov 11 00:47:52 PST 2013
On 11/11/2013 02:55 AM, Richard Duivenvoorde wrote:
> On 09-11-13 21:14, Lee Hachadoorian wrote:
>> I am joining a spatial layer (from PostGIS) with an attribute (aspatial)
>> table (also from PostGIS). There are more rows in the attribute table
>> than in the spatial table. After I do the join, I open the attribute,
>> and it only displays rows in the spatial table (i.e., this is an INNER
>> JOIN, or maybe a LEFT JOIN, I didn't test tables with unmatched
>> attribute rows. The point being, there are no attribute rows with
>> unmatched rows from the spatial table).
>>
>> But when I style the layer, if I choose one of the columns from the
>> joined attribute table and classify the values (I was using graduated
>> symbology for a numeric field), the classes that are produced are based
>> on the entire range of values from the attribute table, i.e., the
>> classification is not honoring the fact that the join result omits many
>> of the rows from the attribute table. Since, in the case I tested, the
>> field values for those rows which match features in the spatial layer
>> only cover a small part of the total range, the resulting map has all
>> the features falling into fewer classes than specified (e.g., there are
>> 5 classes in the data, but only 2 colors on the map).
>>
>> First, I should ask whether I am doing anything wrong here, or if people
>> can confirm this behavior. Second, I cannot find a specific feature
>> request related to this at hub.qgis.org <http://hub.qgis.org>, so is
>> this already an tracked issue that I just wasn't able to find? Third, do
>> others agree that this is unexpected behavior?
> Hi Lee,
>
> with 1 minimal shapefiles and a dbf to join in 2.0.1 I could easily
> reproduce your issue.
>
> The values of the columns in the joined table are taken into acount for
> the calculation of the classes and boundaries for the styling.
>
> I think you should either create an issue for this (adding some
> data+project to easily test), and/or pull this discussion to the dev
> list. If not able, I can do this for you.
>
> It's worth a discussion: is this by accident, or by design. I could
> think of a scenario in which you want all data in the joined table to be
> used, even when there is no join available in your spatial data for it...
> Best would be to have a checkbox so it is transparant which scenario to use.
>
> Regards,
>
> Richard Duivenvoorde
I can definitely create the issue with test data. Is there any limit on
file size for the data? I'm not currently on the dev list, so feel free
to bring it up there.
Best,
--Lee
More information about the Qgis-user
mailing list