4

All my units in my project are in millimeter. But I would like to switch all units to map units at once without clicking every single signature. I also would like to have the possibility to directly switch between units for the whole project.

Is there a way?

enter image description here

2
  • A Python script?
    – Zoltan
    Commented Dec 11, 2020 at 11:38
  • be careful as (usually) map unit result in a lot smaller symbol than millimeter (a big point symbol set at 10 millimeter size will be displayed as a 10 meter symbol in map unit (assuming a CRS in meter), that's 0.2mm at 1/50 000 scale...) so you probably still will need to adjust the size of all your symbol individually anyway
    – J.R
    Commented Dec 11, 2020 at 13:53

1 Answer 1

3

If you want to change everything to map units you can open the project in a text editor and do a find and replace:

Find:

v="MM"

Replace with:

v="MapUnit"

If it's just for one layer. Find the section in the project file that controls that layer. Easiest with the layer name.

Search for:

<layername>your_layer_name</layername>

Just above it will be a maplayer tag:

<maplayer simplifyAlgorithm="0" minimumScale="0" maximumScale="1e+08" simplifyDrawingHints="0" minLabelScale="0" maxLabelScale="1e+08" simplifyDrawingTol="1" readOnly="0" geometry="Point" simplifyMaxScale="1" type="vector" hasScaleBasedVisibilityFlag="0" simplifyLocal="0" scaleBasedLabelVisibilityFlag="0"\>

Which will end with an end tag:

</maplayer>

So replace all the references within those tags.

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.