wqbyangtzeu / spatialite-android

Automatically exported from code.google.com/p/spatialite-android
0 stars 1 forks source link

Enter one-line summary #32

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. excute sql:
   select DLBM,DLMC,TBBH,sum(Area(Intersection((select Geometry from '2012TB' where JCBH=99),Geometry))) as area 
from '2012DL' 
where Intersects((select Geometry from '2012TB' where JCBH=99),Geometry)group 
by DLMC,DLBM

2. db.exec(query, cb);
3. Callback cb = new Callback() {  
                public void columns(String[] coldata) {  
                }  

                public void types(String[] types) {  
                }  

                public boolean newrow(String[] rowdata) {  
                    // 爸从spatialite中得到的空间数据在GrpahicsLayer中显示出来 
                    Log.d("DBUtil", rowdata[0]+"|"+rowdata[2]+"|"+rowdata[3]);
                    String dlbm = rowdata[0];  
                    String dlmc = rowdata[1]; 
                    if(rowdata[2]==null){
                        return false;
                    }
                    double area = Double.valueOf(rowdata[2]); 
                    if(area<0.0001){
                        return false;
                    }
                    ResultBean resultBean = new ResultBean();
                    resultBean.setName(dlmc);
                    resultBean.setType(dlbm);
                    resultBean.setArea(area);
                    features.add(resultBean);
                    return false;  
                }  
            };  

What is the expected output? What do you see instead?
可以返回面积,但是面积返回为null。在gui中查询是ok的。
12-17 14:10:59.981: D/DBUtil(13970): 102|131|null
12-17 14:10:59.986: D/DBUtil(13970): 114|99|null
12-17 14:10:59.986: D/DBUtil(13970): 202|6 |null
12-17 14:10:59.986: D/DBUtil(13970): 012|31|null
12-17 14:10:59.986: D/DBUtil(13970): 011|103|null
12-17 14:10:59.986: D/DBUtil(13970): 101|12|null
最后面积查询出来时null

What version of the product are you using? On what operating system?
Android

Please provide any additional information below.

Original issue reported on code.google.com by Myeasy...@gmail.com on 17 Aug 2013 at 6:25