5

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?

  • As a workaround you might try point polygons. – johns Mar 10 '15 at 17:51
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!

  • 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 Mar 5 '15 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 Mar 5 '15 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 Mar 8 '15 at 6:48
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.

1

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?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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