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

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

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

Hints.putSystemDefault介绍

[英]Adds a hint value to the set of GeoTools#getDefaultHints. Default hints can be added by call to this putDefaultHint method, to the GeoTools#init method or by System#getPropertieswith keys defined by the String constants in the GeoTools class.
[中]将提示值添加到GeoTools#GetDefaultHits集。默认提示可以通过调用此putDefaultHint方法、GeoTools#init方法或System#GetProperties添加,键由GeoTools类中的字符串常量定义。

代码示例

代码示例来源:origin: org.geoserver.importer/gs-importer-core

public static void setComparisonTolerance() {
  // need to set hint which allows for lax projection lookups to match
  // random wkt to an epsg code
  Hints.putSystemDefault(Hints.COMPARISON_TOLERANCE, 1e-9);
}

代码示例来源:origin: org.geoserver.csw/csw-simple-store

protected void setUp() throws Exception {
  Hints.putSystemDefault(Hints.FORCE_LONGITUDE_FIRST_AXIS_ORDER, true);
}

代码示例来源:origin: usc-isi-i2/Web-Karma

public static Geometry Transform(Geometry inGeom,
    CoordinateReferenceSystem sourceCRS,
    CoordinateReferenceSystem targetCRS) {
  
  Hints.putSystemDefault(Hints.FORCE_LONGITUDE_FIRST_AXIS_ORDER,
      Boolean.TRUE);
  if(sourceCRS.equals(targetCRS))
    return inGeom;
  
  MathTransform transform;
  
  try {
    transform = CRS.findMathTransform(sourceCRS, targetCRS, true);
  } catch (FactoryException e) {
    logger.error("Cannot find a transformation!", e);
    return inGeom;
  }
  Geometry outGeom = null;
  
  try {
    outGeom = JTS.transform(inGeom, transform);
  } catch (MismatchedDimensionException e) {
    logger.error("Cannot perform the transformation!", e);
    return inGeom;
  } catch (TransformException e) {
    logger.error("Cannot perform the transformation!", e);
    return outGeom;
  }
  return outGeom;
}

代码示例来源:origin: org.geoserver/gs-wfs

@BeforeClass
public static void before() {
  Hints.putSystemDefault(Hints.FORCE_LONGITUDE_FIRST_AXIS_ORDER, false);
  Hints.putSystemDefault(Hints.FORCE_AXIS_ORDER_HONORING, true);
}

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

Hints.putSystemDefault(Hints.FORCE_AXIS_ORDER_HONORING, "http");
Hints.putSystemDefault(Hints.LENIENT_DATUM_SHIFT, true);
Hints.putSystemDefault(Hints.COMPARISON_TOLERANCE, comparisonTolerance);
Hints.putSystemDefault(Hints.FILTER_FACTORY, CommonFactoryFinder
    .getFilterFactory2(null));
Hints.putSystemDefault(Hints.STYLE_FACTORY, CommonFactoryFinder
    .getStyleFactory(null));
Hints.putSystemDefault(Hints.FEATURE_FACTORY, CommonFactoryFinder
    .getFeatureFactory(null));
Hints.putSystemDefault(Hints.GRID_COVERAGE_FACTORY, CoverageFactoryFinder
    .getGridCoverageFactory(defHints));

代码示例来源:origin: usc-isi-i2/Web-Karma

public static String Transform(String inGeomWKT, String fromSRID,
    String toSRID) {
  Hints.putSystemDefault(Hints.FORCE_LONGITUDE_FIRST_AXIS_ORDER,
      Boolean.TRUE);

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

Hints.putSystemDefault(hints);

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

Hints.putSystemDefault(hints);

相关文章