[QGIS-ZA-user] QGIS Legend Problem

classic Classic list List threaded Threaded
11 messages Options
Reply | Threaded
Open this post in threaded view
|

[QGIS-ZA-user] QGIS Legend Problem

QGIS-za-user mailing list

Good Morning Everyone,

I have a geology layer with a few columns, including the chronostratigraphic symbol, the rock type description and, importantly, a colour column (String type). The values stored in the colour column are the HTML hex values for the colour according to the 1 : 1 000 000 simplified geological map of South Africa.

When I open the layer and select the colour column for colouring the lithological units it works beautifully, but I do not get a legend for the composer. But if I set the Properties|Style to Categorized and then again select the colour from the Colour column in the table I also get the same nicely coloured map according to the colour column, an a Legend. But the Legend is wrong...it chooses random colours! What am I doing wrong? Is there a way to get a correct legend, also only showing the units which are actually on the map in the composer. I can set the colours manually to match the value in the colour field but that sort of defeats the purpose.

Thanks for your help so long,

Immo

--

Immo F. Blecher
Street:
52 Lynedoch Eco Village, Lynedoch, 7603, South Africa
Postal: 52 Lynedoch Eco Village, Lynedoch, 7603, South Africa
Cell: +27 83 272 6791 | Fax: +27 86 7363302 Email: [hidden email] | [hidden email] | [hidden email]
Internet: http://www.blecher.co.za/

Contact me: [hidden email] immoblecher

Please consider your environmental responsibility. Before printing this e-mail message, ask yourself whether you really need a hard copy.

IMPORTANT: The contents of this email and any attachments are confidential. They are intended for the named recipient(s) only. If you have received this email by mistake, please notify the sender immediately and do not disclose the contents to anyone or make copies thereof.


_______________________________________________
qgis-za-user mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/qgis-za-user
Reply | Threaded
Open this post in threaded view
|

Re: QGIS Legend Problem

QGIS-za-user mailing list
Hi Immo,

Which version of QGIS are you using?

Frank.

On 17/07/2017 09:48, Immo Blecher via qgis-za-user wrote:

Good Morning Everyone,

I have a geology layer with a few columns, including the chronostratigraphic symbol, the rock type description and, importantly, a colour column (String type). The values stored in the colour column are the HTML hex values for the colour according to the 1 : 1 000 000 simplified geological map of South Africa.

When I open the layer and select the colour column for colouring the lithological units it works beautifully, but I do not get a legend for the composer. But if I set the Properties|Style to Categorized and then again select the colour from the Colour column in the table I also get the same nicely coloured map according to the colour column, an a Legend. But the Legend is wrong...it chooses random colours! What am I doing wrong? Is there a way to get a correct legend, also only showing the units which are actually on the map in the composer. I can set the colours manually to match the value in the colour field but that sort of defeats the purpose.

Thanks for your help so long,

Immo

--

Immo F. Blecher
Street:
52 Lynedoch Eco Village, Lynedoch, 7603, South Africa
Postal: 52 Lynedoch Eco Village, Lynedoch, 7603, South Africa
Cell: +27 83 272 6791 | Fax: +27 86 7363302 Email: [hidden email] | [hidden email] | [hidden email]
Internet: http://www.blecher.co.za/




_______________________________________________
qgis-za-user mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/qgis-za-user



_______________________________________________
qgis-za-user mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/qgis-za-user
Reply | Threaded
Open this post in threaded view
|

Re: QGIS Legend Problem

QGIS-za-user mailing list

Sorry Frank, I realised later that I did not send that info. Here it is:

QGIS version

2.18.10

QGIS code revision

59e0f78

Compiled against Qt

4.8.7

Running against Qt

4.8.7

Compiled against GDAL/OGR

1.11.3

Running against GDAL/OGR

1.11.3

Compiled against GEOS

3.5.0-CAPI-1.9.0

Running against GEOS

3.5.0-CAPI-1.9.0 r4084

PostgreSQL Client Version

9.5.2

SpatiaLite Version

4.3.0a

QWT Version

5.2.3

PROJ.4 Version

492

QScintilla2 Version

2.9.1




And I run it under Ubuntu 16.04 LTS

Thanks
Immo

On 17/07/2017 14:19, Frank Sokolic via qgis-za-user wrote:
Hi Immo,

Which version of QGIS are you using?

Frank.

On 17/07/2017 09:48, Immo Blecher via qgis-za-user wrote:

Good Morning Everyone,

I have a geology layer with a few columns, including the chronostratigraphic symbol, the rock type description and, importantly, a colour column (String type). The values stored in the colour column are the HTML hex values for the colour according to the 1 : 1 000 000 simplified geological map of South Africa.

When I open the layer and select the colour column for colouring the lithological units it works beautifully, but I do not get a legend for the composer. But if I set the Properties|Style to Categorized and then again select the colour from the Colour column in the table I also get the same nicely coloured map according to the colour column, an a Legend. But the Legend is wrong...it chooses random colours! What am I doing wrong? Is there a way to get a correct legend, also only showing the units which are actually on the map in the composer. I can set the colours manually to match the value in the colour field but that sort of defeats the purpose.

Thanks for your help so long,

Immo

--

Immo F. Blecher Street: 52 Lynedoch Eco Village, Lynedoch, 7603, South Africa Postal: 52 Lynedoch Eco Village, Lynedoch, 7603, South Africa Cell: +27 83 272 6791 | Fax: +27 86 7363302 Email: [hidden email] | [hidden email] | [hidden email] Internet: http://www.blecher.co.za/




_______________________________________________
qgis-za-user mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/qgis-za-user



_______________________________________________
qgis-za-user mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/qgis-za-user

--

Immo F. Blecher Street: 52 Lynedoch Eco Village, Lynedoch, 7603, South Africa Postal: 52 Lynedoch Eco Village, Lynedoch, 7603, South Africa Cell: +27 83 272 6791 | Fax: +27 86 7363302 Email: [hidden email] | [hidden email] | [hidden email] Internet: http://www.blecher.co.za/

Contact me: [hidden email] immoblecher

Please consider your environmental responsibility. Before printing this e-mail message, ask yourself whether you really need a hard copy.

IMPORTANT: The contents of this email and any attachments are confidential. They are intended for the named recipient(s) only. If you have received this email by mistake, please notify the sender immediately and do not disclose the contents to anyone or make copies thereof.


_______________________________________________
qgis-za-user mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/qgis-za-user
Reply | Threaded
Open this post in threaded view
|

Re: QGIS Legend Problem

QGIS-za-user mailing list
I've just tested this on QGIS Master and get exactly the same result you describe. I also tried rule-based rendering but the colours don't get carried through to the legend either.

I wonder if this is a bug?

Frank.

On 17/07/2017 14:23, Immo Blecher wrote:

Sorry Frank, I realised later that I did not send that info. Here it is:

