Hello, I'm now beginning with an Android SIG project. However, I could not import my file of geodatabase to my project.
Geodatabase geodatabase = null;
File file = new File("/sdcard/geodatabase/GDB_Test.gdb");
try {
geodatabase = new Geodatabase("/sdcard/geodatabase/GDB_Test.gdb");
} catch (Exception e) {
// TODO Auto-generated catch block
e.printStackTrace();
if (geodatabase != null)
this.addressText.setText("ok");
else if (file.exists())
this.addressText.setText("can not read");
else
this.addressText.setText("nothing");
}
if (geodatabase != null) {
for (GeodatabaseFeatureTable gdbFeatureTable : geodatabase
.getGeodatabaseTables()) {
if (gdbFeatureTable.hasGeometry())
mMapView.addLayer(new FeatureLayer(gdbFeatureTable));
}
}
There is always an exception and TextField shows "can not read". I've tried several files of geodatases but the results are the same. Thanks for helping