Package org.geotools.data.simple

Examples of org.geotools.data.simple.SimpleFeatureStore.removeFeatures()


      Filter filter = filterService.createFidFilter(new String[] {featureId});
      if (transactionManager != null) {
        store.setTransaction(transactionManager.getTransaction());
      }
      try {
        store.removeFeatures(filter);
        if (log.isDebugEnabled()) {
          log.debug("Deleted feature {} in {}", featureId, getFeatureSourceName());
        }
      } catch (IOException ioe) {
        featureModelUsable = false;
View Full Code Here


 
          LOGGER.debug("Filter: " + filter);

            // try to look for the destination table
            SimpleFeatureStore store = (SimpleFeatureStore) ds.getFeatureSource(layer);
            store.removeFeatures(filter);
            tx.commit();
        } catch (Exception e) {
            quietRollbackTransaction(tx);
            LOGGER.error("An exception was raised when deleting features from " + layer + "", e);
            throw new PostGisException("An exception was raised when deleting features from " + layer, e);
View Full Code Here

            throw new CommandFailedException("Can't write to the selected table");
        }
        SimpleFeatureStore featureStore = (SimpleFeatureStore) featureSource;
        if (overwrite) {
            try {
                featureStore.removeFeatures(Filter.INCLUDE);
            } catch (IOException e) {
                throw new CommandFailedException("Error truncating table: " + e.getMessage(), e);
            }
        }
        ExportOp op = cli.getGeogig().command(ExportOp.class).setFeatureStore(featureStore)
View Full Code Here

                    throw new CommandFailedException(
                            "Could not create feature store. Data source is read only.");
                }
                final SimpleFeatureStore featureStore = (SimpleFeatureStore) featureSource;
                if (overwrite) {
                    featureStore.removeFeatures(Filter.INCLUDE);
                }
                ExportOp op = cli.getGeogig().command(ExportOp.class).setFeatureStore(featureStore)
                        .setPath(path).setFeatureTypeConversionFunction(function);
                try {
                    op.setProgressListener(cli.getProgressListener()).call();
View Full Code Here

            throw new CommandFailedException("Can't write to the selected table");
        }
        SimpleFeatureStore featureStore = (SimpleFeatureStore) featureSource;
        if (overwrite) {
            try {
                featureStore.removeFeatures(Filter.INCLUDE);
            } catch (IOException e) {
                throw new CommandFailedException("Error accessing table: " + e.getMessage(), e);
            }
        }
        ExportOp op = cli.getGeogig().command(ExportOp.class).setFeatureStore(featureStore)
View Full Code Here

            throw new CommandFailedException("Can't write to the selected table");
        }
        SimpleFeatureStore featureStore = (SimpleFeatureStore) featureSource;
        if (overwrite) {
            try {
                featureStore.removeFeatures(Filter.INCLUDE);
            } catch (IOException e) {
                throw new CommandFailedException("Error accessing table: " + e.getMessage(), e);
            }
        }
        ExportOp op = cli.getGeogig().command(ExportOp.class).setFeatureStore(featureStore)
View Full Code Here

        }
        if (featureSource instanceof SimpleFeatureStore) {
            SimpleFeatureStore featureStore = (SimpleFeatureStore) featureSource;
            if (overwrite) {
                try {
                    featureStore.removeFeatures(Filter.INCLUDE);
                } catch (IOException e) {
                    throw new CommandFailedException("Error trying to remove features", e);
                }
            }
            ExportOp op = cli.getGeogig().command(ExportOp.class).setFeatureStore(featureStore)
View Full Code Here

                throw new CommandFailedException("Could not create feature store.");
            }
            final SimpleFeatureStore store = (SimpleFeatureStore) source;
            if (overwrite) {
                try {
                    store.removeFeatures(Filter.INCLUDE);
                } catch (IOException e) {
                    throw new CommandFailedException("Error truncating table " + tableName, e);
                }
            }
            ExportOp op = cli.getGeogig().command(ExportOp.class).setFeatureStore(store)
View Full Code Here

            // we're not getting rounding errors
            assertTrue(modif1.buffer(.01).contains(actual1));
            assertTrue(modif2.buffer(.01).contains(actual2));
        } finally {
            try {
                store.removeFeatures(fid1Filter);
                store.removeFeatures(fid2Filter);
            } catch (Exception e) {
                e.printStackTrace();
                throw e;
            }
View Full Code Here

            assertTrue(modif1.buffer(.01).contains(actual1));
            assertTrue(modif2.buffer(.01).contains(actual2));
        } finally {
            try {
                store.removeFeatures(fid1Filter);
                store.removeFeatures(fid2Filter);
            } catch (Exception e) {
                e.printStackTrace();
                throw e;
            }
        }
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.