QGIS version

2.18.10

QGIS code revision

59e0f78

Compiled against Qt

4.8.7

Running against Qt

4.8.7

Compiled against GDAL/OGR

1.11.3

Running against GDAL/OGR

1.11.3

Compiled against GEOS

3.5.0-CAPI-1.9.0

Running against GEOS

3.5.0-CAPI-1.9.0 r4084

PostgreSQL Client Version

9.5.2

SpatiaLite Version

4.3.0a

QWT Version

5.2.3

PROJ.4 Version

492

QScintilla2 Version

2.9.1




And I run it under Ubuntu 16.04 LTS

Thanks
Immo

On 17/07/2017 14:19, Frank Sokolic via qgis-za-user wrote:
Hi Immo,

Which version of QGIS are you using?

Frank.

On 17/07/2017 09:48, Immo Blecher via qgis-za-user wrote:

Good Morning Everyone,

I have a geology layer with a few columns, including the chronostratigraphic symbol, the rock type description and, importantly, a colour column (String type). The values stored in the colour column are the HTML hex values for the colour according to the 1 : 1 000 000 simplified geological map of South Africa.

When I open the layer and select the colour column for colouring the lithological units it works beautifully, but I do not get a legend for the composer. But if I set the Properties|Style to Categorized and then again select the colour from the Colour column in the table I also get the same nicely coloured map according to the colour column, an a Legend. But the Legend is wrong...it chooses random colours! What am I doing wrong? Is there a way to get a correct legend, also only showing the units which are actually on the map in the composer. I can set the colours manually to match the value in the colour field but that sort of defeats the purpose.

Thanks for your help so long,

Immo

--

Immo F. Blecher Street: 52 Lynedoch Eco Village, Lynedoch, 7603, South Africa Postal: 52 Lynedoch Eco Village, Lynedoch, 7603, South Africa Cell: +27 83 272 6791 | Fax: +27 86 7363302 Email: [hidden email] | [hidden email] | [hidden email] Internet: http://www.blecher.co.za/




_______________________________________________
qgis-za-user mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/qgis-za-user



_______________________________________________
qgis-za-user mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/qgis-za-user

--

Immo F. Blecher Street: 52 Lynedoch Eco Village, Lynedoch, 7603, South Africa Postal: 52 Lynedoch Eco Village, Lynedoch, 7603, South Africa Cell: +27 83 272 6791 | Fax: +27 86 7363302 Email: [hidden email] | [hidden email] | [hidden email] Internet: http://www.blecher.co.za/

Contact me: [hidden email] immoblecher

Please consider your environmental responsibility. Before printing this e-mail message, ask yourself whether you really need a hard copy.

IMPORTANT: The contents of this email and any attachments are confidential. They are intended for the named recipient(s) only. If you have received this email by mistake, please notify the sender immediately and do not disclose the contents to anyone or make copies thereof.


_______________________________________________
qgis-za-user mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/qgis-za-user
Reply | Threaded
Open this post in threaded view
|

Re: QGIS Legend Problem

QGIS-za-user mailing list
In reply to this post by QGIS-za-user mailing list
Hi, Immo

Could you send us a copy of the layer you are trying to render with a
legend, or a clipped section of the layer? That will help with the
testing...

Thanks

Dean

------------------------------------------------------------------
Dean Ollis
Freshwater Research Centre
Kommetjie, Cape Town
CELL: 072 377 7006

-------- Original Message --------
Subject: Re: [QGIS-ZA-user] QGIS Legend Problem
From: Immo Blecher via qgis-za-user <[hidden email]>
To: South Africa QGIS user group <[hidden email]>
Cc: Immo Blecher <[hidden email]>
Date: 17/07/2017 14:23

>
> Sorry Frank, I realised later that I did not send that info. Here it is:
>
> QGIS version
>
>
>
> 2.18.10
>
>
>
> QGIS code revision
>
>
>
> 59e0f78 <https://github.com/qgis/QGIS/commit/59e0f78>
>
> Compiled against Qt
>
>
>
> 4.8.7
>
>
>
> Running against Qt
>
>
>
> 4.8.7
>
> Compiled against GDAL/OGR
>
>
>
> 1.11.3
>
>
>
> Running against GDAL/OGR
>
>
>
> 1.11.3
>
> Compiled against GEOS
>
>
>
> 3.5.0-CAPI-1.9.0
>
>
>
> Running against GEOS
>
>
>
> 3.5.0-CAPI-1.9.0 r4084
>
> PostgreSQL Client Version
>
>
>
> 9.5.2
>
>
>
> SpatiaLite Version
>
>
>
> 4.3.0a
>
> QWT Version
>
>
>
> 5.2.3
>
>
>
> PROJ.4 Version
>
>
>
> 492
>
> QScintilla2 Version
>
>
>
> 2.9.1
>
>
>
>
>
> And I run it under Ubuntu 16.04 LTS
>
> Thanks
> Immo
>
> On 17/07/2017 14:19, Frank Sokolic via qgis-za-user wrote:
>> Hi Immo,
>>
>> Which version of QGIS are you using?
>>
>> Frank.
>>
>> On 17/07/2017 09:48, Immo Blecher via qgis-za-user wrote:
>>>
>>> Good Morning Everyone,
>>>
>>> I have a geology layer with a few columns, including the
>>> chronostratigraphic symbol, the rock type description and,
>>> importantly, a colour column (String type). The values stored in the
>>> colour column are the HTML hex values for the colour according to
>>> the 1 : 1 000 000 simplified geological map of South Africa.
>>>
>>> When I open the layer and select the colour column for colouring the
>>> lithological units it works beautifully, but I do not get a legend
>>> for the composer. But if I set the Properties|Style to Categorized
>>> and then again select the colour from the Colour column in the table
>>> I also get the same nicely coloured map according to the colour
>>> column, an a Legend. But the Legend is wrong...it chooses random
>>> colours! What am I doing wrong? Is there a way to get a correct
>>> legend, also only showing the units which are actually on the map in
>>> the composer. I can set the colours manually to match the value in
>>> the colour field but that sort of defeats the purpose.
>>>
>>> Thanks for your help so long,
>>>
>>> Immo
>>>
>>> --
>>>
>>> *Immo F. Blecher**Street: */52 Lynedoch Eco Village, Lynedoch, 7603,
>>> South Africa //*Postal:*//52 Lynedoch Eco Village, Lynedoch, 7603,
>>> South Africa //*Cell:*///+27 83 272 6791 |*Fax: *+27 86 7363302
>>> *Email:*[hidden email].za_ <mailto:[hidden email]> |
>>> _immob19@gmail.com_ <mailto:[hidden email]>|
>>> [hidden email] <mailto:[hidden email]>
>>> _*Internet:*_http://www.blecher.co.za/_
>>>
>>>
>>>
>>>
>>> _______________________________________________
>>> qgis-za-user mailing list
>>> [hidden email]
>>> https://lists.osgeo.org/mailman/listinfo/qgis-za-user
>>
>>
>>
>> _______________________________________________
>> qgis-za-user mailing list
>> [hidden email]
>> https://lists.osgeo.org/mailman/listinfo/qgis-za-user
>
> --
>
> *Immo F. Blecher**Street: */52 Lynedoch Eco Village, Lynedoch, 7603,
> South Africa //*Postal:*//52 Lynedoch Eco Village, Lynedoch, 7603,
> South Africa //*Cell:*///+27 83 272 6791 |*Fax: *+27 86 7363302
> *Email:*[hidden email].za_ <mailto:[hidden email]> |
> _immob19@gmail.com_ <mailto:[hidden email]>| [hidden email]
> <mailto:[hidden email]> _*Internet:*_http://www.blecher.co.za/_
>
> Contact me: [hidden email] immoblecher
>
> <http://www.linkedin.com/pub/immo-blecher/30/414/b8>
>
>
>
> Please consider your environmental responsibility. Before printing
> this e-mail message, ask yourself whether you really need a hard copy.
>
> IMPORTANT: The contents of this email and any attachments are
> confidential. They are intended for the named recipient(s) only. If
> you have received this email by mistake, please notify the sender
> immediately and do not disclose the contents to anyone or make copies
> thereof.
>
>
>
> _______________________________________________
> qgis-za-user mailing list
> [hidden email]
> https://lists.osgeo.org/mailman/listinfo/qgis-za-user

