首页 / 浏览问题 / 组件GIS / 问题详情
导入importSettingNetCDF数据怎么写?
8EXP 2022年09月24日

按照示例写出来以后直接OOM了。

ImportSettingNetCDF importSettingNetCDF = new ImportSettingNetCDF();
importSettingNetCDF.setImportMode(ImportMode.OVERWRITE);
importSettingNetCDF.setMultiBandImportMode(MultiBandImportMode.SINGLEBAND);
importSettingNetCDF.setImportingAsGrid(true);
importSettingNetCDF
        .setSourceFilePath("D:\\clf\\supermapWork\\NCTest1\\src\\main\\resources\\ImgImport\\CRA40LAND_LAND_20120601_GLB_0P50_DAY_V1_0_0.nc");
importSettingNetCDF.setTargetDatasource(m_desDatasource);

DataImport dataImport = new DataImport();
dataImport.getImportSettings().add(importSettingNetCDF);
dataImport.run();

2 个回答

单从代码来看,逻辑上没有发现有什么问题。

麻烦你讲使用的iObjects java组件产品详细版本号提供,以及崩溃日志上传下。

另外希望能提供下该nc数据,便于咱们快速重现定位和排查原因。
1,560EXP 2022年09月26日

supermap-iobjectsjava-11.0.0-21114-95737-win-all

控制台报错:

CompilerOracle: exclude org/eclipse/jdt/internal/compiler/parser/TypeConverter.*
Connected to the target VM, address: '127.0.0.1:50074', transport: 'socket'
SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".
SLF4J: Defaulting to no-operation (NOP) logger implementation
SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details.
Warning 1: Recode from UTF-8 to CP_ACP failed with the error: "Invalid argument".
#
# A fatal error has been detected by the Java Runtime Environment:
#
#  EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x00007ffa75487e0f, pid=5840, tid=0x0000000000002778
#
# JRE version: Java(TM) SE Runtime Environment (8.0_291-b10) (build 1.8.0_291-b10)
# Java VM: Java HotSpot(TM) 64-Bit Server VM (25.291-b10 mixed mode windows-amd64 compressed oops)
# Problematic frame:
# C  0x00007ffa75487e0f
#
# Failed to write core dump. Minidumps are not enabled by default on client versions of Windows
#
# An error report file with more information is saved as:
# D:\clf\supermapWork\NCTest1\hs_err_pid5840.log
#
# If you would like to submit a bug report, please visit:
#   http://bugreport.java.com/bugreport/crash.jsp
# The crash happened outside the Java Virtual Machine in native code.
# See problematic frame for where to report the bug.
#
Disconnected from the target VM, address: '127.0.0.1:50074', transport: 'socket'

Process finished with exit code 1
 

NC文件下载链接:http://101.201.177.119/dlcra/new/CRA40LAND/DAY/2012/20120801/CRA40LAND_LAND_20120801_GLB_0P50_DAY_V1_0_0.nc?Expires=1662773986&OSSAccessKeyId=LTAI4GBuJvdvfb7A4JaARwBQ&Signature=nc4yFXVkr%2BJsY6pfUP4tgS3tA58%3D&dataCode=NAFP_CRA40_FTM_DAY_NC&userId=3A66D856FBFDB25EFC8982958AA8F64B 

您好,我已在本机验证,iObjects Java 11i 组件导入 .nc 文件的确存在异常,我这边会与研发沟通尽快在 iObjects Java 11i 版本修复次问题。

建议您暂时使用 iObjects Java 10.2.1 组件包,该版本可以正常导入。

希望可以帮到您,
了解,谢谢
您好,请问您使用的 iObjects Java 组件是哪个版本的呢? 若方便的话建议您私信我,将您使用的 .nc 数据文件发给我看看。

希望可以帮到您。
2,258EXP 2022年09月26日
...