Hi Ben,
 
thank you for your answer. I'm using gradle. Until now I included the gt-netcdf dependency (based on the user guide):
    compile("org.geotools:gt-netcdf:${geotoolsVersion}")
 
If I run gradle dependencies I get the following lines:
[...]
+--- org.geotools.jdbc:gt-jdbc-h2:16-SNAPSHOT
|    |    |    +--- org.opengeo:geodb:0.7-RC2
|    |    |    |    +--- com.h2database:h2:1.1.118 -> 1.1.119
|    |    |    |    +--- com.vividsolutions:jts:1.12 -> 1.13
|    |    |    |    \--- net.sourceforge.hatbox:hatbox:1.0.b7
|    |    |    |         +--- com.h2database:h2:1.1.117 -> 1.1.119
|    |    |    |         \--- com.vividsolutions:jts:1.10 -> 1.13
|    |    |    +--- com.h2database:h2:1.1.119
[...]
When I add the following lines to the dependencies:
    runtime group: 'org.opengeo', name: 'geodb', version: '0.7-RC2'
    runtime group: 'net.sourceforge.hatbox', name: 'hatbox', version: '1.0.b7'
    runtime group: 'com.h2database', name: 'h2', version: '1.1.119'
I get the following error:
 
22:25:11.013 [main] DEBUG Main - Summary information about GeoTools and the current environment:
22:25:11.152 [main] DEBUG Main - GeoTools version 16-SNAPSHOT (built from r4cc37699180815022c028893b3c78672e9898f71)
Java version: 1.8.0_101
Operating system: Windows 10 10.0
GeoTools jars on classpath:
Okt 04, 2016 10:25:11 PM org.geotools.imageio.netcdf.utilities.NetCDFUtilities <clinit>
INFORMATION: Value of Check Coordinate Plugins:null
Okt 04, 2016 10:25:11 PM org.geotools.imageio.netcdf.utilities.NetCDFUtilities <clinit>
INFORMATION: Should check for coordinate handler plugins:false
22:25:12.430 [main] INFO serverStartup - Nc4Iosp: NetCDF-4 C library loaded (jna_path='null', libname='netcdf').
22:25:12.439 [main] DEBUG ucar.nc2.jni.netcdf.Nc4Iosp - Netcdf nc_inq_libvers='4.4.1 of Jun 28 2016 14:35:06 $' isProtected=true
22:25:12.598 [main] DEBUG ucar.nc2.NetcdfFile - Using IOSP ucar.nc2.iosp.netcdf3.N3raf
22:25:12.915 [main] DEBUG ucar.nc2.NetcdfFile - Using IOSP ucar.nc2.iosp.netcdf3.N3raf
22:25:14.015 [main] INFO hsqldb.db.HSQLDB4AD417742A.ENGINE - dataFileCache open start
Okt 04, 2016 10:25:14 PM org.geotools.coverage.io.netcdf.NetCDFReader <init>
INFORMATION: ACCEPTED: O3-NO2.nc
22:25:14.373 [main] DEBUG Main - NetCDF store plugin
22:25:14.373 [main] DEBUG Main - Number of coverages in file: 2
22:25:14.377 [main] DEBUG Main - NO2
22:25:14.377 [main] DEBUG Main - O3
22:25:14.378 [main] DEBUG Main - start reading coverage: NO2
22:25:14.378 [main] DEBUG Main - org.geotools.coverage.io.netcdf.NetCDFReader@110e0b1
Okt 04, 2016 10:25:14 PM org.geotools.coverage.io.netcdf.NetCDFAccess access
SCHWERWIEGEND: Failed to access the NetCDF source
java.lang.RuntimeException: java.io.IOException: Schema 'NO2' does not exist.
    at org.geotools.imageio.netcdf.NetCDFImageReader.getCoverageDescriptor(NetCDFImageReader.java:570)
    at org.geotools.coverage.io.netcdf.NetCDFSource.<init>(NetCDFSource.java:52)
    at org.geotools.coverage.io.netcdf.NetCDFAccess.access(NetCDFAccess.java:167)
    at org.geotools.coverage.io.netcdf.NetCDFReader.getGridCoverageSource(NetCDFReader.java:649)
    at org.geotools.coverage.io.netcdf.NetCDFReader.read(NetCDFReader.java:485)
    at Main.main(Main.java:84)
Caused by: java.io.IOException: Schema 'NO2' does not exist.
    at org.geotools.data.store.ContentDataStore.ensureEntry(ContentDataStore.java:620)
    at org.geotools.data.store.ContentDataStore.getFeatureSource(ContentDataStore.java:393)
    at org.geotools.data.store.ContentDataStore.getFeatureSource(ContentDataStore.java:360)
    at org.geotools.data.store.ContentDataStore.getSchema(ContentDataStore.java:344)
    at org.geotools.coverage.io.catalog.CoverageSlicesCatalog.getSchema(CoverageSlicesCatalog.java:516)
    at org.geotools.imageio.netcdf.VariableAdapter.updateDimensions(VariableAdapter.java:573)
    at org.geotools.imageio.netcdf.VariableAdapter.initSpatialElements(VariableAdapter.java:532)
    at org.geotools.imageio.netcdf.VariableAdapter.init(VariableAdapter.java:470)
    at org.geotools.imageio.netcdf.VariableAdapter.<init>(VariableAdapter.java:1038)
    at org.geotools.imageio.netcdf.NetCDFImageReader.getCoverageDescriptor(NetCDFImageReader.java:568)
    ... 5 more
22:25:14.998 [main] DEBUG Main - Reader closed.
Exception in thread "main" java.lang.IllegalArgumentException: Argument "value" should not be null.
    at org.geotools.util.SoftValueHashMap.ensureNotNull(SoftValueHashMap.java:140)
    at org.geotools.util.SoftValueHashMap.put(SoftValueHashMap.java:281)
    at org.geotools.coverage.io.netcdf.NetCDFReader.getGridCoverageSource(NetCDFReader.java:651)
    at org.geotools.coverage.io.netcdf.NetCDFReader.read(NetCDFReader.java:485)
    at Main.main(Main.java:84)
 
I thought NetCDF is self describing and didn't expect to provide a schema? Or are there other dependencies missing?
 
Kind regards,
Christiane
 
 
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most 
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
_______________________________________________
GeoTools-GT2-Users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users

Reply via email to