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

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

本文整理了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

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

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

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

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

CoordinateReferenceSystem targetCRS = query.getCoordinateSystemReproject();
try {

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

/**
 * 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);
}

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

/**
 * 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();
}

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

if (query.getCoordinateSystemReproject() != null) {
  cs = query.getCoordinateSystemReproject();
} else if (query.getCoordinateSystem() != null) {
  cs = query.getCoordinateSystem();

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

/**
 * 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();
}

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

/**
 * 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();
}

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

if (query.getCoordinateSystemReproject() != null) {
  cs = query.getCoordinateSystemReproject();
} else if (query.getCoordinateSystem() != null) {
  cs = query.getCoordinateSystem();

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

? (other.getCoordinateSystem() == null)
    : getCoordinateSystem().equals(other.getCoordinateSystem()))
&& ((getCoordinateSystemReproject() == null)
    ? (other.getCoordinateSystemReproject() == null)
    : getCoordinateSystemReproject()
        .equals(other.getCoordinateSystemReproject()))
&& (getStartIndex() == other.getStartIndex())
&& (getHints() == null

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

if (query.getCoordinateSystemReproject() != null) {
  cs = query.getCoordinateSystemReproject();
} else if (query.getCoordinateSystem() != null) {
  cs = query.getCoordinateSystem();

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

: getCoordinateSystem().equals(other.getCoordinateSystem()))
&& ((getCoordinateSystemReproject() == null)
    ? (other.getCoordinateSystemReproject() == null)
    : getCoordinateSystemReproject()
        .equals(other.getCoordinateSystemReproject()));

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

: getCoordinateSystem().equals(other.getCoordinateSystem()))
&& ((getCoordinateSystemReproject() == null)
    ? (other.getCoordinateSystemReproject() == null)
    : getCoordinateSystemReproject()
        .equals(other.getCoordinateSystemReproject()));

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

query.getCoordinateSystemReproject();

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

if (query.getCoordinateSystemReproject() != null) {
  this.featureType =
      FeatureTypes.transform(
          this.featureType, query.getCoordinateSystemReproject());
} else if (query.getCoordinateSystem() != null) {
  this.featureType =

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

/**
 * 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));
  }
}

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

if (query.getCoordinateSystemReproject() != null) {
  collection =
      new ReprojectingFeatureCollection(
          collection, query.getCoordinateSystemReproject());

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

/**
   * 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();
  }
}

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

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;
}

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

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

相关文章