7

I have a polygon layer (represented by cells) and a point layer. I've used the graduated symbology with the polygon layer.

Now I'd like to export this graduated scale to the point layer. The field of classification has the same name in both layer.

I've tried to copy and paste the style but it didn't work (probably because I'm trying to export something that represent a polygon to a point).

Am I missing something?

1
  • As a workaround you might try point polygons.
    – John
    Commented Mar 10, 2015 at 17:51

3 Answers 3

4

"probably because I'm trying to export something that represent a polygon to a point"

Bingo!

  • Polygon shapefiles tend to use Fills by default with a set of styles (size, colour, etc).

Polygon symbology

  • Point shapefiles tend to use Markers by default with a set of styles (size, colour, etc).

Point symbology

So both shapefiles use a different type of symbology.

Hope this helps!

3
  • Ok, so no chances.. or is there a workaround to convert a type of symbology to another? Or simply export the values of the graduated scale and paste them to the other layer?
    – matteo
    Commented Mar 5, 2015 at 14:16
  • I don't think so and if there is then I haven't come across it. Hopefully others can advise if this is indeed possible :)
    – Joseph
    Commented Mar 5, 2015 at 15:16
  • 1
    It might be possible using python code in a plugin. I don't know any plugin that has this feature, but I have not tested them all ...
    – AndreJ
    Commented Mar 8, 2015 at 6:48
4

Use RGB mapping! Found this helpful info at the link below.

Create a CSV file that contains an RGB color associated with each polygon. In the file you'll have an ID column (this should be the same in the polygon and the point shapefile so you can link them) and 3 additional columns for "R", "G", "B". Load this into QGIS and join the CSV to your polygon and point file.

Then in QGIS, open Layer Properties >> Style Tab, and make sure Single Symbol is selected. Click the box next to the "Fill" color and choose "Edit.

You will be editing the base color of your polygon bases on RGB colors present on the data table, with a constant border color (you can apply the same criteria if needed).

After hitting "Edit" just put the 3 RGB columns names of your table using the following expression:

color_rgb("R-column","G-column","B-column")

enter image description here

Reference: Using field-to-RGB mapping for symbology in QGIS?

2

The options for saving styles are text based files, qml looks like xml format and sld looks like html. Using a text editor would allow you build a new style for your point file from the values saved from the polygon file by cut and paste.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.