java/converter/src/main/java/be/bosa/dt/best/converter/writer/BestWriterShape.java
/**
	 * Store features into shapefile
	 *
	 * @param writer
	 * @param features
	 * @throws IOException
	 */
Store features into shapefile

@param writer
@param features
@throws IOException
Store features into shapefile @param writer @param features @throws IOException
private void writeFeatures(FeatureWriter<SimpleFeatureType, SimpleFeature> writer,
		List<SimpleFeature> features) throws IOException {
		for (SimpleFeature f : features) {
			SimpleFeature toWrite = writer.next();
			for (int j = 0; j < toWrite.getType().getAttributeCount(); j++) {
				String name = toWrite.getType().getDescriptor(j).getLocalName();
				toWrite.setAttribute(name, f.getAttribute(name));
			}
			writer.write();
		}
	}
private void writeFeatures ( FeatureWriter < SimpleFeatureType , SimpleFeature > writer , List < SimpleFeature > features ) throws IOException { for ( SimpleFeature f : features ) { SimpleFeature toWrite = writer . next ( ) ; for ( int j = 0 ; j < toWrite . getType ( ) . getAttributeCount ( ) ; j ++ ) { String name = toWrite . getType ( ) . getDescriptor ( j ) . getLocalName ( ) ; toWrite . setAttribute ( name , f . getAttribute ( name ) ) ; } writer . write ( ) ; } }
Store features into shapefile
Store features into shapefile