org.gdal.gdal.gdal.SetConfigOption()方法的使用及代码示例

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

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

gdal.SetConfigOption介绍

暂无

代码示例

代码示例来源:origin: geosolutions-it/imageio-ext

/**
 * Allows to enable/disable GDAL caching mechanism.
 * 
 * @param useCaching
 *                <code>true</code> to enable GDAL caching.
 *                <code>false</code> to disable GDAL caching.
 */
public static void setGdalCaching(boolean useCaching) {
  final String sOption = useCaching ? "YES" : "NO";
  gdal.SetConfigOption("GDAL_FORCE_CACHING", sOption);
}

代码示例来源:origin: it.geosolutions.imageio-ext/imageio-ext-gdalframework

/**
 * Allows to enable/disable GDAL caching mechanism.
 * 
 * @param useCaching
 *                <code>true</code> to enable GDAL caching.
 *                <code>false</code> to disable GDAL caching.
 */
public static void setGdalCaching(boolean useCaching) {
  final String sOption = useCaching ? "YES" : "NO";
  gdal.SetConfigOption("GDAL_FORCE_CACHING", sOption);
}

代码示例来源:origin: it.geosolutions.imageio-ext/imageio-ext-gdalframework

/**
 * Allows to enable/disable GDAL Persistable Auxiliary Metadata.
 * 
 * @param usePAM
 *                <code>true</code> to enable GDAL PAM. <code>false</code>
 *                to disable GDAL PAM.
 */
public static void setGdalPAM(boolean usePAM) {
  final String sOption = usePAM ? "YES" : "NO";
  gdal.SetConfigOption("GDAL_PAM_ENABLED", sOption);
}

代码示例来源:origin: geosolutions-it/imageio-ext

/**
 * Allows to enable/disable GDAL Persistable Auxiliary Metadata.
 * 
 * @param usePAM
 *                <code>true</code> to enable GDAL PAM. <code>false</code>
 *                to disable GDAL PAM.
 */
public static void setGdalPAM(boolean usePAM) {
  final String sOption = usePAM ? "YES" : "NO";
  gdal.SetConfigOption("GDAL_PAM_ENABLED", sOption);
}

代码示例来源:origin: it.geosolutions.imageio-ext/imageio-ext-gdalkakadujp2

/**
   * Allows to customize kakadu error management.
   * 
   * @param errorManagement
   * 
   */
  public final static void setKakaduInputErrorManagement(
      final KakaduErrorManagementType errorManagement) {
    switch (errorManagement) {
    case FAST:
      gdal.SetConfigOption("KAKADU_ERROR_LEVEL_MANAGEMENT", "FAST");
      break;
    case FUSSY:
      gdal.SetConfigOption("KAKADU_ERROR_LEVEL_MANAGEMENT", "FUSSY");
      break;
    case RESILIENT:
      gdal.SetConfigOption("KAKADU_ERROR_LEVEL_MANAGEMENT", "RESILIENT");
      break;
    default:
      throw new IllegalArgumentException(
          "KAKADU_ERROR_LEVEL_MANAGEMENT unknown! Provided value is "
              + errorManagement);
    }
  }
}

代码示例来源:origin: it.geosolutions.imageio-ext/imageio-ext-gdalkakadujp2

/**
 * Allows to customize kakadu error management.
 * 
 * @param errorManagement
 * @deprecated use
 *             {@link #setKakaduInputErrorManagement(KakaduErrorManagementType)}
 * 
 */
public final static void setKakaduInputErrorManagement(
    final int errorManagement) {
  switch (errorManagement) {
  case KakaduErrorManagement.FAST:
    gdal.SetConfigOption("KAKADU_ERROR_LEVEL_MANAGEMENT", "FAST");
    break;
  case KakaduErrorManagement.FUSSY:
    gdal.SetConfigOption("KAKADU_ERROR_LEVEL_MANAGEMENT", "FUSSY");
    break;
  case KakaduErrorManagement.RESILIENT:
    gdal.SetConfigOption("KAKADU_ERROR_LEVEL_MANAGEMENT", "RESILIENT");
    break;
  default:
    throw new IllegalArgumentException(
        "KAKADU_ERROR_LEVEL_MANAGEMENT unknown! Provided value is "
            + errorManagement);
  }
}

代码示例来源:origin: com.revolsys.open/com.revolsys.open.gdal

private static void setGdalProperty(final String name,
 final String defaultValue) {
 String value = System.getProperty(name);
 if (!Property.hasValue(value)) {
  value = System.getenv(name);
  if (!Property.hasValue(value)) {
   value = defaultValue;
  }
 }
 if (Property.hasValue(value)) {
  gdal.SetConfigOption(name, value);
 }
}

代码示例来源:origin: deegree/deegree3

private void registerGdal( GDALSettings settings ) {
  if ( registerOnceQuietly() ) {
    for ( GDALOption gdalConfigOption : settings.getGDALOption() ) {
      LOG.info( "GDAL: " + gdalConfigOption.getName() + "=" + gdalConfigOption.getValue().trim() );
      gdal.SetConfigOption( gdalConfigOption.getName(), gdalConfigOption.getValue().trim() );
    }
    int activeDatasets = settings.getOpenDatasets().intValue();
    LOG.info( "Max number of open GDAL datasets: " + activeDatasets );
    pool = new GdalDatasetPool( activeDatasets );
  }
}

相关文章