_______________________________________________
qgis-za-user mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/qgis-za-user
Reply | Threaded
Open this post in threaded view
|

Re: QGIS Legend Problem

QGIS-za-user mailing list

Hi Dean,

Attached the Lithology Spatialite file with some of the lithologies in the Lithology Layer. With the whole South Africa the file would be too large to email.

Immo


On 17/07/2017 14:45, Dean Ollis via qgis-za-user wrote:
Hi, Immo

Could you send us a copy of the layer you are trying to render with a legend, or a clipped section of the layer? That will help with the testing...

Thanks

Dean

------------------------------------------------------------------
Dean Ollis
Freshwater Research Centre
Kommetjie, Cape Town
CELL: 072 377 7006

-------- Original Message --------
Subject: Re: [QGIS-ZA-user] QGIS Legend Problem
From: Immo Blecher via qgis-za-user [hidden email]
To: South Africa QGIS user group [hidden email]
Cc: Immo Blecher [hidden email]
Date: 17/07/2017 14:23

Sorry Frank, I realised later that I did not send that info. Here it is:

QGIS version

    

2.18.10

    

QGIS code revision

    

59e0f78 <https://github.com/qgis/QGIS/commit/59e0f78>

Compiled against Qt

    

4.8.7

    

Running against Qt

    

4.8.7

Compiled against GDAL/OGR

    

1.11.3

    

Running against GDAL/OGR

    

1.11.3

Compiled against GEOS

    

3.5.0-CAPI-1.9.0

    

Running against GEOS

    

3.5.0-CAPI-1.9.0 r4084

PostgreSQL Client Version

    

9.5.2

    

SpatiaLite Version

    

4.3.0a

QWT Version

    

5.2.3

    

PROJ.4 Version

    

492

QScintilla2 Version

    

2.9.1

    
    


And I run it under Ubuntu 16.04 LTS

Thanks
Immo

On 17/07/2017 14:19, Frank Sokolic via qgis-za-user wrote:
Hi Immo,

Which version of QGIS are you using?

Frank.

On 17/07/2017 09:48, Immo Blecher via qgis-za-user wrote:

Good Morning Everyone,

I have a geology layer with a few columns, including the chronostratigraphic symbol, the rock type description and, importantly, a colour column (String type). The values stored in the colour column are the HTML hex values for the colour according to the 1 : 1 000 000 simplified geological map of South Africa.

When I open the layer and select the colour column for colouring the lithological units it works beautifully, but I do not get a legend for the composer. But if I set the Properties|Style to Categorized and then again select the colour from the Colour column in the table I also get the same nicely coloured map according to the colour column, an a Legend. But the Legend is wrong...it chooses random colours! What am I doing wrong? Is there a way to get a correct legend, also only showing the units which are actually on the map in the composer. I can set the colours manually to match the value in the colour field but that sort of defeats the purpose.

Thanks for your help so long,

Immo

-- 

*Immo F. Blecher**Street: */52 Lynedoch Eco Village, Lynedoch, 7603, South Africa //*Postal:*//52 Lynedoch Eco Village, Lynedoch, 7603, South Africa //*Cell:*///+27 83 272 6791 |*Fax: *+27 86 7363302 *Email:*[hidden email].za_ [hidden email] | _immob19@gmail.com_ [hidden email]| [hidden email] [hidden email] _*Internet:*_http://www.blecher.co.za/_




_______________________________________________
qgis-za-user mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/qgis-za-user



_______________________________________________
qgis-za-user mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/qgis-za-user

-- 

*Immo F. Blecher**Street: */52 Lynedoch Eco Village, Lynedoch, 7603, South Africa //*Postal:*//52 Lynedoch Eco Village, Lynedoch, 7603, South Africa //*Cell:*///+27 83 272 6791 |*Fax: *+27 86 7363302 *Email:*[hidden email].za_ [hidden email] | _immob19@gmail.com_ [hidden email]| [hidden email] [hidden email] _*Internet:*_http://www.blecher.co.za/_

Contact me: [hidden email] immoblecher

<http://www.linkedin.com/pub/immo-blecher/30/414/b8>

    

Please consider your environmental responsibility. Before printing this e-mail message, ask yourself whether you really need a hard copy.

IMPORTANT: The contents of this email and any attachments are confidential. They are intended for the named recipient(s) only. If you have received this email by mistake, please notify the sender immediately and do not disclose the contents to anyone or make copies thereof.



_______________________________________________
qgis-za-user mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/qgis-za-user

_______________________________________________
qgis-za-user mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/qgis-za-user

--

Immo F. Blecher
Street:
52 Lynedoch Eco Village, Lynedoch, 7603, South Africa
Postal: 52 Lynedoch Eco Village, Lynedoch, 7603, South Africa
Cell: +27 83 272 6791 | Fax: +27 86 7363302 Email: [hidden email] | [hidden email] | [hidden email]
Internet: http://www.blecher.co.za/

Contact me: [hidden email] immoblecher

Please consider your environmental responsibility. Before printing this e-mail message, ask yourself whether you really need a hard copy.

IMPORTANT: The contents of this email and any attachments are confidential. They are intended for the named recipient(s) only. If you have received this email by mistake, please notify the sender immediately and do not disclose the contents to anyone or make copies thereof.


_______________________________________________
qgis-za-user mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/qgis-za-user

