org.geotools.factory.Hints.getSystemDefault()方法的使用及代码示例

x33g5p2x  于2022-01-20 转载在 其他  
字(2.4k)|赞(0)|评价(0)|浏览(126)

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

Hints.getSystemDefault介绍

[英]Returns the hint GeoTools#getDefaultHintsfor the specified key.
[中]返回指定键的提示GeoTools#GetDefaultHints。

代码示例

代码示例来源:origin: org.geotools/gt-metadata

/**
 * Gathers the tolerance for floating point comparisons
 * @return The tolerance set in the hints, or its default value if not set
 */
private static double getTolerance() {
  Double tol = ((Double) Hints.getSystemDefault(Hints.COMPARISON_TOLERANCE));
  if(tol == null)
    return Hints.COMPARISON_TOLERANCE.getDefault();
  else
    return tol;
}

代码示例来源:origin: org.geotools/gt-main

static SimpleFeatureReader getDelegateReader(SimpleFeatureReader reader, Query query)
    throws IOException {
  Hints hints = query.getHints();
  int maxFeatures = 1000;
  if (hints != null && hints.get(Hints.MAX_MEMORY_SORT) != null) {
    maxFeatures = (Integer) hints.get(Hints.MAX_MEMORY_SORT);
  } else if (Hints.getSystemDefault(Hints.MAX_MEMORY_SORT) != null) {
    maxFeatures = (Integer) Hints.getSystemDefault(Hints.MAX_MEMORY_SORT);
  }
  return getDelegateReader(reader, query.getSortBy(), maxFeatures);
}

代码示例来源:origin: org.geotools/gt-wfs-ng

/**
 * Checks if axis flipping is needed comparing axis order requested for the DataStore with query
 * crs.
 *
 * @param axisOrder
 * @param coordinateSystem
 * @return
 */
public static boolean invertAxisNeeded(String axisOrder, CoordinateReferenceSystem crs) {
  CRS.AxisOrder requestedAxis = CRS.getAxisOrder(crs);
  if (requestedAxis == CRS.AxisOrder.INAPPLICABLE) {
    boolean forcedLonLat =
        Boolean.getBoolean("org.geotools.referencing.forceXY")
            || Boolean.TRUE.equals(
                Hints.getSystemDefault(Hints.FORCE_LONGITUDE_FIRST_AXIS_ORDER));
    if (forcedLonLat) {
      requestedAxis = CRS.AxisOrder.EAST_NORTH;
    } else {
      requestedAxis = CRS.AxisOrder.NORTH_EAST;
    }
  }
  if (WFSDataStoreFactory.AXIS_ORDER_NORTH_EAST.equals(axisOrder)) {
    return requestedAxis.equals(CRS.AxisOrder.EAST_NORTH);
  } else if (WFSDataStoreFactory.AXIS_ORDER_EAST_NORTH.equals(axisOrder)) {
    return requestedAxis.equals(CRS.AxisOrder.NORTH_EAST);
  } else {
    return false; // compliant, don't do anything
  }
}

代码示例来源:origin: org.integratedmodelling/klab-server

.equals(Hints.getSystemDefault(Hints.FORCE_LONGITUDE_FIRST_AXIS_ORDER))) {
Hints.putSystemDefault(Hints.FORCE_AXIS_ORDER_HONORING, "http");

代码示例来源:origin: org.geotools/gt-coverage

tolerance = (Double) Hints.getSystemDefault(Hints.RESAMPLE_TOLERANCE);

相关文章