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.

Mac OSX 10.6.8 QGIS 1.8.0 : Using the field calculator from the attribute table, the $area of each feature is shown nicely in the table until I try to save it, then all the values are replaced by NULL so are no longer available for use. Furthermore, if the column is left there and the field calculator asked to update it, all values remain NULL. Any fix?

share|improve this question
    
I also have this same issue running 1.8 on Ubuntu, so I don't think it's just a Mac issue. –  Jay Guarneri Apr 3 '13 at 14:24
1  
How is this data stored? PostGIS layer, shapefile, other? Do you have write permission to the data? –  HeyOverThere Apr 3 '13 at 15:00
    
shapefile. Yes I have full permission. –  johnsankey Apr 3 '13 at 15:58

2 Answers 2

up vote 2 down vote accepted

Two chances to get it right:

  • Check if the Layer CRS has metres as units, not degrees

  • Expand the width of the field. Square metres might easily exceed the limit you set. The shapefile database format is rather strict in that respect.

share|improve this answer
    
That's it! I use sq.m. because ha isn't offered as an option. The calculation is done in float with 10 decimal places, so even if the result ends up with only 6 digits, the field has to be the maximum of 20 places. –  johnsankey Apr 9 '13 at 12:15

I've experienced the same with 1.9 dev version when creating a new column and immediately writing values into it without stopping editing mode. However, when I stopped editing and turned it on again, it worked fine.

share|improve this answer

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.