public static boolean isMine ( NetcdfFile ncfile ) { String cs = ncfile . findAttValueIgnoreCase ( null , CDM . CONVENTIONS , null ) ; if ( cs != null ) return false ; String s = ncfile . findAttValueIgnoreCase ( null , "DataType" , null ) ; if ( ( s == null ) || ! ( s . equalsIgnoreCase ( "LatLonGrid" ) || s . equalsIgnoreCase ( "LatLonHeightGrid" ) ) ) return false ; if ( ( null == ncfile . findGlobalAttribute ( "Latitude" ) ) || ( null == ncfile . findGlobalAttribute ( "Longitude" ) ) || ( null == ncfile . findGlobalAttribute ( "LatGridSpacing" ) ) || ( null == ncfile . findGlobalAttribute ( "LonGridSpacing" ) ) || ( null == ncfile . findGlobalAttribute ( "Time" ) ) ) return false ; return ! ( null == ncfile . findDimension ( "Lat" ) || null == ncfile . findDimension ( "Lon" ) ) ; }
Is this my file?