aymen83 wrote: > hi, > i'm writing an application which reads data from postgis db, i'm using > FeatureCollection to get table but i can only read one so how can i do read > all the tables > thanks for help >
hi, I hope that I understood your problem... A FeatureCollection always refers to only one table. To get all your PostGis tables, you have to request first all your table names (in GeoTools terminology: typeNames). Do something like this: String[] typeNames = postgisDataStore.getTypeNames(); then in typeNames all your table names are stored, to get the FeatureCollections: FeatureSource featureSource = postgisDataStore.getFeatureSource(typeNames[i]) FeatureCollection featureCollection = featureSource.getFeatures(filter); adrian ------------------------------------------------------------------------- This SF.net email is sponsored by the 2008 JavaOne(SM) Conference Don't miss this year's exciting event. There's still time to save $100. Use priority code J8TL2D2. http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone _______________________________________________ Geotools-gt2-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users
