# QGIS - Polygon - Fill only one picture (For Plan Illustrated)

I am making a plan and I would like to make it beautiful using illustrations.

I have to place some vehicles in a square and see how many fit.

I have thought about making some polygons represent these vehicles.

To make it more attractive to the eye I have thought that the filling of the polygon is an image of that type of vehicle.

For that I use the fill with raster option. My problem is that I can't control where that image is located within that polygon.

In this example I would need to upload the image so that the entire bus is biased. If I use X and Y modification the image moves but it is still cut off.

Any idea how to do it?

Do you know of videos that help to make plans of this type? (QCad could be a solution to make it more professional)

Following @BERA indications:

• When you say “plane” a few times in these questions do you mean plan?
– PolyGeo
Commented Oct 22, 2022 at 20:48
• Try calculating a new field called rotation with the formula `main_angle(\$geometry)` then convert the polygons to centroids, symbolize with Raster image marker, rotate by the field
– Bera
Commented Oct 23, 2022 at 13:43
• @BERA thank you so much for your solution.I don't know why, but the angle always fails by 90 degrees. But for me this is not a solition because I need to create another layer and solvin the problem of degrees, it's not visual to change it. Commented Oct 23, 2022 at 19:27
• You can copy the layer and use geometry generator
– Bera
Commented Oct 24, 2022 at 5:20
• @BERA Works with Geometry Generator. Now my problem is with rotation. I introduce formula "main_angle(\$geometry)" but the program only uses the value in rotation, and not evalue the formula. Any idea why? Commented Oct 28, 2022 at 16:10

Following @BERA indications, I find a solution:

First of all, using Field Calculator, I need to create a Decimal Virtual Field with the rotation of the polygon. If is virtual field, when you rotate the polygon field will be update. The rotation of polygon you can obtain with `main_angle(\$geometry)`, but I don't know why but I need to reduce with 90. So the final expression is `main_angle(\$geometry)-90`

Second in Symbology, I add a Geometry Generator - Point/Multipoint with `centroid(\$geometry)`:

Inside the Geometry Generator I add a Marker/Raster Image Marker with the picture/illustration you want to insert.

After that, I go to rotation, and I said that value to get, is the value of virtual Field called Rotation.

P.D.: My questions to @Bera, was because if I put the formula inside of this, it doesn't works, and is for this I created a virtual field.

Enjoy it!!! I thank you so much to @Bera for his help.