if (newQuery.getCoordinateSystemReproject() != null) { newQuery.setCoordinateSystemReproject(null);
result.setCoordinateSystemReproject(userQuery.getCoordinateSystemReproject()); result.setStartIndex(userQuery.getStartIndex()); result.setSortBy(userQuery.getSortBy());
CoordinateReferenceSystem targetCRS = query.getCoordinateSystemReproject(); try {
/** * Configure expected * * @param origional * @param query * @return */ public static SimpleFeatureType retype(SimpleFeatureType origional, Query query) { CoordinateReferenceSystem crs = null; if (query.getCoordinateSystem() != null) { crs = query.getCoordinateSystem(); } if (query.getCoordinateSystemReproject() != null) { crs = query.getCoordinateSystemReproject(); } return retype(origional, query.getPropertyNames(), crs); }
/** * Hashcode based on all parameters other than the handle. * * @return hascode for this Query */ @Override public int hashCode() { String[] n = getPropertyNames(); return ((n == null) ? (-1) : ((n.length == 0) ? 0 : (n.length | n[0].hashCode()))) | getMaxFeatures() | ((getFilter() == null) ? 0 : getFilter().hashCode()) | ((getTypeName() == null) ? 0 : getTypeName().hashCode()) | ((getVersion() == null) ? 0 : getVersion().hashCode()) | ((getCoordinateSystem() == null) ? 0 : getCoordinateSystem().hashCode()) | ((getCoordinateSystemReproject() == null) ? 0 : getCoordinateSystemReproject().hashCode()) | getStartIndex(); }
if (query.getCoordinateSystemReproject() != null) { cs = query.getCoordinateSystemReproject(); } else if (query.getCoordinateSystem() != null) { cs = query.getCoordinateSystem();
/** * Retrive the extent of the Query. * * <p>This method provides access to an optimized getBounds opperation. If no optimized * opperation is available <code>null</code> will be returned. * * <p>You may still make use of getFeatures( Query ).getCount() which will return the correct * answer (even if it has to itterate through all the results to do so. * * @param query User's query * @return Extend of Query or <code>null</code> if no optimization is available * @throws IOException If a problem is encountered with source */ public ReferencedEnvelope getBounds(Query query) throws IOException { if (constraintQuery.getCoordinateSystemReproject() == null) { try { query = makeDefinitionQuery(query); } catch (IOException ex) { return null; } return source.getBounds(query); } // this will create a feature results that can reproject the // features, and will // properly compute the bouds return getFeatures(query).getBounds(); }
/** * Retrieves the total extent of this FeatureSource. * * <p>Please note this extent will reflect the provided definitionQuery. * * @return Extent of this FeatureSource, or <code>null</code> if no optimizations exist. * @throws IOException If bounds of definitionQuery */ public ReferencedEnvelope getBounds() throws IOException { if (constraintQuery.getCoordinateSystemReproject() == null) { if (constraintQuery.getFilter() == null || constraintQuery.getFilter() == Filter.INCLUDE || Filter.INCLUDE.equals(constraintQuery.getFilter())) { return source.getBounds(); } return source.getBounds(constraintQuery); } // this will create a feature results that can reproject the // features, and will // properly compute the bouds return getFeatures().getBounds(); }
if (query.getCoordinateSystemReproject() != null) { cs = query.getCoordinateSystemReproject(); } else if (query.getCoordinateSystem() != null) { cs = query.getCoordinateSystem();
? (other.getCoordinateSystem() == null) : getCoordinateSystem().equals(other.getCoordinateSystem())) && ((getCoordinateSystemReproject() == null) ? (other.getCoordinateSystemReproject() == null) : getCoordinateSystemReproject() .equals(other.getCoordinateSystemReproject())) && (getStartIndex() == other.getStartIndex()) && (getHints() == null
if (query.getCoordinateSystemReproject() != null) { cs = query.getCoordinateSystemReproject(); } else if (query.getCoordinateSystem() != null) { cs = query.getCoordinateSystem();
: getCoordinateSystem().equals(other.getCoordinateSystem())) && ((getCoordinateSystemReproject() == null) ? (other.getCoordinateSystemReproject() == null) : getCoordinateSystemReproject() .equals(other.getCoordinateSystemReproject()));
: getCoordinateSystem().equals(other.getCoordinateSystem())) && ((getCoordinateSystemReproject() == null) ? (other.getCoordinateSystemReproject() == null) : getCoordinateSystemReproject() .equals(other.getCoordinateSystemReproject()));
if (query.getCoordinateSystemReproject() != null) { this.featureType = FeatureTypes.transform( this.featureType, query.getCoordinateSystemReproject()); } else if (query.getCoordinateSystem() != null) { this.featureType =
/** * Copy contructor. * * @param query the query to copy */ public Query(Query query) { this( query.getTypeName(), query.getNamespace(), query.getFilter(), query.getMaxFeatures(), query.getProperties(), query.getHandle()); this.sortBy = query.getSortBy(); this.coordinateSystem = query.getCoordinateSystem(); this.coordinateSystemReproject = query.getCoordinateSystemReproject(); this.version = query.getVersion(); this.hints = query.getHints(); this.startIndex = query.getStartIndex(); this.alias = query.getAlias(); this.joins = new ArrayList(); for (Join j : query.getJoins()) { this.joins.add(new Join(j)); } }
if (query.getCoordinateSystemReproject() != null) { collection = new ReprojectingFeatureCollection( collection, query.getCoordinateSystemReproject());
/** * Copy contructor, clones the state of a generic Query into a DefaultQuery * * @param query */ public DefaultQuery(Query query) { this( query.getTypeName(), query.getNamespace(), query.getFilter(), query.getMaxFeatures(), query.getProperties(), query.getHandle()); this.sortBy = query.getSortBy(); this.coordinateSystem = query.getCoordinateSystem(); this.coordinateSystemReproject = query.getCoordinateSystemReproject(); this.version = query.getVersion(); this.hints = query.getHints(); this.startIndex = query.getStartIndex(); this.alias = query.getAlias(); this.joins = query.getJoins(); } }
private Query namedQuery(Query query) { Query namedQuery = namedQuery( query.getFilter(), query.getMaxFeatures(), query instanceof JoiningQuery); namedQuery.setProperties(query.getProperties()); namedQuery.setCoordinateSystem(query.getCoordinateSystem()); namedQuery.setCoordinateSystemReproject(query.getCoordinateSystemReproject()); namedQuery.setHandle(query.getHandle()); namedQuery.setMaxFeatures(query.getMaxFeatures()); namedQuery.setStartIndex(query.getStartIndex()); namedQuery.setSortBy(query.getSortBy()); namedQuery.setHints(query.getHints()); if (query instanceof JoiningQuery) { ((JoiningQuery) namedQuery).setQueryJoins(((JoiningQuery) query).getQueryJoins()); ((JoiningQuery) namedQuery).setRootMapping(((JoiningQuery) query).getRootMapping()); } return namedQuery; }
initialiseSourceFeatures(mapping, unrolledQuery, query.getCoordinateSystemReproject()); xpathAttributeBuilder.setFilterFactory(namespaceAwareFilterFactory); this.query = unrolledQuery;