/** * Creates a sample Feature instance in the hope that it can be used in the rendering of the * legend graphic, using the given dimensionality for the geometry attribute. * * @param schema the schema for which to create a sample Feature instance * @param dimensionality the geometry dimensionality required (ovverides the one defined in the * schema) 1= points, 2= lines, 3= polygons * @throws ServiceException */ private Feature createSampleFeature(FeatureType schema, int dimensionality) throws ServiceException { if (schema instanceof SimpleFeatureType) { schema = cloneWithDimensionality(schema, dimensionality); } return createSampleFeature(schema); }