你的浏览器禁用了JavaScript, 请开启后刷新浏览器获得更好的体验!
输入关键字进行搜索
张赛
赞同来自: 张宝才
SQLiteDatabase db = SQLiteDatabase.openDatabase(Environment.getExternalStorageDirectory().getAbsolutePath() + /ArcGIS/china2.geodatabase, null, SQLiteDatabase.OPEN_READWRITE); if (db !=null ){ Log.i(SQLiteDB, db.getPath()); Cursor cursor = db.query(首都和省级行政中心, null, null, null, null, null, null); while(cursor.moveToNext()){ System.out.println(cursor.getInt(cursor.getColumnIndex(OBJECTID)) + ; +cursor.getString(cursor.getColumnIndex(GBCODE)) + ; + cursor.getString(cursor.getColumnIndex(NAME))); } }
要回复问题请先登录或注册
1 个回复
张赛
赞同来自: 张宝才
关于geodatabase数据库的操作,一般建议通过ArcGIS Runtime SDK for Android提供的方法进行操作。
在Geodatabase层面:调用getGeodatabaseFeatureTables或getGeodatabaseFeatureTable(String name)获取所有的要素表或所需的要素表;
而后,在GeodatabaseFeatureTable层面,通过继承来自于父类FeatureTable和ArcGISFeatureTable的方法,可以执行诸如字段获取、要素查询、要素增删改(可编辑的FeatureTable表)等各种操作。
Geodatabase实质是一个SQLite的库,您当然也可通过SQLite的库直接操作。示例如下:
但是,不建议这么操作。最佳和最推荐的方式是对Geodatabase和GeodatabaseFeatureTable调用ArcGIS Runtime SDK for Android所提供的操作方法来执行。
要回复问题请先登录或注册