enter image description hereI have multiple attributes in a vector file which is .shp that I want to convert to a raster, this is because I want to make it the same resolution of another raster file. I will then convert that raster file back to vector once I have burnt all those values I need from the vector-raster conversion. The issue is I need multiple fields and not just one.

How do I do this?enter image description here

  • I'm not sure what sense your workflow makes, probably there is a better way to achieve waht you want, but with such scarce information, it's difficult to say. For using different values to burn in, see my solution below.
    – Babel
    Aug 4, 2022 at 12:21
  • 1
    You should consider to create a multiband raster from multiple vector attributes, so every attribute will be one band in your multibandraster: tkawuah.github.io/Blog1.html
    – eurojam
    Aug 4, 2022 at 12:37
  • @eurojam Thank you so much for what you sent. This definitely looks like a potential solution to my problem. I do have one issue though. When I do the conversion for instance, of perimeter it returns back as an integer rather then a decimal, is there a way to fix this?
    – AhmedTech
    Aug 4, 2022 at 12:43

1 Answer 1


Create a new field (a virtual or a real field) that combines the fields you want to use for burn-in values the way you want using field calculator. Ten use this new field as input.

Like e.g. you have two fields v1 and v2, calculate a new field v as the sum of v1+v2. Then use this new field for rasterization.

enter image description here

enter image description here

  • Thank you for responding. I have added images to explain it better. So I originally have all these attributes. I resample the resolution by converting this into a raster, but it only allowed me to pick one of these fields. I then convert this back to vector so I get the resampled data essentially?
    – AhmedTech
    Aug 4, 2022 at 12:40
  • The above comment looks like a good way to do this. However another issue I stumble is the fact that when I do this conversions, it goes from decimal to integer and I want it in decimal? @Babel
    – AhmedTech
    Aug 4, 2022 at 12:46
  • I'm not quite sure what steps you did in detail, so it's difficult to say what happens. The field you create must be of field-type real (decimal), so the numbers will be decimals.
    – Babel
    Aug 4, 2022 at 12:57
  • Appreciate the responses @Babel, All I did was use that dataset that I got, and then convert it to a raster file normally, then convert back to vector file. What details are you looking for? The field originally was already decimals, and the conversion from vector to raster seems to automatically just take off the decimals. There is not an option for me to choose real.
    – AhmedTech
    Aug 4, 2022 at 13:03
  • I'm not sure how you proceeded. When I rasterize, I get decimal values, see the updated screenshot in my solution. So you should provide more details to be able to reproduce the behaviour you encounter.
    – Babel
    Aug 4, 2022 at 13:33

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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