Examples of ReprojectFeatureReader


Examples of org.geotools.data.crs.ReprojectFeatureReader

      FeatureReader<SimpleFeatureType, SimpleFeature> newfr = reader;
        if (query != null && query.getMaxFeatures() != Integer.MAX_VALUE){
            newfr = new MaxFeatureReader<SimpleFeatureType, SimpleFeature>(newfr, query.getMaxFeatures());
        }
      if (this.reproject != null){
          newfr = new ReprojectFeatureReader(newfr, (SimpleFeatureType) featureType, this.reproject);
      }
      //creates a re-type feature reader
      if (this.newFeatureType != null && !this.newFeatureType.equals(this.featureType)){
        newfr = new ReTypeFeatureReader(newfr, (SimpleFeatureType)this.newFeatureType);
      }
View Full Code Here

Examples of org.geotools.data.crs.ReprojectFeatureReader

        int maxFeatures = query.getMaxFeatures();
        if (maxFeatures != Integer.MAX_VALUE) {
            reader = new MaxFeatureReader<SimpleFeatureType, SimpleFeature>(reader, maxFeatures);
        }       
        if( transform != null ){
            reader = new ReprojectFeatureReader( reader, getSchema(), transform );
        }
        return reader;
    }  
View Full Code Here

Examples of org.geotools.data.crs.ReprojectFeatureReader

                CoordinateReferenceSystem nativeCRS = reader.getFeatureType().getCoordinateReferenceSystem();
                if(nativeCRS == null) {
                    throw new IOException("Cannot reproject data, the source CRS is not available");
                } else if(!nativeCRS.equals(targetCRS)) {
                    try {
                        reader = new ReprojectFeatureReader(reader, targetCRS);
                    } catch (Exception e) {
                        if(e instanceof IOException)
                            throw (IOException) e;
                        else
                            throw (IOException) new IOException("Error occurred trying to reproject data").initCause(e);
View Full Code Here

Examples of org.geotools.data.crs.ReprojectFeatureReader

        CoordinateReferenceSystem readerCrs = readerType.getCoordinateReferenceSystem();
        String serverSrs = getServerSrs(query);
        if (queryCrs != null && serverSrs == null
                && !queryCrs.equals(readerCrs)) {
            try {
                reader = new ReprojectFeatureReader(reader, queryCrs);
            } catch (Exception e) {
                throw new DataSourceException(e);
            }
        }
        if(serverSrs != null) {
View Full Code Here

Examples of org.geotools.data.crs.ReprojectFeatureReader

                    LOGGER.warning(e.toString());
                    reader = tmp;
                }
            } else {
                try {
                    reader = new ReprojectFeatureReader(reader, query.getCoordinateSystem());
                } catch (Exception e) {
                    LOGGER.warning(e.toString());
                    reader = tmp;
                }
            }
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.