I am attempting to load a netcdf file in geoserver-2.8-RC1
(http://mtnweather.info/download/wrf_works.nc). With the same file loaded into
netcdf-toolsUI I am able to view grids, so I would think the netcdf file might
also be valid in geoserver. Upon attempting to add the store, I receive the
error : Could not list layers for this store, an error occurred retrieving
them. Any help in understanding and resolving this error would be greatly
appreciated.
The detailed error message reported on the console is :
WARN [netcdf.NetCDFGeoreferenceManager] - Unsupported axis: double lat(y=449,
x=599);
:axis = "Y";
:units = "degrees_north";
:long_name = "latitude";
:standard_name = "latitude";
:_CoordinateAxisType = "Lat";
in input: C:/projects/firewx/wrf_works.nc has been found
WARN [netcdf.NetCDFGeoreferenceManager] - Unsupported axis: double lon(y=449,
x=599);
:axis = "X";
:units = "degrees_east";
:long_name = "longitude";
:standard_name = "longitude";
:_CoordinateAxisType = "Lon";
in input: C:/projects/firewx/wrf_works.nc has been found
18 Sep 06:08:17 WARN [netcdf.NetCDFFormat] - Unable to connect
org.geotools.data.DataSourceException: Unable to connect
at
org.geotools.coverage.io.netcdf.NetCDFReader.<init>(NetCDFReader.java:158)
at
org.geotools.coverage.io.netcdf.NetCDFFormat.getReader(NetCDFFormat.java:95)
at
org.geoserver.catalog.ResourcePool.getGridCoverageReader(ResourcePool.java:1441)
at
org.geoserver.catalog.ResourcePool.getGridCoverageReader(ResourcePool.java:1369)
....
Caused by: java.lang.NullPointerException
at
org.geotools.coverage.io.netcdf.crs.ProjectionBuilder.createEllipsoid(ProjectionBuilder.java:255)
at
org.geotools.coverage.io.netcdf.crs.NetCDFProjection.buildEllipsoid(NetCDFProjection.java:453)
at
org.geotools.coverage.io.netcdf.crs.NetCDFProjection.parseProjection(NetCDFProjection.java:323)
at
org.geotools.coverage.io.netcdf.crs.NetCDFProjection.lookForVariableCRS(NetCDFProjection.java:532)
at
org.geotools.imageio.netcdf.NetCDFGeoreferenceManager.extractBBOX(NetCDFGeoreferenceManager.java:261)
at
org.geotools.imageio.netcdf.NetCDFGeoreferenceManager.<init>(NetCDFGeoreferenceManager.java:155)
at
org.geotools.imageio.netcdf.NetCDFImageReader.init(NetCDFImageReader.java:443)
at
org.geotools.imageio.netcdf.NetCDFImageReader.setInput(NetCDFImageReader.java:258)
When I look at the code for this error in geotools, it looks like this :
public static Ellipsoid createEllipsoid(String name, Map<String, Number>
ellipsoidParams) {
Number semiMajor = null;
Number semiMinor = null;
Number inverseFlattening = Double.NEGATIVE_INFINITY;
if (ellipsoidParams.containsKey(NetCDFUtilities.SEMI_MAJOR)) {
semiMajor = ellipsoidParams.get(NetCDFUtilities.SEMI_MAJOR);
}
if (ellipsoidParams.containsKey(NetCDFUtilities.SEMI_MINOR)) {
semiMinor = ellipsoidParams.get(NetCDFUtilities.SEMI_MINOR);
}
if (ellipsoidParams.containsKey(NetCDFUtilities.INVERSE_FLATTENING)) {
inverseFlattening =
ellipsoidParams.get(NetCDFUtilities.INVERSE_FLATTENING);
}
if (semiMinor != null) {
return DefaultEllipsoid.createEllipsoid(name,
semiMajor.doubleValue(),
semiMinor.doubleValue(), SI.METER);
} else {
return DefaultEllipsoid.createFlattenedSphere(name,
semiMajor.doubleValue(), /// --- NPE HERE semiMajor remains null.
inverseFlattening.doubleValue(), SI.METER);
}
}
Thanks!
Steve Ferguson
Application Developer
This electronic message contains information generated by the USDA solely for
the intended recipients. Any unauthorized interception of this message or the
use or disclosure of the information it contains may violate the law and
subject the violator to civil or criminal penalties. If you believe you have
received this message in error, please notify the sender and delete the email
immediately.
------------------------------------------------------------------------------
_______________________________________________
Geoserver-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geoserver-users