I have a shapefile for which I would like to add the values in a column. As the sum exceed the capacity of an integer, I need to cast values to a float. I tried the following:
ogrinfo -sql "SELECT sum(cast(POP as float(10,0))) FROM Settlement_points" Settlement_points.shp
ogrinfo returns error messages like:
ERROR 1: Invalid index : -1 More than 1000 errors or warnings have been reported. No more will be reported from now. OGRFeature(Settlement_points):0 SUM_FIELD_1 (Real) = 0
1./ How can I correct my sql statement? 2./ What is actually processing the sql statment in ogrinfo; are there some limits?