|
On 11/05/2012 06:42 PM, Ramon Andiñach
wrote:
US Census data:Hi Lee, I don't have an answer, but I have seen similar things if I've been editing the strings and then go into the attribute table without saving first.Is it possible to post a bit of your shape file somewhere for those that know what they're doing to look at? This may help. -ramon. Download page: http://www.census.gov/geo/maps-data/data/tiger-data.html Direct download of specific shapefile: http://www2.census.gov/geo/tiger/TIGER2010DP1/State_2010Census_DP1.zip The operation I was doing is turning the age 65 count into a percentage with the following formula: 100.0 * "DP0070001" / "DP0010001" The reason for the 100.0 is to force the field calculator to do a floating point operation. Otherwise, integer division causes the outcome to always be 0. Would be curious if others can reproduce, since I no longer can. Basically, use field calculator to create the new field and calculate value at the same time, then try to save the result. If the field precision is set high (not sure of the exact cutoff) QGIS creates the field as a double instead of real. I thought this might be contributing to the problem, but at this point it seems to be working whether the field is created as double or real. --Lee -- Lee Hachadoorian Assistant Professor in Geography, Dartmouth College http://freecity.commons.gc.cuny.edu |
_______________________________________________ Qgis-user mailing list [email protected] http://lists.osgeo.org/mailman/listinfo/qgis-user