Lithology.sqlite (8M) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: QGIS Legend Problem

QGIS-za-user mailing list
In reply to this post by QGIS-za-user mailing list

Hello Everyone again,

It seems my file is still too big. Only 100k is allowed. Will try a new example with maybe only 3 or 4 polygons.

Regards

Immo


On 17/07/2017 14:45, Dean Ollis via qgis-za-user wrote:
Hi, Immo

Could you send us a copy of the layer you are trying to render with a legend, or a clipped section of the layer? That will help with the testing...

Thanks

Dean

------------------------------------------------------------------
Dean Ollis
Freshwater Research Centre
Kommetjie, Cape Town
CELL: 072 377 7006

-------- Original Message --------
Subject: Re: [QGIS-ZA-user] QGIS Legend Problem
From: Immo Blecher via qgis-za-user [hidden email]
To: South Africa QGIS user group [hidden email]
Cc: Immo Blecher [hidden email]
Date: 17/07/2017 14:23

Sorry Frank, I realised later that I did not send that info. Here it is:

QGIS version

    

2.18.10

    

QGIS code revision

    

59e0f78 <https://github.com/qgis/QGIS/commit/59e0f78>

Compiled against Qt

    

4.8.7

    

Running against Qt

    

4.8.7

Compiled against GDAL/OGR

    

1.11.3

    

Running against GDAL/OGR

    

1.11.3

Compiled against GEOS

    

3.5.0-CAPI-1.9.0

    

Running against GEOS

    

3.5.0-CAPI-1.9.0 r4084

PostgreSQL Client Version

    

9.5.2

    

SpatiaLite Version

    

4.3.0a

QWT Version

    

5.2.3

    

PROJ.4 Version

    

492

QScintilla2 Version

    

2.9.1

    
    


And I run it under Ubuntu 16.04 LTS

Thanks
Immo

On 17/07/2017 14:19, Frank Sokolic via qgis-za-user wrote:
Hi Immo,

Which version of QGIS are you using?

Frank.

On 17/07/2017 09:48, Immo Blecher via qgis-za-user wrote:

Good Morning Everyone,

I have a geology layer with a few columns, including the chronostratigraphic symbol, the rock type description and, importantly, a colour column (String type). The values stored in the colour column are the HTML hex values for the colour according to the 1 : 1 000 000 simplified geological map of South Africa.

When I open the layer and select the colour column for colouring the lithological units it works beautifully, but I do not get a legend for the composer. But if I set the Properties|Style to Categorized and then again select the colour from the Colour column in the table I also get the same nicely coloured map according to the colour column, an a Legend. But the Legend is wrong...it chooses random colours! What am I doing wrong? Is there a way to get a correct legend, also only showing the units which are actually on the map in the composer. I can set the colours manually to match the value in the colour field but that sort of defeats the purpose.

Thanks for your help so long,

Immo

-- 

*Immo F. Blecher**Street: */52 Lynedoch Eco Village, Lynedoch, 7603, South Africa //*Postal:*//52 Lynedoch Eco Village, Lynedoch, 7603, South Africa //*Cell:*///+27 83 272 6791 |*Fax: *+27 86 7363302 *Email:*[hidden email].za_ [hidden email] | _immob19@gmail.com_ [hidden email]| [hidden email] [hidden email] _*Internet:*_http://www.blecher.co.za/_




_______________________________________________
qgis-za-user mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/qgis-za-user



_______________________________________________
qgis-za-user mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/qgis-za-user

-- 

*Immo F. Blecher**Street: */52 Lynedoch Eco Village, Lynedoch, 7603, South Africa //*Postal:*//52 Lynedoch Eco Village, Lynedoch, 7603, South Africa //*Cell:*///+27 83 272 6791 |*Fax: *+27 86 7363302 *Email:*[hidden email].za_ [hidden email] | _immob19@gmail.com_ [hidden email]| [hidden email] [hidden email] _*Internet:*_http://www.blecher.co.za/_

Contact me: [hidden email] immoblecher

<http://www.linkedin.com/pub/immo-blecher/30/414/b8>

    

Please consider your environmental responsibility. Before printing this e-mail message, ask yourself whether you really need a hard copy.

IMPORTANT: The contents of this email and any attachments are confidential. They are intended for the named recipient(s) only. If you have received this email by mistake, please notify the sender immediately and do not disclose the contents to anyone or make copies thereof.



_______________________________________________
qgis-za-user mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/qgis-za-user

_______________________________________________
qgis-za-user mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/qgis-za-user

--

Immo F. Blecher
Street:
52 Lynedoch Eco Village, Lynedoch, 7603, South Africa
Postal: 52 Lynedoch Eco Village, Lynedoch, 7603, South Africa
Cell: +27 83 272 6791 | Fax: +27 86 7363302 Email: [hidden email] | [hidden email] | [hidden email]
Internet: http://www.blecher.co.za/

Contact me: [hidden email] immoblecher

Please consider your environmental responsibility. Before printing this e-mail message, ask yourself whether you really need a hard copy.

IMPORTANT: The contents of this email and any attachments are confidential. They are intended for the named recipient(s) only. If you have received this email by mistake, please notify the sender immediately and do not disclose the contents to anyone or make copies thereof.


_______________________________________________
qgis-za-user mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/qgis-za-user
Reply | Threaded
Open this post in threaded view
|

Re: QGIS Legend Problem

QGIS-za-user mailing list
In reply to this post by QGIS-za-user mailing list

Hi All,

