有人可以告诉我如何通过 java geotools api 获取特征顶点吗?
就我而言,我在 postgis 中有一个多边形层,我可以查询该层的所有特征,并且我需要知道每个特征的顶点。
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???
}
任何帮助表示感谢!感谢!