org.geotools.data.Query.getCoordinateSystemReproject()方法的使用及代码示例

x33g5p2x  于2022-01-28 转载在 其他  
字(7.6k)|赞(0)|评价(0)|浏览(190)

本文整理了Java中org.geotools.data.Query.getCoordinateSystemReproject方法的一些代码示例,展示了Query.getCoordinateSystemReproject的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Query.getCoordinateSystemReproject方法的具体详情如下:
包路径:org.geotools.data.Query
类名称:Query
方法名:getCoordinateSystemReproject

Query.getCoordinateSystemReproject介绍

[英]If reprojection has been requested, this returns the coordinate system that features retrieved by this Query will be reprojected into.
[中]如果已请求重新投影,则返回此查询检索到的特征将被重新投影到的坐标系。

代码示例

代码示例来源:origin: geoserver/geoserver

  1. if (newQuery.getCoordinateSystemReproject() != null) {
  2. newQuery.setCoordinateSystemReproject(null);

代码示例来源:origin: geoserver/geoserver

  1. result.setCoordinateSystemReproject(userQuery.getCoordinateSystemReproject());
  2. result.setStartIndex(userQuery.getStartIndex());
  3. result.setSortBy(userQuery.getSortBy());

代码示例来源:origin: geoserver/geoserver

  1. CoordinateReferenceSystem targetCRS = query.getCoordinateSystemReproject();
  2. try {

代码示例来源:origin: geotools/geotools

  1. /**
  2. * Configure expected
  3. *
  4. * @param origional
  5. * @param query
  6. * @return
  7. */
  8. public static SimpleFeatureType retype(SimpleFeatureType origional, Query query) {
  9. CoordinateReferenceSystem crs = null;
  10. if (query.getCoordinateSystem() != null) {
  11. crs = query.getCoordinateSystem();
  12. }
  13. if (query.getCoordinateSystemReproject() != null) {
  14. crs = query.getCoordinateSystemReproject();
  15. }
  16. return retype(origional, query.getPropertyNames(), crs);
  17. }

代码示例来源:origin: geotools/geotools

  1. /**
  2. * Hashcode based on all parameters other than the handle.
  3. *
  4. * @return hascode for this Query
  5. */
  6. @Override
  7. public int hashCode() {
  8. String[] n = getPropertyNames();
  9. return ((n == null) ? (-1) : ((n.length == 0) ? 0 : (n.length | n[0].hashCode())))
  10. | getMaxFeatures()
  11. | ((getFilter() == null) ? 0 : getFilter().hashCode())
  12. | ((getTypeName() == null) ? 0 : getTypeName().hashCode())
  13. | ((getVersion() == null) ? 0 : getVersion().hashCode())
  14. | ((getCoordinateSystem() == null) ? 0 : getCoordinateSystem().hashCode())
  15. | ((getCoordinateSystemReproject() == null)
  16. ? 0
  17. : getCoordinateSystemReproject().hashCode())
  18. | getStartIndex();
  19. }

代码示例来源:origin: geotools/geotools

  1. if (query.getCoordinateSystemReproject() != null) {
  2. cs = query.getCoordinateSystemReproject();
  3. } else if (query.getCoordinateSystem() != null) {
  4. cs = query.getCoordinateSystem();

代码示例来源:origin: geotools/geotools

  1. /**
  2. * Retrive the extent of the Query.
  3. *
  4. * <p>This method provides access to an optimized getBounds opperation. If no optimized
  5. * opperation is available <code>null</code> will be returned.
  6. *
  7. * <p>You may still make use of getFeatures( Query ).getCount() which will return the correct
  8. * answer (even if it has to itterate through all the results to do so.
  9. *
  10. * @param query User's query
  11. * @return Extend of Query or <code>null</code> if no optimization is available
  12. * @throws IOException If a problem is encountered with source
  13. */
  14. public ReferencedEnvelope getBounds(Query query) throws IOException {
  15. if (constraintQuery.getCoordinateSystemReproject() == null) {
  16. try {
  17. query = makeDefinitionQuery(query);
  18. } catch (IOException ex) {
  19. return null;
  20. }
  21. return source.getBounds(query);
  22. }
  23. // this will create a feature results that can reproject the
  24. // features, and will
  25. // properly compute the bouds
  26. return getFeatures(query).getBounds();
  27. }

代码示例来源:origin: geotools/geotools

  1. /**
  2. * Retrieves the total extent of this FeatureSource.
  3. *
  4. * <p>Please note this extent will reflect the provided definitionQuery.
  5. *
  6. * @return Extent of this FeatureSource, or <code>null</code> if no optimizations exist.
  7. * @throws IOException If bounds of definitionQuery
  8. */
  9. public ReferencedEnvelope getBounds() throws IOException {
  10. if (constraintQuery.getCoordinateSystemReproject() == null) {
  11. if (constraintQuery.getFilter() == null
  12. || constraintQuery.getFilter() == Filter.INCLUDE
  13. || Filter.INCLUDE.equals(constraintQuery.getFilter())) {
  14. return source.getBounds();
  15. }
  16. return source.getBounds(constraintQuery);
  17. }
  18. // this will create a feature results that can reproject the
  19. // features, and will
  20. // properly compute the bouds
  21. return getFeatures().getBounds();
  22. }

代码示例来源:origin: geotools/geotools

  1. if (query.getCoordinateSystemReproject() != null) {
  2. cs = query.getCoordinateSystemReproject();
  3. } else if (query.getCoordinateSystem() != null) {
  4. cs = query.getCoordinateSystem();

代码示例来源:origin: geotools/geotools

  1. ? (other.getCoordinateSystem() == null)
  2. : getCoordinateSystem().equals(other.getCoordinateSystem()))
  3. && ((getCoordinateSystemReproject() == null)
  4. ? (other.getCoordinateSystemReproject() == null)
  5. : getCoordinateSystemReproject()
  6. .equals(other.getCoordinateSystemReproject()))
  7. && (getStartIndex() == other.getStartIndex())
  8. && (getHints() == null

代码示例来源:origin: geotools/geotools

  1. if (query.getCoordinateSystemReproject() != null) {
  2. cs = query.getCoordinateSystemReproject();
  3. } else if (query.getCoordinateSystem() != null) {
  4. cs = query.getCoordinateSystem();

代码示例来源:origin: geotools/geotools

  1. : getCoordinateSystem().equals(other.getCoordinateSystem()))
  2. && ((getCoordinateSystemReproject() == null)
  3. ? (other.getCoordinateSystemReproject() == null)
  4. : getCoordinateSystemReproject()
  5. .equals(other.getCoordinateSystemReproject()));

代码示例来源:origin: geotools/geotools

  1. : getCoordinateSystem().equals(other.getCoordinateSystem()))
  2. && ((getCoordinateSystemReproject() == null)
  3. ? (other.getCoordinateSystemReproject() == null)
  4. : getCoordinateSystemReproject()
  5. .equals(other.getCoordinateSystemReproject()));

代码示例来源:origin: geotools/geotools

  1. query.getCoordinateSystemReproject();

代码示例来源:origin: geotools/geotools

  1. if (query.getCoordinateSystemReproject() != null) {
  2. this.featureType =
  3. FeatureTypes.transform(
  4. this.featureType, query.getCoordinateSystemReproject());
  5. } else if (query.getCoordinateSystem() != null) {
  6. this.featureType =

代码示例来源:origin: geotools/geotools

  1. /**
  2. * Copy contructor.
  3. *
  4. * @param query the query to copy
  5. */
  6. public Query(Query query) {
  7. this(
  8. query.getTypeName(),
  9. query.getNamespace(),
  10. query.getFilter(),
  11. query.getMaxFeatures(),
  12. query.getProperties(),
  13. query.getHandle());
  14. this.sortBy = query.getSortBy();
  15. this.coordinateSystem = query.getCoordinateSystem();
  16. this.coordinateSystemReproject = query.getCoordinateSystemReproject();
  17. this.version = query.getVersion();
  18. this.hints = query.getHints();
  19. this.startIndex = query.getStartIndex();
  20. this.alias = query.getAlias();
  21. this.joins = new ArrayList();
  22. for (Join j : query.getJoins()) {
  23. this.joins.add(new Join(j));
  24. }
  25. }

代码示例来源:origin: geotools/geotools

  1. if (query.getCoordinateSystemReproject() != null) {
  2. collection =
  3. new ReprojectingFeatureCollection(
  4. collection, query.getCoordinateSystemReproject());

代码示例来源:origin: geotools/geotools

  1. /**
  2. * Copy contructor, clones the state of a generic Query into a DefaultQuery
  3. *
  4. * @param query
  5. */
  6. public DefaultQuery(Query query) {
  7. this(
  8. query.getTypeName(),
  9. query.getNamespace(),
  10. query.getFilter(),
  11. query.getMaxFeatures(),
  12. query.getProperties(),
  13. query.getHandle());
  14. this.sortBy = query.getSortBy();
  15. this.coordinateSystem = query.getCoordinateSystem();
  16. this.coordinateSystemReproject = query.getCoordinateSystemReproject();
  17. this.version = query.getVersion();
  18. this.hints = query.getHints();
  19. this.startIndex = query.getStartIndex();
  20. this.alias = query.getAlias();
  21. this.joins = query.getJoins();
  22. }
  23. }

代码示例来源:origin: geotools/geotools

  1. private Query namedQuery(Query query) {
  2. Query namedQuery =
  3. namedQuery(
  4. query.getFilter(), query.getMaxFeatures(), query instanceof JoiningQuery);
  5. namedQuery.setProperties(query.getProperties());
  6. namedQuery.setCoordinateSystem(query.getCoordinateSystem());
  7. namedQuery.setCoordinateSystemReproject(query.getCoordinateSystemReproject());
  8. namedQuery.setHandle(query.getHandle());
  9. namedQuery.setMaxFeatures(query.getMaxFeatures());
  10. namedQuery.setStartIndex(query.getStartIndex());
  11. namedQuery.setSortBy(query.getSortBy());
  12. namedQuery.setHints(query.getHints());
  13. if (query instanceof JoiningQuery) {
  14. ((JoiningQuery) namedQuery).setQueryJoins(((JoiningQuery) query).getQueryJoins());
  15. ((JoiningQuery) namedQuery).setRootMapping(((JoiningQuery) query).getRootMapping());
  16. }
  17. return namedQuery;
  18. }

代码示例来源:origin: geotools/geotools

  1. initialiseSourceFeatures(mapping, unrolledQuery, query.getCoordinateSystemReproject());
  2. xpathAttributeBuilder.setFilterFactory(namespaceAwareFilterFactory);
  3. this.query = unrolledQuery;

相关文章