0

I may be doing something obviously wrong, but I'm trying to convert a landuse polygon to a raster file for later use in QGIS 2.18.14. I've used the Rasterize function within QGIS succesfully previously but for this file I'm getting the following error message

'ERROR 6: One and only one of -3d, -burn or -a is required.'

Any ideas as to what may be going wrong?

  • what is your input command ? the error message is quite clear, you used 0, 2 or more parameters from this list (-3d, -burn, -a). – Hugo Roussaffa - GeoDatup Nov 8 '17 at 13:49
  • Tengo el mimo problema. Cree nuevo campo pero no los lee. – Celia Torrens Oct 12 '18 at 15:51
  • Welcome to GIS StackExchange! As a new user, please take the Tour. Note: we have a focused Q&A format, and it looks like your message is a comment that you are experiencing the same problem. Once you earn more reputation, you can comment on other people's posts, such as to ask clarifying questions about what the poster tried already. – smiller Oct 12 '18 at 17:28
  • This does not really answer the question. If you have a different question, you can ask it by clicking Ask Question. You can also add a bounty to draw more attention to this question once you have enough reputation. - From Review – Vince Oct 12 '18 at 17:51
2

I do not know what the -3D, -burn or -a are supposed to mean. But I encountered the same problem (same error message) when I tried to convert a polygon layer to raster. My uninformed guess is that it seems to have something to do with the "Attribute field" option in the "Rasterize (vector to raster)" window.

I was able to get around it when I added a new "Attribute field" to the polygon layer that had a numeric value, and could select it as "Attribute field".

Without this new field I cannot select any Attribute field (the others were text), and the error is persistent.

Maybe this information can help to shed some light on the error message in your case.

1

The QGIS rasterize tool is a GUI for the gdal_rasterize tool (instructions here)

-burn, -a, and -3d are all commands associated with the underlying tool as so:

  • -burn value: A fixed value to burn into a band for all objects. A list of -burn options can be supplied, one per band being written to.
  • -a attribute_name: Identifies an attribute field on the features to be used for a burn-in value. The value will be burned into all output bands.
  • -3d: Indicates that a burn value should be extracted from the "Z" values of the feature. As of now, only points and lines are drawn in 3D.

Given you're creating a raster from a landuse polygon using the QGIS GUI tool your error probably indicates that it can't read the attribute field that you've provided.

Try recreating the attribute field for the polygon, ensuring that nothing funny has happened to the field type

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.