Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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?



share|improve this question

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.

share|improve this answer
Concur. There's a discussion here - - and if you want the dbase file specs, they're here: - it can only store 8 bytes in a double (I'm guessing that's what a "real" is). Try using SpatiaLite. – GIS-Jonathan Apr 16 '12 at 10:20

Your Answer


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

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