How to apply a radial fill to a voronoi polygon centred on its original home point in

المشرف العام

Administrator
طاقم الإدارة
I'm working with a point layer (airports from OpenFlights), and I want to create a map of distance to the nearest airport.

I thought I might be able to do this by using radial fill on the voronoi polygons.

I created the voronoi polygons. These included the original fields from the airports layer, so I have (lat, lon) of the airport for each polygon.

When it comes to styling, I tried to create a radial fill centred on the airport. It's very easy to center on the centroid, but the centroid is nowhere near the airport in most cases.

I set up a radial fill with reference points (0.5,0.5) and (1.0,1.0), mode: reflect.

You can see here the result.. how can I centre it so the brightest point in the radial fill for each polygon aligns with its airport?



There doesn't seem to be an option to set a centre point coordinate. The data-driven option to the right of the centroid isn't for setting up a coordinate, it's a binary field for the centroid setting.

I could try computing an offset (between the centroid and the airport) but there aren't any data-driven options for the offset fields, so they would need to be set manually.

Shapeburst fill isn't suitable for this (although it does give some interesting results!)

I've also looked at raster and svg fill, but again these appear to offer no way to set the centre coordinate (I suspect they align using the bounding box)

  • Is there some way to do this with QGIS? Am I overlooking something?
  • Also, is there way to prevent QGIS from scaling the gradients to fit the bounding box? I've tried switching from 'object' to 'viewport' but the polygons all vanish.

أكثر...
 
أعلى