Could anybody show me how to get vertices of feature by java geotools api?
In my case, i have a polygon layer in postgis, i can query all feature of this layer and i need to know vertices of each feature.
SimpleFeatureSource featureSource = pgDatastore.getFeatureSource("hb_thuadat");
Filter filter = CQL.toFilter("sothua = 10");
SimpleFeatureCollection collection = featureSource.getFeatures( filter );
System.out.print("tong so:"+ collection.size());
FeatureIterator iter=collection.features();
while( iter.hasNext() ){
Feature feature = iter.next();
System.out.println( feature.getIdentifier());
//how to get vertices of feature here???
}
Any help is appreciate! Thank!