The specified id may be null. In this case an id will be generated internally by the builder.
null
After this method returns, all internal builder state is reset.
906907908909910911912913914915916
return GeoPipeline.this.hasNext(); } @Override public SimpleFeature next() { return featureBuilder.buildFeature(GeoPipeline.this.next().getRecord()); } @Override public void remove() { throw new UnsupportedOperationException();
138139140141142143144145146147148
String nextFid = ts.nextFid(schema.getTypeName()); Object[] values = f.getAttributes().toArray(); build.addAll( values ); newFeature = build.buildFeature( nextFid ); r.add(newFeature.getIdentifier()); } catch (IllegalAttributeException e) { throw (IOException) new IOException( e.getLocalizedMessage() ); }
100101102103104105106107108109110
public void create() throws Exception { WKTReader wktReader = new WKTReader(); Point geometry = (Point) wktReader.read("POINT (0 0)"); SimpleFeatureBuilder build = new SimpleFeatureBuilder(layer.getSchema()); SimpleFeature feature = build.buildFeature("100000", new Object[] { geometry, "Tsjakamaka", 342 }); Object created = layer.create(feature); Assert.assertNotNull(created); }
208209210211212213214215216217218
values[i++] = null; } } values[i++] = internalFeature.getStyleInfo().getIndex(); values[i++] = internalFeature.getGeometry(); result.add(builder.buildFeature(internalFeature.getId(), values)); } return result; } private SimpleFeatureType createFeatureType(VectorLayer layer, CoordinateReferenceSystem mapCrs) {
7273747576777879808182
} else { attr.add(feature.getGeometry()); } } return builder.buildFeature(feature.getId(), attr.toArray()); } /** {@inheritDoc} */ public SimpleFeatureType toSimpleFeatureType(VectorLayerInfo vectorLayerInfo, List<String> attributeNames)
180181182183184185186187188189190
featureBuilder.add(s.stopName); featureBuilder.add(s.stopCode); featureBuilder.add(s.stopDesc); featureBuilder.add(s.gtfsStopId); featureBuilder.add(s.agency.name); SimpleFeature feature = featureBuilder.buildFeature(null); collection.add(feature); } } else if(gisExport.type.equals(GisUploadType.ROUTES)) {
226227228229230231232233234235236
featureBuilder.add(r.routeUrl); featureBuilder.add(r.routeColor); featureBuilder.add(r.routeTextColor); featureBuilder.add(r.agency.name); SimpleFeature feature = featureBuilder.buildFeature(null); collection.add(feature); } } } else
221222223224225226227228229230231
Geometry reprojectPoint = JTS.transform(point, transform); SimpleFeatureBuilder builder = new SimpleFeatureBuilder(featureType); Object[] values = new Object[]{reprojectPoint, text, dateTimeString, String.valueOf(altim)}; builder.addAll(values); SimpleFeature feature = builder.buildFeature(featureType.getTypeName() + "." + i++); newCollection.add(feature); pm.worked(1); } } finally { pm.done();
345346347348349350351352353354355
MultiLineString multiLineString = gF.createMultiLineString(new LineString[]{reprojectLineString}); SimpleFeatureBuilder builder = new SimpleFeatureBuilder(featureType); Object[] values = new Object[]{multiLineString, startDate, endDate, log.text}; builder.addAll(values); SimpleFeature feature = builder.buildFeature(featureType.getTypeName() + "." + index++); newCollection.add(feature); pm.worked(1); } pm.done();
400401402403404405406407408409410
Point reprojectPoint = (Point) JTS.transform(point, transform); Object[] values = new Object[]{reprojectPoint, String.valueOf(gpsPoint.altim), gpsPoint.utctime}; SimpleFeatureBuilder builder = new SimpleFeatureBuilder(featureType); builder.addAll(values); SimpleFeature feature = builder.buildFeature(featureType.getTypeName() + "." + index++); newCollection.add(feature); } pm.worked(1); } pm.done();