Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

I'm trying to convert a vector layer to a raster by using the GRASS function v.to.rast.attribute in Python.

My code doesn't throw any error but the raster image is only a square of 1px. But when I'm using it through the Modeler, everything is fine.

Surely the parameters of the function aren't correct or something like that, but I can't find out what... Any idea?

raster = sextante.runalg('grass:v.to.rast.attribute', input, 0, class_field, 0.0, 0.5, -1.0, 0.0001, None)

Note: The input is a vector layer and the class_field is the field chosen by the user.

share|improve this question
add comment

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.