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 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?

Thanks

TSW

share|improve this question
add comment

1 Answer 1

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 - forums.esri.com/Thread.asp?c=9&f=85&t=253586 - and if you want the dbase file specs, they're here: dbase.com/KnowledgeBase/int/db7_file_fmt.htm - 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
add comment

Your Answer

 
discard

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.