[Qgis-user] Categorised Styling of PostGIS layers

McDonaldR McDonaldR at angus.gov.uk
Fri May 30 04:47:00 PDT 2014


Hi Alexandre, Brent

Thanks for the pointers.

Rules based renderer failed but it work on the same data in different format.

Going back to the source data (ESRI FGDB) and checking PostGIS I noticed the prob field was set to char(50).  I reloaded the data with the field as varchar(50) and it now renders correctly although I still get the extra category added – presumably to catch blank records.

With the data as char(50) categorisation works if I set the field with an expression like, TRIM(“prob”), as it then strips of the 49 blank spaces after the H.  Varchar is better though as the table is smaller.

Many thanks

Ross



From: Alexandre Neto [mailto:senhor.neto at gmail.com]
Sent: 30 May 2014 12:01
To: McDonaldR
Cc: QGIS User
Subject: Re: [Qgis-user] Categorised Styling of PostGIS layers

Somehow QGIS is not finding any of those 3 values in the features in that extent. Can you select a few visible (pink) features  and check their probability field values?

Are you sure that all you features have valid values in the prob column?

Try build that same stack of symbols using rule-based symbology. And see if it works.

You can also try save a few features in other format, say a shapefile, open it and copy the style. See if it works there (I doubt).

Not having access to the data, is quite difficult to understand what can be wrong, if you can provide a sample data, I can give a look into it.

Alexandre Neto

On Fri, May 30, 2014 at 11:35 AM, McDonaldR <McDonaldR at angus.gov.uk<mailto:McDonaldR at angus.gov.uk>> wrote:
Morning all,

I'm trying to style some flooding probability data.  It's in PostGIS and I'm using QGIS master (same issue in 2.0 and 2.2 though).  My polygon layer has a probability field with values H, M and L.  If I select a categorised style using the probability field I get the expected three values.  And an extra one.  And the data is drawn using the style of the extra category - in the screenshot the pink lines and not the blues as expected.  If I delete the extra category from the classification table then nothing is drawn on the canvas.  I have checked the field and there are only three unique values in it without nulls or blanks.  The table is properly indexed with a primary key and GIST spatial index.

So, is it a QGIS style engine problem or a PostGIS data problem?  I should add that the same data from PostGIS draws perfectly in ArcGIS 10.2.2 and is styled as expected.

Anyone else had similar experiences?

[If the screenshot is scrubbed by the list then you can see it here: http://openphoto.mixedbredie.net/photo/96/view]





Ross McDonald | GIS Data Coordinator | Resources Department, IT Division | Angus Council, Angus House, Orchardbank Business Park, Forfar, DD8 1AT
T: 01307 476419 | F: 01307 476401 | E: mcdonaldr at angus.gov.uk<mailto:mcdonaldr at angus.gov.uk> | W: Angus Maps<http://www.angus.gov.uk/maps/map_home.cfm>


This message is strictly confidential. If you have received this in error, please inform the sender and remove it from your system. If received in error you may not copy, print, forward or use it or any attachment in any way. This message is not capable of creating a legal contract or a binding representation and does not represent the views of Angus Council. Emails may be monitored for security and network management reasons.  Messages containing inappropriate content may be intercepted. Angus Council does not accept any liability for any harm that may be caused to the recipient system or data on it by this message or any attachment.

_______________________________________________
Qgis-user mailing list
Qgis-user at lists.osgeo.org<mailto:Qgis-user at lists.osgeo.org>
http://lists.osgeo.org/mailman/listinfo/qgis-user
 
This message is strictly confidential. If you have received this in error, please inform the sender and remove it from your system. If received in error you may not copy, print, forward or use it or any attachment in any way. This message is not capable of creating a legal contract or a binding representation and does not represent the views of Angus Council. Emails may be monitored for security and network management reasons.  Messages containing inappropriate content may be intercepted. Angus Council does not accept any liability for any harm that may be caused to the recipient system or data on it by this message or any attachment.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-user/attachments/20140530/90aaf329/attachment.html>


More information about the Qgis-user mailing list