Is it possible in QGIS to make a particular point of a custom .svg symbol coincide with the layer point position? i.e referring to the image: I would like to make the beginning of the symbol line coincide with the geographical position of the point in the layer (cross): enter image description here


If the beginning of the line starts in the middle of the .svg file, the beginning of the symbol will be where your point is positioned.

I added two photos to make it clear. First one is the .svg file, second is in QGIS:

enter image description here

enter image description here

  • So, if I understand correctly, (i.e. in inkscape) should I set a page of appropriate size and move the symbol so that the beginning of the line coincides with the center of the page? – Andrew-63 Aug 21 '18 at 13:46
  • Yes exactly. You can use auxiliary lines (hope that's the correct name, since I do not use Inkscape in English) to find the middle. – gHupf Aug 22 '18 at 7:24
  • I've tried setting document page format as square (as shown in the image of your example) in inkscape and it seems to work well. Thanks a lot!! – Andrew-63 Aug 22 '18 at 7:46

@Andrew-63, unfortunately, QGIS is not that superpowerful in the sense of visualization and symbolization.

However, in your case, I can suggest

Layer Properties > Style > SVG Marker > Anchor point

There is a possibility to edit the anchor point with custom expression, which will include [FIELD_x] and [FIELD_Y] accordingly.

Furthermore, you can play with Offset X,Y. But be careful when working with metric dimensions, since the changes that you apply to the SVG marker offset in QGIS main window will differ from the visual part in Print Composer.

And as @J.R mentioned, it is better to work with map units.

  • I suggest to set all symbology unit to map unit, that way the size and offset of symbol won't need to be adjusted each time the scale change – J.R Aug 21 '18 at 11:18
  • (Yes i'm working with map units) You say:"There is a possibility to edit the anchor point with custom expression, which will include [FIELD_x] and [FIELD_Y] accordingly.", are anchor point setting (low, center, high, left,, center, right) related to the geometry/dimensions of SVG marker? – Andrew-63 Aug 21 '18 at 13:56
  • @Andrew-63, no. – Taras Aug 22 '18 at 8:34

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.