@SuppressWarnings("unchecked")
@Override
public F next() {
F next = super.next();
String fid = ((SimpleFeature) next).getID();
Name geometryAttributeName = builder.getFeatureType().getGeometryDescriptor().getName();
builder.set(geometryAttributeName, next.getDefaultGeometryProperty().getValue());
for (AttributeDescriptor attribute : builder.getFeatureType().getAttributeDescriptors()) {
Name name = attribute.getName();
if (!name.equals(geometryAttributeName)) {
Property property = next.getProperty(name);
if (property == null) {
throw new GeoToolsOpException(
GeoToolsOpException.StatusCode.INCOMPATIBLE_FEATURE_TYPE);
}