Adrian Weber-2 wrote:
> 
> 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
> 
> i'm wondering what is filter.
> do i have to do something like this Filter filter?
> -------------------------------------------------------------------------
> 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
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Getting-postgis-database-tables-tp17121704p17142289.html
Sent from the geotools-gt2-users mailing list archive at Nabble.com.


-------------------------------------------------------------------------
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

Reply via email to