private Feature attemptNext() { SimpleFeature input = (SimpleFeature) super.next(); SimpleFeature result = featureBuilder.buildFeature(null); featureDataConverter.convert(input, result); // @hack #45678 - mask empty geometry or postgis will complain Geometry geom = (Geometry) result.getDefaultGeometry(); if (geom != null && geom.isEmpty()) { result.setDefaultGeometry(null); } try { result = vectorTransformChain.inline(task, dataStore, input, result); } catch (Exception e) { throw new RuntimeException(e); } task.setNumberProcessed(++cnt); return result; } }
? new VectorTransformChain() : new RasterTransformChain()); t.setDirect(direct); t.setStore(targetStore);
next = tx.inline(task, dataStoreDestination, feature, next);
TransformChain<VectorTransform> chain = new VectorTransformChain(transform); task.setTransform(chain);
t.setTransform( format instanceof VectorFormat ? new VectorTransformChain() : new RasterTransformChain());
public SimpleFeature inline(ImportTask task, DataStore dataStore, SimpleFeature oldFeature, SimpleFeature feature) throws Exception { for (InlineVectorTransform tx : filter(transforms, InlineVectorTransform.class)) { try { feature = tx.apply(task, dataStore, oldFeature, feature); if (feature == null) { break; } } catch (Exception e) { error(tx, e); } } return feature; }
featureType = tx.inline(task, dataStore, featureType);
public SimpleFeature inline( ImportTask task, DataStore dataStore, SimpleFeature oldFeature, SimpleFeature feature) throws Exception { for (InlineVectorTransform tx : filter(transforms, InlineVectorTransform.class)) { try { feature = tx.apply(task, dataStore, oldFeature, feature); if (feature == null) { break; } } catch (Exception e) { error(tx, e); } } return feature; } }
public SimpleFeatureType inline( ImportTask task, DataStore dataStore, SimpleFeatureType featureType) throws Exception { for (InlineVectorTransform tx : filter(transforms, InlineVectorTransform.class)) { try { tx.init(); featureType = tx.apply(task, dataStore, featureType); } catch (Exception e) { error(tx, e); } } return featureType; }
public SimpleFeatureType inline(ImportTask task, DataStore dataStore, SimpleFeatureType featureType) throws Exception { for (InlineVectorTransform tx : filter(transforms, InlineVectorTransform.class)) { try { tx.init(); featureType = tx.apply(task, dataStore, featureType); } catch (Exception e) { error(tx, e); } } return featureType; }