I have a shapefile I made in QGIS 1.7.4. One of the fields is a String of length 80. I'd like to make the field accept longer stings, but I can't figure out how to change its length. How do I do this?
Thanks.
|
|
|
Here is a solution which surprised me that it worked!!! Warning: first make a backup.This is an experiment though it worked for me just now.. open the .dbf of the particular shapefile using OpenOffice Calc application. Change value from 80 to whatever value you want. Please see the image below. Surprising thing is these field definitions were not visible in Excel..Advantage of being Open!!
|
|||||||||||||||
|
|
To my knowledge, you cannot alter the length of shapefile fields in QGIS. Recommend creating a new field:
If there is already data in the old field, use field calculator to populate the new field:
|
||||
|
|
|
I've just done this in Excel. open the dbf in Excel, right click the column header you want to change and select Column Width. Change to the length you need, then save as a dbf. Seemed to work OK for me. |
|||||||||
|