Package org.geotools.util

Examples of org.geotools.util.NullProgressListener


        if (started)
            throw new IllegalStateException("Process can only be run once");
        started = true;

        if (monitor == null)
            monitor = new NullProgressListener();
        try {
            monitor.started();
            monitor.setTask(Text.text("Grabbing arguments"));
            monitor.progress(10.0f);
            Object value = input.get(BufferFactory.GEOM1.key);
View Full Code Here


        }

        try {
            System.out.print("Indexing ");

            int cnt = idx.index(true, new NullProgressListener());
            System.out.println();
            System.out.print(cnt + " features indexed ");
            System.out.println("in " + (System.currentTimeMillis() - start)
                    + "ms.");
            System.out.println();
View Full Code Here

                ShapefileDataStoreFactory.LOGGER.fine("Creating spatial index for "
                        + shpFiles.get(SHP));

                ShapeFileIndexer indexer = new ShapeFileIndexer();
                indexer.setShapeFileName(shpFiles);
                indexer.index(false, new NullProgressListener());

                return true;
            }
        } catch (Throwable t) {
            ShapefileDataStoreFactory.LOGGER.log(Level.SEVERE, t.getLocalizedMessage(), t);
View Full Code Here

    final DefaultCoverageResponseImpl response = new DefaultCoverageResponseImpl();
    response.setRequest(request);

    if (listener == null)
      listener = new NullProgressListener();
    listener.started();
    try {
      access.read(new GeoTiffAccess.Read<CoverageResponse>() {
        public CoverageResponse run(GeoTiffReader reader,
            GeoTiffAccess access) throws IOException {
View Full Code Here

        }

        EnumMap<AggregationFunction, Number> results = new EnumMap<AggregationFunction, Number>(AggregationFunction.class);
        if (singlePass) {
            AggregateFeatureCalc calc = new AggregateFeatureCalc(visitors);
            features.accepts(calc, new NullProgressListener());
            List<CalcResult> resultList = (List<CalcResult>) calc.getResult().getValue();
            for (int i = 0; i < functionList.size(); i++) {
                CalcResult result = resultList.get(i);
                if(result != null) {
                    results.put(functionList.get(i), (Number) result.getValue());
                }
            }
        } else {
            for (int i = 0; i < functionList.size(); i++) {
                final FeatureCalc calc = visitors.get(i);
                features.accepts(calc, new NullProgressListener());
                results.put(functionList.get(i), (Number) calc.getResult().getValue());
            }
        }

        return new Results(results);
View Full Code Here

     */
    public void accepts( Query query, org.opengis.feature.FeatureVisitor visitor,
            org.opengis.util.ProgressListener progress) throws IOException {
       
        if( progress == null ) {
            progress = new NullProgressListener();
        }
       

        if ( handleVisitor(query,visitor) ) {
            //all good, subclass handled
View Full Code Here

                "singlePass", true);
       
        NameImpl name = new NameImpl("vec","Aggregate");
        Process process = Processors.createProcess( name );
        assertNotNull("aggregateProcess not found", process);
        NullProgressListener monitor = new NullProgressListener();
        Map<String, Object> output = process.execute(input, monitor );
       
        Results result = (Results) output.get("result");
        assertTrue( result.sum > 0 );
    }
View Full Code Here

    public static void visit(FeatureCollection<?, ?> collection, FeatureVisitor visitor,
            ProgressListener progress) throws IOException {
        FeatureIterator<?> iterator = null;
        float size = progress != null ? collection.size() : 0;
        if (progress == null) {
            progress = new NullProgressListener();
        }
        try {
            float position = 0;
            progress.started();
            iterator = collection.features();
View Full Code Here

      final boolean canCreate)
      throws IOException {
    super(driver);

    if (listener == null)
      listener = new NullProgressListener();

    // url lookup
    if (source == null) {
      if (params.containsKey(URL.key)) {
        source = (URL) params.get(URL.key);
View Full Code Here

  public CoverageSource access(Name name, Map<String, Serializable> params,
      AccessType accessType, Hints hints, ProgressListener listener)
      throws IOException {
    if (listener == null)
      listener = new NullProgressListener();
    listener.started();
    try {
      if (!allowedAccessTypes.contains(accessType))
        throw new IllegalAccessError("Illegal access type requested");
      if (!this.coverageInfo.containsKey(name)) {
View Full Code Here

TOP

Related Classes of org.geotools.util.NullProgressListener

Copyright © 2018 www.massapicom. 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.