I'm trying to read a shape from a persona Database (MDB) using ArcGIS java SDK.
| public static void main(String[] args) { | |
| String pathMDB="C:\\Documentos\\NetBeansProjects\\Pruebas\\OpenPersonalGeodatabaseMDB\\Atlantic.mdb"; | |
| Geodatabase mdbGeodatabase=null; | |
| try { | |
| mdbGeodatabase= new Geodatabase(pathMDB); | |
| } catch (FileNotFoundException ex) { | |
| Logger.getLogger(OpenPersonalGeodatabaseMDB.class.getName()).log(Level.SEVERE, null, ex); | |
| } catch (Exception ex) { | |
| Logger.getLogger(OpenPersonalGeodatabaseMDB.class.getName()).log(Level.SEVERE, null, ex); | |
| } | |
| System.out.println(mdbGeodatabase.getGeodatabaseTables().toString()); | |
| } |
i always have the error File opened that is not a database file. i'm doing right ?
Solved! Go to Solution.
The supported format for a geodatabase file is a ".geodatabase". That database is created through a GeodatabaseFeatureTable - basically, it connects to a FeatureLayer and downloads data into a file.
The workflow is described at Offline editing workflow | ArcGIS for Developers . An example is also available in the samples (Editing -> Offline editing workflow).
The supported format for a geodatabase file is a ".geodatabase". That database is created through a GeodatabaseFeatureTable - basically, it connects to a FeatureLayer and downloads data into a file.
The workflow is described at Offline editing workflow | ArcGIS for Developers . An example is also available in the samples (Editing -> Offline editing workflow).
Note that to download features, the FeatureLayer/Service has to be published with Sync capability.