List<CoordinateSystem> systems = null;
if (file instanceof NetcdfDataset) {
final NetcdfDataset ds = (NetcdfDataset) file;
final EnumSet<NetcdfDataset.Enhance> mode = EnumSet.copyOf(ds.getEnhanceMode());
if (mode.add(NetcdfDataset.Enhance.CoordSystems)) {
ds.enhance(mode);
}
systems = ds.getCoordinateSystems();
}
geometries = new GridGeometry[(systems != null) ? systems.size() : 0];
for (int i=0; i<geometries.length; i++) {