public FeatureTypeUnionBuilder setGeometryClass(
      final String geometryName,
      final Class<? extends Geometry> geomClass,
      final CoordinateReferenceSystem crs) {

    assert geometryName != null : "the geometry name can not be null";
    assert geomClass != null : "the geometry class can not be null";
    assert crs != null : "the CRS can not be null";

    this.geometryName = geometryName;
    this.geometryClass = geomClass;

    GeometryDescriptor geoAttrType;

    AttributeTypeBuilder build = new AttributeTypeBuilder();
    build.setName(this.geometryName);
    build.setBinding(this.geometryClass);
    build.setNillable(true);
    build.setLength(100);
    build.setCRS(crs);

    GeometryType type = build.buildGeometryType();
    geoAttrType = build.buildDescriptor(this.geometryName, type);

    this.unionGeometryAttr = geoAttrType;

    return this;
  }
 /**
  * Sets a restriction on the field length of the next attribute added to the feature type.
  *
  * <p>This method is the same as adding a restriction based on length( value ) < length This value
  * is reset after a call to {@link #add(String, Class)}
  *
  * @return length Used to limit the length of the next attribute created
  */
 public SimpleFeatureTypeBuilder length(int length) {
   attributeBuilder.setLength(length);
   return this;
 }