I created the Qmarxan plugin using the fTools plugin as an example base. When I create a new shapefile using the QgsVectorFileWriter function I don't have any difficulty specifying a "Real" field with a width of 24 and a precision of 15. However when adding fields to an existing shapefile the addAttribute call to to a vector layer complains if the field is specified with a length greater than 20 and a precision greater that 5.

Can anyone tell me why this limitation exists and how get around it?




That's the Shapefile (or dbf) standard if I'm not mistaken. The GUI for creating a new Shapefile has the same restrictions.

You'll have to change to a different vector format if you want/need that kind of fields.


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.