static private CoordinateSystem findBestCoordinateSystem ( NetcdfDataset ds ) { // find coordinate system with highest rank (largest number of axes) CoordinateSystem use = null ; for ( CoordinateSystem cs : ds . getCoordinateSystems ( ) ) { if ( use == null ) use = cs ; else if ( cs . getCoordinateAxes ( ) . size ( ) > use . getCoordinateAxes ( ) . size ( ) ) use = cs ; } return use ; }
Find the CoordinateSystem with the most number of CoordinateAxes