Attached a much smaller ZIP file with Shapefiles :-[. It has only a few polygons.

Regards

Immo


On 17/07/2017 14:45, Dean Ollis via qgis-za-user wrote:
Hi, Immo

Could you send us a copy of the layer you are trying to render with a legend, or a clipped section of the layer? That will help with the testing...

Thanks

Dean

------------------------------------------------------------------
Dean Ollis
Freshwater Research Centre
Kommetjie, Cape Town
CELL: 072 377 7006

-------- Original Message --------
Subject: Re: [QGIS-ZA-user] QGIS Legend Problem
From: Immo Blecher via qgis-za-user [hidden email]
To: South Africa QGIS user group [hidden email]
Cc: Immo Blecher [hidden email]
Date: 17/07/2017 14:23

Sorry Frank, I realised later that I did not send that info. Here it is:

QGIS version

    

2.18.10

    

QGIS code revision

    

59e0f78 <https://github.com/qgis/QGIS/commit/59e0f78>

Compiled against Qt

    

4.8.7

    

Running against Qt

    

4.8.7

Compiled against GDAL/OGR

    

1.11.3

    

Running against GDAL/OGR

    

1.11.3

Compiled against GEOS

    

3.5.0-CAPI-1.9.0

    

Running against GEOS

    

3.5.0-CAPI-1.9.0 r4084

PostgreSQL Client Version

    

9.5.2

    

SpatiaLite Version

    

4.3.0a

QWT Version

    

5.2.3

    

PROJ.4 Version

    

492

QScintilla2 Version

    

2.9.1

    
    


And I run it under Ubuntu 16.04 LTS

Thanks
Immo

On 17/07/2017 14:19, Frank Sokolic via qgis-za-user wrote:
Hi Immo,

Which version of QGIS are you using?

Frank.

On 17/07/2017 09:48, Immo Blecher via qgis-za-user wrote:

Good Morning Everyone,

I have a geology layer with a few columns, including the chronostratigraphic symbol, the rock type description and, importantly, a colour column (String type). The values stored in the colour column are the HTML hex values for the colour according to the 1 : 1 000 000 simplified geological map of South Africa.

When I open the layer and select the colour column for colouring the lithological units it works beautifully, but I do not get a legend for the composer. But if I set the Properties|Style to Categorized and then again select the colour from the Colour column in the table I also get the same nicely coloured map according to the colour column, an a Legend. But the Legend is wrong...it chooses random colours! What am I doing wrong? Is there a way to get a correct legend, also only showing the units which are actually on the map in the composer. I can set the colours manually to match the value in the colour field but that sort of defeats the purpose.

Thanks for your help so long,

Immo

-- 

*Immo F. Blecher**Street: */52 Lynedoch Eco Village, Lynedoch, 7603, South Africa //*Postal:*//52 Lynedoch Eco Village, Lynedoch, 7603, South Africa //*Cell:*///+27 83 272 6791 |*Fax: *+27 86 7363302 *Email:*[hidden email].za_ [hidden email] | _immob19@gmail.com_ [hidden email]| [hidden email] [hidden email] _*Internet:*_http://www.blecher.co.za/_




_______________________________________________
qgis-za-user mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/qgis-za-user



_______________________________________________
qgis-za-user mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/qgis-za-user

-- 

*Immo F. Blecher**Street: */52 Lynedoch Eco Village, Lynedoch, 7603, South Africa //*Postal:*//52 Lynedoch Eco Village, Lynedoch, 7603, South Africa //*Cell:*///+27 83 272 6791 |*Fax: *+27 86 7363302 *Email:*[hidden email].za_ [hidden email] | _immob19@gmail.com_ [hidden email]| [hidden email] [hidden email] _*Internet:*_http://www.blecher.co.za/_

Contact me: [hidden email] immoblecher

<http://www.linkedin.com/pub/immo-blecher/30/414/b8>

    

Please consider your environmental responsibility. Before printing this e-mail message, ask yourself whether you really need a hard copy.

IMPORTANT: The contents of this email and any attachments are confidential. They are intended for the named recipient(s) only. If you have received this email by mistake, please notify the sender immediately and do not disclose the contents to anyone or make copies thereof.



_______________________________________________
qgis-za-user mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/qgis-za-user

_______________________________________________
qgis-za-user mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/qgis-za-user

--

Immo F. Blecher
Street:
52 Lynedoch Eco Village, Lynedoch, 7603, South Africa
Postal: 52 Lynedoch Eco Village, Lynedoch, 7603, South Africa
Cell: +27 83 272 6791 | Fax: +27 86 7363302 Email: [hidden email] | [hidden email] | [hidden email]
Internet: http://www.blecher.co.za/

Contact me: [hidden email] immoblecher

Please consider your environmental responsibility. Before printing this e-mail message, ask yourself whether you really need a hard copy.

IMPORTANT: The contents of this email and any attachments are confidential. They are intended for the named recipient(s) only. If you have received this email by mistake, please notify the sender immediately and do not disclose the contents to anyone or make copies thereof.


_______________________________________________
qgis-za-user mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/qgis-za-user

Lithology.zip (41K) Download Attachment
immo.vcf (317 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: QGIS Legend Problem

QGIS-za-user mailing list
Hi, Immo

I experience the same behaviour you describe...I am able to get the
colours to display correctly on the map (using data-defined override and
referring to the "colour" column) but cannot get the legend to show the
correct colours without manually editing the legend. I tried on both
QGIS 2.14.16 on Ubuntu 16.04 and QGIS 2.18.10 on Widows 7. Looks like
this issue is a known one - see here:

https://issues.qgis.org/issues/11491

Best work-around for the moment, if it is a dataset you use a lot, seems
to be to manually sort the legend out and then save the style for future
use in other projects.

Perhaps you should add this to the feature requests for QGIS??

Dean

-------- Original Message --------
Subject: Re: [QGIS-ZA-user] QGIS Legend Problem
From: Immo Blecher <[hidden email]>
To: South Africa QGIS user group <[hidden email]>
Cc: Dean Ollis <[hidden email]>
Date: 17/07/2017 15:22

>
> Hi All,
>
> Attached a much smaller ZIP file with Shapefiles :-[. It has only a
> few polygons.
>
> Regards
>
> Immo
>
>
> On 17/07/2017 14:45, Dean Ollis via qgis-za-user wrote:
>> Hi, Immo
>>
>> Could you send us a copy of the layer you are trying to render with a
>> legend, or a clipped section of the layer? That will help with the
>> testing...
>>
>> Thanks
>>
>> Dean
>>
>> ------------------------------------------------------------------
>> Dean Ollis
>> Freshwater Research Centre
>> Kommetjie, Cape Town
>> CELL: 072 377 7006
>>
>> -------- Original Message --------
>> Subject: Re: [QGIS-ZA-user] QGIS Legend Problem
>> From: Immo Blecher via qgis-za-user <[hidden email]>
>> To: South Africa QGIS user group <[hidden email]>
>> Cc: Immo Blecher <[hidden email]>
>> Date: 17/07/2017 14:23
>>>
>>> Sorry Frank, I realised later that I did not send that info. Here it
>>> is:
>>>
>>> QGIS version
>>>
>>>
>>>
>>> 2.18.10
>>>
>>>
>>>
>>> QGIS code revision
>>>
>>>
>>>
>>> 59e0f78 <https://github.com/qgis/QGIS/commit/59e0f78>
>>>
>>> Compiled against Qt
>>>
>>>
>>>
>>> 4.8.7
>>>
>>>
>>>
>>> Running against Qt
>>>
>>>
>>>
>>> 4.8.7
>>>
>>> Compiled against GDAL/OGR
>>>
>>>
>>>
>>> 1.11.3
>>>
>>>
>>>
>>> Running against GDAL/OGR
>>>
>>>
>>>
>>> 1.11.3
>>>
>>> Compiled against GEOS
>>>
>>>
>>>
>>> 3.5.0-CAPI-1.9.0
>>>
>>>
>>>
>>> Running against GEOS
>>>
>>>
>>>
>>> 3.5.0-CAPI-1.9.0 r4084
>>>
>>> PostgreSQL Client Version
>>>
>>>
>>>
>>> 9.5.2
>>>
>>>
>>>
>>> SpatiaLite Version
>>>
>>>
>>>
>>> 4.3.0a
>>>
>>> QWT Version
>>>
>>>
>>>
>>> 5.2.3
>>>
>>>
>>>
>>> PROJ.4 Version
>>>
>>>
>>>
>>> 492
>>>
>>> QScintilla2 Version
>>>
>>>
>>>
>>> 2.9.1
>>>
>>>
>>>
>>>
>>>
>>> And I run it under Ubuntu 16.04 LTS
>>>
>>> Thanks
>>> Immo
>>>
>>> On 17/07/2017 14:19, Frank Sokolic via qgis-za-user wrote:
>>>> Hi Immo,
>>>>
>>>> Which version of QGIS are you using?
>>>>
>>>> Frank.
>>>>
>>>> On 17/07/2017 09:48, Immo Blecher via qgis-za-user wrote:
>>>>>
>>>>> Good Morning Everyone,
>>>>>
>>>>> I have a geology layer with a few columns, including the
>>>>> chronostratigraphic symbol, the rock type description and,
>>>>> importantly, a colour column (String type). The values stored in
>>>>> the colour column are the HTML hex values for the colour according
>>>>> to the 1 : 1 000 000 simplified geological map of South Africa.
>>>>>
>>>>> When I open the layer and select the colour column for colouring
>>>>> the lithological units it works beautifully, but I do not get a
>>>>> legend for the composer. But if I set the Properties|Style to
>>>>> Categorized and then again select the colour from the Colour
>>>>> column in the table I also get the same nicely coloured map
>>>>> according to the colour column, an a Legend. But the Legend is
>>>>> wrong...it chooses random colours! What am I doing wrong? Is there
>>>>> a way to get a correct legend, also only showing the units which
>>>>> are actually on the map in the composer. I can set the colours
>>>>> manually to match the value in the colour field but that sort of
>>>>> defeats the purpose.
>>>>>
>>>>> Thanks for your help so long,
>>>>>
>>>>> Immo
>>>>>
>>>>> --
>>>>>
>>>>> *Immo F. Blecher**Street: */52 Lynedoch Eco Village, Lynedoch,
>>>>> 7603, South Africa //*Postal:*//52 Lynedoch Eco Village, Lynedoch,
>>>>> 7603, South Africa //*Cell:*///+27 83 272 6791 |*Fax: *+27 86
>>>>> 7363302 *Email:*[hidden email].za_ <mailto:[hidden email]> |
>>>>> _immob19@gmail.com_ <mailto:[hidden email]>|
>>>>> [hidden email] <mailto:[hidden email]>
>>>>> _*Internet:*_http://www.blecher.co.za/_
>>>>>
>>>>>
>>>>>
>>>>>
>>>>> _______________________________________________
>>>>> qgis-za-user mailing list
>>>>> [hidden email]
>>>>> https://lists.osgeo.org/mailman/listinfo/qgis-za-user
>>>>
>>>>
>>>>
>>>> _______________________________________________
>>>> qgis-za-user mailing list
>>>> [hidden email]
>>>> https://lists.osgeo.org/mailman/listinfo/qgis-za-user
>>>
>>> --
>>>
>>> *Immo F. Blecher**Street: */52 Lynedoch Eco Village, Lynedoch, 7603,
>>> South Africa //*Postal:*//52 Lynedoch Eco Village, Lynedoch, 7603,
>>> South Africa //*Cell:*///+27 83 272 6791 |*Fax: *+27 86 7363302
>>> *Email:*[hidden email].za_ <mailto:[hidden email]> |
>>> _immob19@gmail.com_ <mailto:[hidden email]>|
>>> [hidden email] <mailto:[hidden email]>
>>> _*Internet:*_http://www.blecher.co.za/_
>>>
>>> Contact me: [hidden email] immoblecher
>>>
>>> <http://www.linkedin.com/pub/immo-blecher/30/414/b8>
>>>
>>>
>>>
>>> Please consider your environmental responsibility. Before printing
>>> this e-mail message, ask yourself whether you really need a hard copy.
>>>
>>> IMPORTANT: The contents of this email and any attachments are
>>> confidential. They are intended for the named recipient(s) only. If
>>> you have received this email by mistake, please notify the sender
>>> immediately and do not disclose the contents to anyone or make
>>> copies thereof.
>>>
>>>
>>>
>>> _______________________________________________
>>> qgis-za-user mailing list
>>> [hidden email]
>>> https://lists.osgeo.org/mailman/listinfo/qgis-za-user
>>
>> _______________________________________________
>> qgis-za-user mailing list
>> [hidden email]
>> https://lists.osgeo.org/mailman/listinfo/qgis-za-user
>
> --
>
> *Immo F. Blecher**
> Street: */52 Lynedoch Eco Village, Lynedoch, 7603, South Africa
> //*Postal:*//52 Lynedoch Eco Village, Lynedoch, 7603, South Africa
> //*Cell:*///+27 83 272 6791 |*Fax: *+27 86 7363302
> *Email:*[hidden email].za_ <mailto:[hidden email]> |
> _immob19@gmail.com_ <mailto:[hidden email]>| [hidden email]
> <mailto:[hidden email]>
> _*Internet:*_http://www.blecher.co.za/_
>
> Contact me: [hidden email] immoblecher
>
> <http://www.linkedin.com/pub/immo-blecher/30/414/b8>
>
>
>
> Please consider your environmental responsibility. Before printing
> this e-mail message, ask yourself whether you really need a hard copy.
>
> IMPORTANT: The contents of this email and any attachments are
> confidential. They are intended for the named recipient(s) only. If
> you have received this email by mistake, please notify the sender
> immediately and do not disclose the contents to anyone or make copies
> thereof.
>

_______________________________________________
qgis-za-user mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/qgis-za-user
Reply | Threaded
Open this post in threaded view
|

Re: QGIS Legend Problem

QGIS-za-user mailing list

Good Morning Everyone,

With all the users who have tested so far we could assess the following:

  1. If you go to the layer properties and choose the "Categorized" style and the "Colour" column, without doing any classification before that then it shows the correct colour on the map and also the legend. The problem with that is that you then have only the hex colours in your legend and still need to look up each "Chronostra" code in the table to insert it into the legend...same work as setting the colour manually. The other problem is that e.g. "Rc" and "Rw" have the same colour, but are different lithologies (although they are related), and therefore show only once in the legend, but both "Rc" and "Rw" should show in the legend (with the same colour).
  2. If you use "Categorized" and choose the "Chronostra" column and then go to "Symbol|Simple Fill" and set the colour to the "Colour" field then you get the correct colours on the map, but the legend colours are wrong (but at least you have all the "Chronostra" items in your legend.

I will lodge this as a bug as all the options are there to set the colours and legend, but it does not produce the correct results.

I would also like to request a feature on the attribute tables, which one can put on the composer. It would be a great advantage if one could colour rows or columns or just cells according to the value they represent. So one could colour the cell with the "Chronostra" text according to the colour field! (Another great way of displaying table info as a legend.

Regards

Immo

On 17/07/2017 22:11, Dean Ollis via qgis-za-user wrote:
Hi, Immo

I experience the same behaviour you describe...I am able to get the colours to display correctly on the map (using data-defined override and referring to the "colour" column) but cannot get the legend to show the correct colours without manually editing the legend. I tried on both QGIS 2.14.16 on Ubuntu 16.04 and QGIS 2.18.10 on Widows 7. Looks like this issue is a known one - see here:

https://issues.qgis.org/issues/11491

Best work-around for the moment, if it is a dataset you use a lot, seems to be to manually sort the legend out and then save the style for future use in other projects.

Perhaps you should add this to the feature requests for QGIS??

Dean

-------- Original Message --------
Subject: Re: [QGIS-ZA-user] QGIS Legend Problem
From: Immo Blecher [hidden email]
To: South Africa QGIS user group [hidden email]
Cc: Dean Ollis [hidden email]
Date: 17/07/2017 15:22

Hi All,

Attached a much smaller ZIP file with Shapefiles :-[. It has only a few polygons.

Regards

Immo


On 17/07/2017 14:45, Dean Ollis via qgis-za-user wrote:
Hi, Immo

Could you send us a copy of the layer you are trying to render with a legend, or a clipped section of the layer? That will help with the testing...

Thanks

Dean

------------------------------------------------------------------
Dean Ollis
Freshwater Research Centre
Kommetjie, Cape Town
CELL: 072 377 7006

-------- Original Message --------
Subject: Re: [QGIS-ZA-user] QGIS Legend Problem
From: Immo Blecher via qgis-za-user [hidden email]
To: South Africa QGIS user group [hidden email]
Cc: Immo Blecher [hidden email]
Date: 17/07/2017 14:23

Sorry Frank, I realised later that I did not send that info. Here it is:

QGIS version



2.18.10



QGIS code revision



59e0f78 <https://github.com/qgis/QGIS/commit/59e0f78>

Compiled against Qt



4.8.7



Running against Qt



4.8.7

Compiled against GDAL/OGR



1.11.3



Running against GDAL/OGR



1.11.3

Compiled against GEOS



3.5.0-CAPI-1.9.0



Running against GEOS



3.5.0-CAPI-1.9.0 r4084

PostgreSQL Client Version



9.5.2



SpatiaLite Version



4.3.0a

QWT Version



5.2.3



PROJ.4 Version



492

QScintilla2 Version



2.9.1





And I run it under Ubuntu 16.04 LTS

Thanks
Immo

On 17/07/2017 14:19, Frank Sokolic via qgis-za-user wrote:
Hi Immo,

Which version of QGIS are you using?

Frank.

On 17/07/2017 09:48, Immo Blecher via qgis-za-user wrote:

Good Morning Everyone,

I have a geology layer with a few columns, including the chronostratigraphic symbol, the rock type description and, importantly, a colour column (String type). The values stored in the colour column are the HTML hex values for the colour according to the 1 : 1 000 000 simplified geological map of South Africa.

When I open the layer and select the colour column for colouring the lithological units it works beautifully, but I do not get a legend for the composer. But if I set the Properties|Style to Categorized and then again select the colour from the Colour column in the table I also get the same nicely coloured map according to the colour column, an a Legend. But the Legend is wrong...it chooses random colours! What am I doing wrong? Is there a way to get a correct legend, also only showing the units which are actually on the map in the composer. I can set the colours manually to match the value in the colour field but that sort of defeats the purpose.

Thanks for your help so long,

Immo

-- 

*Immo F. Blecher**Street: */52 Lynedoch Eco Village, Lynedoch, 7603, South Africa //*Postal:*//52 Lynedoch Eco Village, Lynedoch, 7603, South Africa //*Cell:*///+27 83 272 6791 |*Fax: *+27 86 7363302 *Email:*[hidden email].za_ [hidden email] | _immob19@gmail.com_ [hidden email]| [hidden email] [hidden email] _*Internet:*_http://www.blecher.co.za/_




_______________________________________________
qgis-za-user mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/qgis-za-user



_______________________________________________
qgis-za-user mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/qgis-za-user

-- 

*Immo F. Blecher**Street: */52 Lynedoch Eco Village, Lynedoch, 7603, South Africa //*Postal:*//52 Lynedoch Eco Village, Lynedoch, 7603, South Africa //*Cell:*///+27 83 272 6791 |*Fax: *+27 86 7363302 *Email:*[hidden email].za_ [hidden email] | _immob19@gmail.com_ [hidden email]| [hidden email] [hidden email] _*Internet:*_http://www.blecher.co.za/_

Contact me: [hidden email] immoblecher

<http://www.linkedin.com/pub/immo-blecher/30/414/b8>



Please consider your environmental responsibility. Before printing this e-mail message, ask yourself whether you really need a hard copy.

IMPORTANT: The contents of this email and any attachments are confidential. They are intended for the named recipient(s) only. If you have received this email by mistake, please notify the sender immediately and do not disclose the contents to anyone or make copies thereof.



_______________________________________________
qgis-za-user mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/qgis-za-user

_______________________________________________
qgis-za-user mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/qgis-za-user

-- 

*Immo F. Blecher**
Street: */52 Lynedoch Eco Village, Lynedoch, 7603, South Africa
//*Postal:*//52 Lynedoch Eco Village, Lynedoch, 7603, South Africa
//*Cell:*///+27 83 272 6791 |*Fax: *+27 86 7363302 *Email:*[hidden email].za_ [hidden email] | _immob19@gmail.com_ [hidden email]| [hidden email] [hidden email]
_*Internet:*_http://www.blecher.co.za/_

Contact me: [hidden email] immoblecher

<http://www.linkedin.com/pub/immo-blecher/30/414/b8>

    

Please consider your environmental responsibility. Before printing this e-mail message, ask yourself whether you really need a hard copy.

IMPORTANT: The contents of this email and any attachments are confidential. They are intended for the named recipient(s) only. If you have received this email by mistake, please notify the sender immediately and do not disclose the contents to anyone or make copies thereof.


_______________________________________________
qgis-za-user mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/qgis-za-user

--

Immo F. Blecher
Street:
52 Lynedoch Eco Village, Lynedoch, 7603, South Africa
Postal: 52 Lynedoch Eco Village, Lynedoch, 7603, South Africa
Cell: +27 83 272 6791 | Fax: +27 86 7363302 Email: [hidden email] | [hidden email] | [hidden email]
Internet: http://www.blecher.co.za/

Contact me: [hidden email] immoblecher

Please consider your environmental responsibility. Before printing this e-mail message, ask yourself whether you really need a hard copy.

IMPORTANT: The contents of this email and any attachments are confidential. They are intended for the named recipient(s) only. If you have received this email by mistake, please notify the sender immediately and do not disclose the contents to anyone or make copies thereof.


_______________________________________________
qgis-za-user mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/qgis-za-user
Reply | Threaded
Open this post in threaded view
|

Re: QGIS Legend Problem

QGIS-za-user mailing list
In reply to this post by QGIS-za-user mailing list

Hi, I had this problem some time ago and it was raised as a QGIS bug that needed fixing because if you set the style programmatically using the colour codes it just gives a black legend.  Not sure if it has been fixed yet – it appears to be a problem with all GIS and all geological maps.

Here is a style file using the colour codes with no legend

 

and another that was done manually be editing the style file in notepad++

It uses the typical Gauteng Geology map and its colours and I summarised the geology map to minimise the pain

 

Maybe if you follow its logic you may be able to do one that suits your purpose

 

Regards

 

 

Arthur Taute
Chief Technical Principal, Pavements and Toll Roads
M +27 83 274 8885   T +27 12 481 3821

From: qgis-za-user [mailto:[hidden email]] On Behalf Of Immo Blecher via qgis-za-user
Sent: 17 July 2017 03:22 PM
To: South Africa QGIS user group <[hidden email]>
Cc: Immo Blecher <[hidden email]>
Subject: Re: [QGIS-ZA-user] QGIS Legend Problem

 

Hi All,

Attached a much smaller ZIP file with Shapefiles :-[. It has only a few polygons.

Regards

Immo

 

On 17/07/2017 14:45, Dean Ollis via qgis-za-user wrote:

Hi, Immo

Could you send us a copy of the layer you are trying to render with a legend, or a clipped section of the layer? That will help with the testing...

Thanks

Dean

------------------------------------------------------------------
Dean Ollis
Freshwater Research Centre
Kommetjie, Cape Town
CELL: 072 377 7006

-------- Original Message --------
Subject: Re: [QGIS-ZA-user] QGIS Legend Problem
From: Immo Blecher via qgis-za-user [hidden email]
To: South Africa QGIS user group [hidden email]
Cc: Immo Blecher [hidden email]
Date: 17/07/2017 14:23


Sorry Frank, I realised later that I did not send that info. Here it is:

QGIS version

    

2.18.10

    

QGIS code revision

    

59e0f78 <https://github.com/qgis/QGIS/commit/59e0f78>

Compiled against Qt

    

4.8.7

    

Running against Qt

    

4.8.7

Compiled against GDAL/OGR

    

1.11.3

    

Running against GDAL/OGR

    

1.11.3

Compiled against GEOS

    

3.5.0-CAPI-1.9.0

    

Running against GEOS

    

3.5.0-CAPI-1.9.0 r4084

PostgreSQL Client Version

    

9.5.2

    

SpatiaLite Version

    

4.3.0a

QWT Version

    

5.2.3

    

PROJ.4 Version

    

492

QScintilla2 Version

    

2.9.1

    
    


And I run it under Ubuntu 16.04 LTS

Thanks
Immo

On 17/07/2017 14:19, Frank Sokolic via qgis-za-user wrote:

Hi Immo,

Which version of QGIS are you using?

Frank.

On 17/07/2017 09:48, Immo Blecher via qgis-za-user wrote:


Good Morning Everyone,

I have a geology layer with a few columns, including the chronostratigraphic symbol, the rock type description and, importantly, a colour column (String type). The values stored in the colour column are the HTML hex values for the colour according to the 1 : 1 000 000 simplified geological map of South Africa.

When I open the layer and select the colour column for colouring the lithological units it works beautifully, but I do not get a legend for the composer. But if I set the Properties|Style to Categorized and then again select the colour from the Colour column in the table I also get the same nicely coloured map according to the colour column, an a Legend. But the Legend is wrong...it chooses random colours! What am I doing wrong? Is there a way to get a correct legend, also only showing the units which are actually on the map in the composer. I can set the colours manually to match the value in the colour field but that sort of defeats the purpose.

Thanks for your help so long,

Immo

-- 

*Immo F. Blecher**Street: */52 Lynedoch Eco Village, Lynedoch, 7603, South Africa //*Postal:*//52 Lynedoch Eco Village, Lynedoch, 7603, South Africa //*Cell:*///+27 83 272 6791 |*Fax: *+27 86 7363302 *Email:*[hidden email].za_ [hidden email] | _immob19@gmail.com_ [hidden email]| [hidden email] [hidden email] _*Internet:*_http://www.blecher.co.za/_




_______________________________________________
qgis-za-user mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/qgis-za-user




_______________________________________________
qgis-za-user mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/qgis-za-user


-- 

*Immo F. Blecher**Street: */52 Lynedoch Eco Village, Lynedoch, 7603, South Africa //*Postal:*//52 Lynedoch Eco Village, Lynedoch, 7603, South Africa //*Cell:*///+27 83 272 6791 |*Fax: *+27 86 7363302 *Email:*[hidden email].za_ [hidden email] | _immob19@gmail.com_ [hidden email]| [hidden email] [hidden email] _*Internet:*_http://www.blecher.co.za/_

Contact me: [hidden email] immoblecher

<http://www.linkedin.com/pub/immo-blecher/30/414/b8>

    

Please consider your environmental responsibility. Before printing this e-mail message, ask yourself whether you really need a hard copy.

IMPORTANT: The contents of this email and any attachments are confidential. They are intended for the named recipient(s) only. If you have received this email by mistake, please notify the sender immediately and do not disclose the contents to anyone or make copies thereof.



_______________________________________________
qgis-za-user mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/qgis-za-user


_______________________________________________
qgis-za-user mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/qgis-za-user

 

--

Immo F. Blecher
Street:
52 Lynedoch Eco Village, Lynedoch, 7603, South Africa
Postal: 52 Lynedoch Eco Village, Lynedoch, 7603, South Africa
Cell: +27 83 272 6791 | Fax: +27 86 7363302 Email: [hidden email] | [hidden email] | [hidden email]
Internet: http://www.blecher.co.za/

Contact me: Image removed by sender.[hidden email] Image removed by sender.immoblecher

Image removed by sender.

Image removed by sender.

Please consider your environmental responsibility. Before printing this e-mail message, ask yourself whether you really need a hard copy.

IMPORTANT: The contents of this email and any attachments are confidential. They are intended for the named recipient(s) only. If you have received this email by mistake, please notify the sender immediately and do not disclose the contents to anyone or make copies thereof.

Image removed by sender.


_____________________________________________________________________
This e-mail has been scanned for viruses by Symantec.Cloud.


_______________________________________________
qgis-za-user mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/qgis-za-user

GeologyColours.qml (25K) Download Attachment
GeologyColours-C.qml (274K) Download Attachment