polygons to centroid points on the fly

104 views
Skip to first unread message

Barrett Higman

unread,
Jan 22, 2014, 8:01:39 PM1/22/14
to australian-qg...@googlegroups.com

Hi all,

 

Is it possible through a rule-based style to tell a layer to display certain polygons as centroid points? For example I have joined a CSV of food serving premises to our property layer and I want to show those properties that link as a point on the map. I would prefer not to create a new layer entirely if I can help it (ie. not using Vector>Geometry Tools>Polygon centroids) as the CSV may change (I have a watch on it) and I would like the workspace to be dynamic.

 

I was thinking a style rule of something along the lines:

 

CASE WHEN "column1" in not null THEN centroid($geometry) END

 

Although the above doesn't give any errors it also doesn't work!

 

I'm not sure on the syntax when working with geometries, any help would be great :)

 

Cheers,

Barrett

 

 

 

Barrett Higman
GIS Officer  

(03) 5755 0555

Alpine Shire Council

ABN 14 821 390 281
Great Alpine Road, Bright
PO Box 139, Bright, VIC, 3741

This transmission is confidential. This email, including any attachments, is for the original addressees only. Any use, copying or disclosure by any other person is prohibited. If you have received this transmission in error, please delete this message and notify us by email immediately at in...@alpineshire.vic.gov.au 

 

Nathan Woodrow

unread,
Jan 22, 2014, 8:06:30 PM1/22/14
to australian-qg...@googlegroups.com
Hey Barrett,

Try something like this:

Inline image 1

That is a centroid fill only on the polygon.

- Nathan


--
You received this message because you are subscribed to the Google Groups "Australian and New Zealand QGIS User Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to australian-qgis-use...@googlegroups.com.
To post to this group, send an email to australian-qg...@googlegroups.com.
Visit this group at http://groups.google.com/group/australian-qgis-user-group.
To view this discussion on the web, visit https://groups.google.com/d/msgid/australian-qgis-user-group/DA0FBE4FCB6A7849BECA5B5950BA5A440108E07D80C4%40grimlock.alpineshire.vic.gov.au.
For more options, visit https://groups.google.com/groups/opt_out.

image.png

Barrett Higman

unread,
Jan 22, 2014, 8:18:43 PM1/22/14
to australian-qg...@googlegroups.com

Perfect.

 

I was trying to be a bit too complex! Thanks Nathan.

 

Cheers,

Barrett

 

PS. Then by adding categories to the rule-based style I can thematically map the food premises by type... damn I love QGIS!

 

 

 

 

 

Barrett Higman
GIS Officer  

(03) 5755 0555

Alpine Shire Council

ABN 14 821 390 281
Great Alpine Road, Bright
PO Box 139, Bright, VIC, 3741

This transmission is confidential. This email, including any attachments, is for the original addressees only. Any use, copying or disclosure by any other person is prohibited. If you have received this transmission in error, please delete this message and notify us by email immediately at in...@alpineshire.vic.gov.au 

 

Reply all
Reply to author
Forward
0 new messages